Skip to content

Commit

Permalink
3djan/merge implicit (#394)
Browse files Browse the repository at this point in the history
* Fix default filter attribute

* Rename linear to linearcolor

* Always write ScalarFieldFromImage3D-channel

* Fix fieldid vs scalar/vector3d-fieldid

* Implement RemoveProperty

* Implement RemoveBoundary and RemoveColor

* Add test for properties

* Fix some iterators

* Add tests for iterators

* Add composite volumetric data

* Replace "Red", "Green",... with "R", "G", ...

* Using file globbing for gathering source files, removing unused *.cpp files

* Adding generateWrapper-script for linux64

* [lib3mf.xml] Introducing ImplicitNode and InplicitAddition

* [genertateWrapperAndBindingsLinux64.sh] Creating implementation stubs in Source/API and Include/API, I am just to lazy to copy manually

* Updating year and version

* ModelReaderNode for implicit node

* Introducing addition node

* [lib3mf.xml] Removing ImplicitAdditon. Introducing a class for each node type is to much effort. Adding dynamic inputs and outputs to the base node type, and introducing an enum with the node types. This also allows the user to choose between modeling the node types as classes or to choose a dynamic approach.

* [lib3mf.xml] Adding node types

* Introducing a resource Function that wraps an Implicit Function

* Adding install step for cmake config

* ImplicitFunction is now a resource

* [CMakeLists.txt] Disabling optimization for gcc in debug

* AddFunction works

* [lib3mf_implicitfunction] Avoiding dynamic casting of underlying resource

* Adding NMR_Model prefix to all implicit classes

* Moving methods for writing implicit functions to NMR_ModelWriterNode_Implicit

* Write out functions to resource section

* Adding reader for implicit function

* [.gitignore] Ignoring TestOutput

* [API] Replacing the Accessor by an Iterator to be consistent with the ResourceIterator

* Extending the model for implicit nodes,ports etc.

* Reading node elements of a function

* Adding input and output ports automatically

* Reading input ports

* Adding SetupWriteReadx.3mf to .gitignore

* Input ports with references can be written and read back again

* Writing function inputs and outputs

* Reading inputs and outputs of a function

* Throw on incompatible port types

* Introducing FindInput/FindOutput

* Constants can be written and read back

* Reading and writing constvec

* Reading and writing constMat

* Untracking and deleting 3mf files generate by tests

* Adding missing #include <memory> and some static casts for 32 bit platforms

* Replacing std::make_unique to be c++11 compatible

* Should now compile on 32 bit platforms

* Missed another cast

* Replacing cast to wrong type

* [github action] Use ubuntu-latest runner rather than 18.04

* [CMakeLists.txt] VS2022 failed to compile lib3mf because compile options meant for the c++ compiler were passed to the resource compiler

* [CMakeLists.txt] Using generator expressions only for ninja

* [CMakeLists.txt]  target_compile_definitions -> target_compile_options

* [CMakeLists.txt] Adding buildcache support

* [implicit] Updating naming of inputs and outputs

* [implicit] Correcting case of some node names

* Adding ScalarFieldFunction and Vector3DFieldFunction

* Writng the new function based fields, but Seg Fault in ImplicitSphere test

* [Volumetric tests] Check if the output directory already exists

* [.gitifnore] Adding .vs

* Adding CMakeSettings for legacy visual studio versions

* Adding decomposevector-node for implicit graph

* [Volumetric test] New gyroid test, fixing some issues on the way

* Update lib3mf.xml

* Restructure Function-classes, add 'tag'

* Fix CMakeLists (potentially)

* [NMR_ModelImplicitNode.h] Adding missing argument name

* Removing extra qualification

* Removing another unnessary qualification

* [build.yml] macos-10.15 -> macos-11

* [build.yml] Using macos-11 runner for deploy-macos

* Introducing Resource Node, that allows to set a resource id that than can be used as input for the mesh node

* [implicit] Introducing port type for resource id

* [implicit] point -> pos to make nameing more consistent

* [implicit] Resources are now set by setting a Resource

* [implicit] Resources are now set by setting a Resource part II

* Adding .clang-format

* [Volumetric tests] Exporting implicit model with a sub function

* Removing faulty call to base class constructor that is already called automatically

* Adding test for loading a 3d image

* Updating test file

* Adding debug config

* Introducing NMR_ModelFunctionFromImage3D

* Implementing lib3mf_functionformimage3d

* Adding reader for FunctionFromImage3D

* Adding writer for FunctionsFromImage3D

* Writing test file for FunctionFromImage3D

* Fixing integration test for functionFromImage3D

* Comparing functionsFromImage3D. Tests fails, api for accessing functions has to be changed

* Extending test and fixing writing/reading of resource ids

* Breaking change: Dropping Fields in favor of Functions. Tests are WIP

* Replacing Fields with Functions

* [NMR_ModelImplicitFunction] addLink now also resolves output ports

* [volumetric tests] Disabling broken tests, new tests requiered

* [Volumetric tests] Updating compare functions and fixing issue with wrong resource ids

* [volumetric tests] Adding volume data elements

* Readding Transform for VolumeData elements (boundary, color, property)

* [volumetric tests] CreateImplicitWithFunctionFromImage3D writes Transformation

* [volumetric tests] Adding more tests

* [volumetirc tests] Using cube instead of pyramid to make it easier to validate the test results

* [functionfromimage3d writer] Using ModelResourceId for image3dID

* formatting

* [ModelFunctionFromImage3D] Fetching resource in getter rather than getter

* [volumetric test] setting boundary threshold

* [NodeTypes] NodeTypeMap considers port types and multiple combinations

* [ImplicitNodeTypes] Adding nodes and types according to spec

* [implicit] Adding per node type validation

* Adding OutputName to all volume data elements

* outputname -> channelname to be consistent with old spec

* Implementing ChannelName into volumedata reader

* Adding missing channel attribute to writer

* [implicit] Adding clamp

* [implicit] Using optionalclass for FindOutput and FindInput

* [implicit] Implementing removeNode

* [implicit] Adding clear method to implicit functions

* [lib3mf.xml] Introducing MinFeatureSize and MeshBBoxOnly

* Writing and reading minfeaturesize and meshbboxonly

* [lib3mf_model] Introducing mergeFunctions

* Replacing resourceids during merging of functions

* Introducing MergeFromModel

* [volumetric] Adding test for merging a second function

* [NMR_Model] Creating new package ids for the merged functions

* Fixing broken tests

* [ImplicitFunction] Introducing SortNodesTopologically

* [Volumetric tests] Adding volume element to shell from mesh test

* Fixing warning that is turning into error with VS2022

* Removing solidthreshold attribute from <boundary> element

* Introducing ImplicitNodeConfiguration, to set port types during construction of nodes

* [Implicit] Initializing port types based on the set node configuration

* Fixing warnings and errors from gcc

* Satisfying clang warnings

* Using local independent std::from_chars for parsing floating point numbers

* Setting c++17 for all compiler

* Replacing strtof with fnStringToFloat

* [fnStringToDouble] Adding std::chars_format::general, not all compiler seem to support the overload with 3 arguments

* [build.yml] Changing all runners to latest

* Revert "Replacing strtof with fnStringToFloat"

This reverts commit 27ca9de181dc1213a1f06ef6d626fb5d89c552df.

* Falling back to strtod for non c++17 complaint platforms

* [lib3mf.xml] Adding spezialized node classes

* [lib3mf.xml] Adding spezialized factory methods for implicit nodes

* Generating new API with ACT

* [implicit] Adding factories for spezialized node types

* [Volumetric tests] Using new API for node creation

* [CImplicitNode] Explicitly initalizining m_pImplicitNode in derived classes

* [Volumetric tests] Passing again

* [Volumetric/Implicit] Enabling dynamic_pointer_cast for nodeiterator->getCurrent()

* [Volumetric] Improving error messages

* Ports now know the referenced port, not just its name

* Introducing DirectedGraph

* [build.yml] Don't fail cli if codecoverage fails

* Adding fast_float as submodule

* Using fast_float for string parsing

* [Common/graph] Unsigned indices

* [GraphAlgorithms]  Resolving signed/unsigned mismatch

* Updating accroding to spec: UnsignedMesh, vectorfroamscalar, matrixfromrows, matrixfromcolumns

* Adding fallback value to volume data elements

* Improving Volumetric tests, so that the output files make more sense

* Breaking change: Adding implicit namespace with prefix "i", writing and reading considers the namespace. Writing explicitly the default channel name for volumedata:boundary

* [NMR_ImplicitNodeTypes] Adding VectorFromScalar and UnsignedMesh

* [implicit] Don't write inputs for nodes that are not supposed to have them

* Fixing namespace check for volumetric and implicit

* Updating namespace urls for volumetric and implicit

* CheckRequiredExtensions now considers Volumetric and Implict namespace

* Introducing BoundaryShape, removing boundary from VolumeData

* Introducing ModelBoundaryShapeObject

* Implementing wrapper for boundary shape

* Reader for boundary shape

* Removing boundary from volume data

* Making VolumeData a Resource (WIP)

* [CModelVolumeData] Removing boundary

* [VectorFromScalarNode] Adding missing implementation by inheriting OneInputNode

* Adding VolumeData as resource

* [BoundaryShape] Implementing writer

* Add XML attribute for boundary shape ID

* [API] Introducing AddBoundaryShape

* [Volumetric tests] fixing some tests, but requiers api mehtod to query BoundaryShapeObjects

* [Volumetric tests] Tests pass again

* [CBoundaryShape] Adding implementation for Set and GetVolumeData

* [.gitmodules] Adding cpp-base64

* [.gitmodules] Adding googletest, libzip and zlib

* Renaming boundary shape to level set

* Correcting filename case

* Correcting more filename cases

* Implement IsMeshObject method in CLevelSet class

* Introducing IsLevelSetObject

* Add GetLevelSetByID method to IModel interface

* Fix null pointer exception in CMeshObject::GetVolumeData()

* Add support for CModelLevelSetObject in CObject::fnCreateObjectFromModelResource

* [implicit] Adding mod (glsl) node

* Adding missing ctor for CMoeNode

* Resource -> ConstResourceID

* [WriterNode_Implicit] Writing function outputs at the end of functions rather than in the beginning to avoid forward references

* cherrypicking fix for functionfromimage3d to read scale and offset

* Add CMakePresets.json for build configurations

* [levelset] Adding missing override for IsComponentsObject()

* [levelset] Adding missing override for IsComponentsObject()

* Writing id attribute of <volumedata>

* Removing XML constants for scalar and vector fields

* Reading volumedata id attribute

* feat: Add volumeData Id assertion and validation in Volumetric tests

* XML constants for volumedata and levelset attributes

* Add writePrefixedIntAttribute method to ModelWriterNode

* Levelsets writes volumeid

* Mesh writer does not write VolumeData anymore

* refactor: Update attribute name in ModelReaderNode_LevelSet.cpp

* ModelReaderNode100_Mesh reads volumeid

* volumedata is wrtten out as a resource

* CModelReaderNode100_Mesh parses volumeid with namestace prefix

* Implicit: function -> implicitfunction, for now both element names are accepted for reading to migrate existing files

* CLevelSet::GetVolumeData returns nullptr if no volumedata is set

* Levelset writes volumeid without namespace prefix

* Correcting string literals based on findings by quality logic

* Writing prefix for functions inputs again

* Improving error messages

* Enhance CNMRException to include detailed error messages and improve exception handling

* Improving resource ID handling for merging implicit functions

* [CModel] Refactor resource ID generation to ensure uniqueness

* generateResourceID now considers the model resource id rather than the UniqueResourceID

* Update GitHub Actions to use checkout and upload-artifact actions version 4

* Update GitHub Actions to use download-artifact action version 4

* Refactor model writer to introduce dedicated methods for writing base materials, textures, and colors

* Extract resource write methods

* Extracting writeResource

* Write resources in topological order

* Add cyclic dependency check to resource sorting algorithm

* Prevent duplicate metadata addition and enhance test coverage for model merging

* Fixing mix up between unique and model resource id

* Rename UniqueResourceID to ModelResourceID in CModelImplicitNode

* Enhance error message for resource ID not found exception to include details on potential forward references

* Fixing issue with merging functions

* Adding new tesf files for volumetric test

* Setting parent of merged implicit nodes

* Implement RemoveResource method in model interface and bindings

* Remove package resource ID from resource handler upon resource removal

* Add function resource verification in volumetric tests and update function count handling

* Refactor function count retrieval and clean up debug output for merged implicit functions

* Resolving merge conflicts

* Update dynamic library copy command to use version variable for consistency

* Update dynamic library copy command to include version suffix

* Rename enum value 'None' to 'BeamLatticeBallModeNone' to not use a python keyword

* Update lib3mf_DIR paths to use environment variable for versioning

* Increasing code coverage of binding tests

---------

Co-authored-by: Martin Weismann <[email protected]>
  • Loading branch information
3dJan and martinweismann authored Nov 9, 2024
1 parent 5abad20 commit be3289c
Show file tree
Hide file tree
Showing 381 changed files with 152,157 additions and 24,469 deletions.
14 changes: 14 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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-*
3,499 changes: 3,112 additions & 387 deletions Autogenerated/Bindings/C/lib3mf.h

Large diffs are not rendered by default.

232 changes: 225 additions & 7 deletions Autogenerated/Bindings/C/lib3mf_types.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*++
Copyright (C) 2019 3MF Consortium (Original Author)
Copyright (C) 2024 3MF Consortium (Original Author)
All rights reserved.
Expand Down Expand Up @@ -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
*/

Expand Down Expand Up @@ -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 ""

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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";
}
}
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -305,7 +388,7 @@ typedef enum eLib3MFBeamLatticeClipMode {
} eLib3MFBeamLatticeClipMode;

typedef enum eLib3MFBeamLatticeBallMode {
eBeamLatticeBallModeNone = 0,
eBeamLatticeBallModeBeamLatticeBallModeNone = 0,
eBeamLatticeBallModeMixed = 1,
eBeamLatticeBallModeAll = 2
} eLib3MFBeamLatticeBallMode;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 ()

/*************************************************************************************************************************
Expand Down
Loading

0 comments on commit be3289c

Please sign in to comment.