lib3mf :
- primo commit.
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
/*++
|
||||
|
||||
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 CAccessRight
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_DECRYPTRIGHT
|
||||
#define __LIB3MF_DECRYPTRIGHT
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
// Include custom headers here.
|
||||
#include "Model/Classes/NMR_KeyStoreAccessRight.h"
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CAccessRight
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CAccessRight : public virtual IAccessRight, public virtual CBase {
|
||||
private:
|
||||
NMR::PKeyStoreAccessRight m_pAccessRight;
|
||||
public:
|
||||
CAccessRight(NMR::PKeyStoreAccessRight ar);
|
||||
|
||||
// Inherited via IAccessRight
|
||||
virtual IConsumer * GetConsumer() override;
|
||||
|
||||
virtual Lib3MF::eWrappingAlgorithm GetWrappingAlgorithm();
|
||||
|
||||
virtual Lib3MF::eMgfAlgorithm GetMgfAlgorithm();
|
||||
|
||||
virtual Lib3MF::eDigestMethod GetDigestMethod();
|
||||
|
||||
// Other access methods
|
||||
NMR::PKeyStoreAccessRight accessRight() const;
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -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 CAttachment
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_ATTACHMENT
|
||||
#define __LIB3MF_ATTACHMENT
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
// Include custom headers here.
|
||||
#include "Model/Classes/NMR_ModelAttachment.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CAttachment
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CAttachment : public virtual IAttachment, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::PModelAttachment m_pModelAttachment;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CAttachment(NMR::PModelAttachment pModelAttachment);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
std::string GetPath ();
|
||||
|
||||
void SetPath (const std::string & sPath);
|
||||
|
||||
IPackagePart * PackagePart();
|
||||
|
||||
std::string GetRelationShipType ();
|
||||
|
||||
void SetRelationShipType (const std::string & sPath);
|
||||
|
||||
void WriteToFile (const std::string & sFileName);
|
||||
|
||||
void ReadFromFile (const std::string & sFileName);
|
||||
|
||||
void ReadFromCallback(const Lib3MF::ReadCallback pTheReadCallback, const Lib3MF_uint64 nStreamSize, const Lib3MF::SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData);
|
||||
|
||||
Lib3MF_uint64 GetStreamSize ();
|
||||
|
||||
void WriteToBuffer (Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer);
|
||||
|
||||
void ReadFromBuffer(const Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // __LIB3MF_ATTACHMENT
|
||||
@@ -0,0 +1,93 @@
|
||||
/*++
|
||||
|
||||
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 CBase
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_BASE
|
||||
#define __LIB3MF_BASE
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
|
||||
|
||||
// Include custom headers here.
|
||||
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CBase
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CBase : public virtual IBase {
|
||||
private:
|
||||
|
||||
std::unique_ptr<std::list<std::string>> m_pErrors;
|
||||
Lib3MF_uint32 m_nReferenceCount = 1;
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
|
||||
bool GetLastErrorMessage(std::string & sErrorMessage);
|
||||
|
||||
void ClearErrorMessages();
|
||||
|
||||
void RegisterErrorMessage(const std::string & sErrorMessage);
|
||||
|
||||
void IncRefCount();
|
||||
|
||||
bool DecRefCount();
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#endif // __LIB3MF_BASE
|
||||
@@ -0,0 +1,103 @@
|
||||
/*++
|
||||
|
||||
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 CBaseMaterial
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_BASEMATERIALGROUP
|
||||
#define __LIB3MF_BASEMATERIALGROUP
|
||||
|
||||
#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_ModelBaseMaterial.h"
|
||||
#include "Model/Classes/NMR_ModelBaseMaterials.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CBaseMaterialGroup
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CBaseMaterialGroup : public virtual IBaseMaterialGroup, public virtual CResource {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
NMR::CModelBaseMaterialResource& baseMaterialGroup();
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CBaseMaterialGroup(NMR::PModelBaseMaterialResource pResource);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
Lib3MF_uint32 GetCount ();
|
||||
|
||||
Lib3MF_uint32 AddMaterial(const std::string & sName, const sLib3MFColor DisplayColor);
|
||||
|
||||
void RemoveMaterial (const Lib3MF_uint32 nPropertyID);
|
||||
|
||||
std::string GetName (const Lib3MF_uint32 nPropertyID);
|
||||
|
||||
void SetName (const Lib3MF_uint32 nPropertyID, const std::string & sName);
|
||||
|
||||
void SetDisplayColor(const Lib3MF_uint32 nPropertyID, const sLib3MFColor TheColor);
|
||||
|
||||
sLib3MFColor GetDisplayColor(const Lib3MF_uint32 nPropertyID);
|
||||
|
||||
void GetAllPropertyIDs(Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_BASEMATERIALGROUP
|
||||
@@ -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 CBaseMaterialGroupIterator
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_BASEMATERIALGROUPITERATOR
|
||||
#define __LIB3MF_BASEMATERIALGROUPITERATOR
|
||||
|
||||
#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 CBaseMaterialGroupIterator
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CBaseMaterialGroupIterator : public virtual IBaseMaterialGroupIterator, 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.
|
||||
*/
|
||||
|
||||
IBaseMaterialGroup * GetCurrentBaseMaterialGroup ();
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_BASEMATERIALGROUPITERATOR
|
||||
@@ -0,0 +1,137 @@
|
||||
/*++
|
||||
|
||||
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 CBeamLattice
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_BEAMLATTICE
|
||||
#define __LIB3MF_BEAMLATTICE
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
#include "Common/Mesh/NMR_Mesh.h"
|
||||
#include "Model/Classes/NMR_ModelMeshBeamLatticeAttributes.h"
|
||||
#include "Model/Classes/NMR_ModelMeshObject.h"
|
||||
// Include custom headers here.
|
||||
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CBeamLattice
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CBeamLattice : public virtual IBeamLattice, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::CMesh& m_mesh;
|
||||
NMR::PModelMeshBeamLatticeAttributes m_pAttributes;
|
||||
NMR::PModelMeshObject m_pMeshObject;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CBeamLattice(NMR::PModelMeshObject pMeshObject, NMR::PModelMeshBeamLatticeAttributes pAttributes);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
Lib3MF_double GetMinLength ();
|
||||
|
||||
void SetMinLength (const Lib3MF_double dMinLength);
|
||||
|
||||
void GetClipping (eBeamLatticeClipMode & eClipMode, Lib3MF_uint32 & nUniqueResourceID);
|
||||
|
||||
void SetClipping (const eBeamLatticeClipMode eClipMode, const Lib3MF_uint32 nUniqueResourceID);
|
||||
|
||||
bool GetRepresentation(Lib3MF_uint32 & nUniqueResourceID);
|
||||
|
||||
void SetRepresentation(const Lib3MF_uint32 nUniqueResourceID);
|
||||
|
||||
void GetBallOptions (eBeamLatticeBallMode & eBallMode, Lib3MF_double & dBallRadius);
|
||||
|
||||
void SetBallOptions (const eBeamLatticeBallMode eBallMode, const Lib3MF_double dBallRadius);
|
||||
|
||||
Lib3MF_uint32 GetBeamCount ();
|
||||
|
||||
sLib3MFBeam GetBeam (const Lib3MF_uint32 nIndex);
|
||||
|
||||
Lib3MF_uint32 AddBeam (const sLib3MFBeam BeamInfo);
|
||||
|
||||
void SetBeam (const Lib3MF_uint32 nIndex, const sLib3MFBeam BeamInfo);
|
||||
|
||||
void SetBeams (const Lib3MF_uint64 nBeamInfoBufferSize, const sLib3MFBeam * pBeamInfoBuffer);
|
||||
|
||||
void GetBeams (Lib3MF_uint64 nBeamInfoBufferSize, Lib3MF_uint64 * pBeamInfoNeededCount, sLib3MFBeam * pBeamInfoBuffer);
|
||||
|
||||
Lib3MF_uint32 GetBallCount ();
|
||||
|
||||
sLib3MFBall GetBall (const Lib3MF_uint32 nIndex);
|
||||
|
||||
Lib3MF_uint32 AddBall (const sLib3MFBall BallInfo);
|
||||
|
||||
void SetBall (const Lib3MF_uint32 nIndex, const sLib3MFBall BallInfo);
|
||||
|
||||
void SetBalls (const Lib3MF_uint64 nBallInfoBufferSize, const sLib3MFBall * pBallInfoBuffer);
|
||||
|
||||
void GetBalls (Lib3MF_uint64 nBeamInfoBufferSize, Lib3MF_uint64 * pBallInfoNeededCount, sLib3MFBall * pBallInfoBuffer);
|
||||
|
||||
Lib3MF_uint32 GetBeamSetCount ();
|
||||
|
||||
IBeamSet * AddBeamSet ();
|
||||
|
||||
IBeamSet * GetBeamSet (const Lib3MF_uint32 nIndex);
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_BEAMLATTICE
|
||||
@@ -0,0 +1,111 @@
|
||||
/*++
|
||||
|
||||
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 CBeamSet
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_BEAMSET
|
||||
#define __LIB3MF_BEAMSET
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
#include "Common/Mesh/NMR_MeshTypes.h"
|
||||
#include "Common/Mesh/NMR_Mesh.h"
|
||||
#include "Model/Classes/NMR_ModelMeshObject.h"
|
||||
// Include custom headers here.
|
||||
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
#define LIB3MF_MAXBEAMCOUNT (1UL << 31)
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CBeamSet
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CBeamSet : public virtual IBeamSet, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::PBEAMSET m_pBeamSet;
|
||||
NMR::CMesh& m_mesh;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CBeamSet(NMR::PBEAMSET pBeamSet, NMR::PModelMeshObject pMeshObject);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
virtual void SetName(const std::string & sName);
|
||||
|
||||
virtual std::string GetName();
|
||||
|
||||
virtual void SetIdentifier(const std::string & sIdentifier);
|
||||
|
||||
virtual std::string GetIdentifier();
|
||||
|
||||
virtual Lib3MF_uint32 GetReferenceCount();
|
||||
|
||||
virtual void SetReferences(const Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer);
|
||||
|
||||
virtual void GetReferences(Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64 * pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer);
|
||||
|
||||
virtual Lib3MF_uint32 GetBallReferenceCount();
|
||||
|
||||
virtual void SetBallReferences(const Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer);
|
||||
|
||||
virtual void GetBallReferences(Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64 * pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_BEAMSET
|
||||
@@ -0,0 +1,111 @@
|
||||
/*++
|
||||
|
||||
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 CBuildItem
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_BUILDITEM
|
||||
#define __LIB3MF_BUILDITEM
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
|
||||
// Include custom headers here.
|
||||
#include "Model/Classes/NMR_ModelBuildItem.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CBuildItem
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CBuildItem : public virtual IBuildItem, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::PModelBuildItem m_pBuildItem;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
NMR::CModelBuildItem& buildItem();
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CBuildItem(NMR::PModelBuildItem pBuildItem);
|
||||
|
||||
Lib3MF_uint32 GetHandle();
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
IObject * GetObjectResource ();
|
||||
|
||||
std::string GetUUID (bool & bHasUUID);
|
||||
|
||||
void SetUUID (const std::string & sUUID);
|
||||
|
||||
Lib3MF_uint32 GetObjectResourceID ();
|
||||
|
||||
bool HasObjectTransform ();
|
||||
|
||||
sLib3MFTransform GetObjectTransform ();
|
||||
|
||||
void SetObjectTransform (const sLib3MFTransform Transform);
|
||||
|
||||
std::string GetPartNumber ();
|
||||
|
||||
void SetPartNumber (const std::string & sSetPartnumber);
|
||||
|
||||
IMetaDataGroup * GetMetaDataGroup ();
|
||||
|
||||
Lib3MF::sBox GetOutbox();
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_BUILDITEM
|
||||
@@ -0,0 +1,100 @@
|
||||
/*++
|
||||
|
||||
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 CBuildItemIterator
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_BUILDITEMITERATOR
|
||||
#define __LIB3MF_BUILDITEMITERATOR
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
|
||||
// Include custom headers here.
|
||||
#include "Model/Classes/NMR_ModelBuildItem.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CBuildItemIterator
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CBuildItemIterator : public virtual IBuildItemIterator, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
std::vector<NMR::PModelBuildItem> m_pBuildItems;
|
||||
Lib3MF_int32 m_nCurrentIndex;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CBuildItemIterator();
|
||||
|
||||
void addBuildItem(NMR::PModelBuildItem pBuildItem);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
bool MoveNext ();
|
||||
|
||||
bool MovePrevious ();
|
||||
|
||||
IBuildItem * GetCurrent ();
|
||||
|
||||
IBuildItemIterator * Clone ();
|
||||
|
||||
Lib3MF_uint64 Count();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_BUILDITEMITERATOR
|
||||
@@ -0,0 +1,101 @@
|
||||
/*++
|
||||
|
||||
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 CColorGroup
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_COLORGROUP
|
||||
#define __LIB3MF_COLORGROUP
|
||||
|
||||
#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_ModelColorGroup.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CColorGroup
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CColorGroup : public virtual IColorGroup, public virtual CResource {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
NMR::CModelColorGroupResource& colorGroup();
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CColorGroup(NMR::PModelColorGroupResource pResource);
|
||||
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
Lib3MF_uint32 GetCount ();
|
||||
|
||||
void GetAllPropertyIDs (Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer);
|
||||
|
||||
Lib3MF_uint32 AddColor (const sLib3MFColor TheColor);
|
||||
|
||||
void SetColor (const Lib3MF_uint32 nPropertyID, const sLib3MFColor TheColor);
|
||||
|
||||
sLib3MFColor GetColor (const Lib3MF_uint32 nPropertyID);
|
||||
|
||||
void RemoveColor(const Lib3MF_uint32 nPropertyID);
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_COLORGROUP
|
||||
@@ -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 CColorGroupIterator
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_COLORGROUPITERATOR
|
||||
#define __LIB3MF_COLORGROUPITERATOR
|
||||
|
||||
#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 CColorGroupIterator
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CColorGroupIterator : public virtual IColorGroupIterator, 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.
|
||||
*/
|
||||
|
||||
IColorGroup * GetCurrentColorGroup ();
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_COLORGROUPITERATOR
|
||||
@@ -0,0 +1,100 @@
|
||||
/*++
|
||||
|
||||
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 CComponent
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_COMPONENT
|
||||
#define __LIB3MF_COMPONENT
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
|
||||
// Include custom headers here.
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CComponent
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CComponent : public virtual IComponent, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::PModelComponent m_pComponent;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CComponent(NMR::PModelComponent pComponent);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
IObject * GetObjectResource ();
|
||||
|
||||
Lib3MF_uint32 GetObjectResourceID ();
|
||||
|
||||
std::string GetUUID (bool & bHasUUID);
|
||||
|
||||
void SetUUID (const std::string & sUUID);
|
||||
|
||||
bool HasTransform ();
|
||||
|
||||
void SetTransform (const sLib3MFTransform Transform);
|
||||
|
||||
virtual sLib3MFTransform GetTransform();
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_COMPONENT
|
||||
@@ -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 CComponentsObject
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_COMPONENTSOBJECT
|
||||
#define __LIB3MF_COMPONENTSOBJECT
|
||||
|
||||
#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_ModelComponentsObject.h"
|
||||
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CComponentsObject
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CComponentsObject : public virtual IComponentsObject, public virtual CObject {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
|
||||
protected:
|
||||
|
||||
NMR::CModelComponentsObject * getComponentsObject();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CComponentsObject(NMR::PModelResource pResource);
|
||||
|
||||
static IComponentsObject* fnCreateComponentsObjectFromModelResource(NMR::PModelResource pResource, bool bFailIfUnkownClass);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
IComponent * AddComponent (IObject* pObjectResource, const sLib3MFTransform Transform);
|
||||
|
||||
IComponent * GetComponent (const Lib3MF_uint32 nIndex);
|
||||
|
||||
Lib3MF_uint32 GetComponentCount ();
|
||||
|
||||
bool IsMeshObject();
|
||||
|
||||
bool IsComponentsObject();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __LIB3MF_COMPONENTSOBJECT
|
||||
@@ -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 CComponentsObjectIterator
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_COMPONENTSOBJECTITERATOR
|
||||
#define __LIB3MF_COMPONENTSOBJECTITERATOR
|
||||
|
||||
#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 CComponentsObjectIterator
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CComponentsObjectIterator : public virtual IComponentsObjectIterator, 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.
|
||||
*/
|
||||
|
||||
IComponentsObject * GetCurrentComponentsObject ();
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_COMPONENTSOBJECTITERATOR
|
||||
@@ -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 CCompositeMaterials
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_COMPOSITEMATERIALS
|
||||
#define __LIB3MF_COMPOSITEMATERIALS
|
||||
|
||||
#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_ModelCompositeMaterials.h"
|
||||
|
||||
#define LIB3MF_MAXCOMPOSITEMATERIALS (1UL << 31)
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CCompositeMaterials
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CCompositeMaterials : public virtual ICompositeMaterials, public virtual CResource {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
NMR::CModelCompositeMaterialsResource& compositeMaterials();
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CCompositeMaterials(NMR::PModelCompositeMaterialsResource pResource);
|
||||
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
Lib3MF_uint32 GetCount ();
|
||||
|
||||
void GetAllPropertyIDs (Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer);
|
||||
|
||||
IBaseMaterialGroup * GetBaseMaterialGroup ();
|
||||
|
||||
Lib3MF_uint32 AddComposite(const Lib3MF_uint64 nCompositeBufferSize, const sLib3MFCompositeConstituent * pCompositeBuffer);
|
||||
|
||||
void RemoveComposite (const Lib3MF_uint32 nPropertyID);
|
||||
|
||||
void GetComposite(const Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, sLib3MFCompositeConstituent * pCompositeBuffer);
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_COMPOSITEMATERIALS
|
||||
@@ -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 CCompositeMaterialsIterator
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_COMPOSITEMATERIALSITERATOR
|
||||
#define __LIB3MF_COMPOSITEMATERIALSITERATOR
|
||||
|
||||
#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 CCompositeMaterialsIterator
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CCompositeMaterialsIterator : public virtual ICompositeMaterialsIterator, 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.
|
||||
*/
|
||||
|
||||
ICompositeMaterials * GetCurrentCompositeMaterials ();
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_COMPOSITEMATERIALSITERATOR
|
||||
@@ -0,0 +1,66 @@
|
||||
/*++
|
||||
|
||||
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 CConsumer
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_CONSUMER
|
||||
#define __LIB3MF_CONSUMER
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
#include "Model/Classes/NMR_KeyStoreConsumer.h"
|
||||
// Include custom headers here.
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CConsumer
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CConsumer : public virtual IConsumer, public virtual CBase {
|
||||
private:
|
||||
NMR::PKeyStoreConsumer m_Consumer;
|
||||
public:
|
||||
inline NMR::PKeyStoreConsumer consumer() const {
|
||||
return m_Consumer;
|
||||
}
|
||||
CConsumer(NMR::PKeyStoreConsumer const & consumer);
|
||||
// Inherited via IConsumer
|
||||
std::string GetConsumerID() override;
|
||||
std::string GetKeyID() override;
|
||||
std::string GetKeyValue() override;
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,74 @@
|
||||
/*++
|
||||
|
||||
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 CContentEncryptionParams
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_CIPHERDATA
|
||||
#define __LIB3MF_CIPHERDATA
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
|
||||
#include "Model/Classes/NMR_KeyStoreCEKParams.h"
|
||||
// Include custom headers here.
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CContentEncryptionParams
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CContentEncryptionParams : public virtual IContentEncryptionParams, public virtual CBase {
|
||||
private:
|
||||
NMR::PCKeyStoreContentEncryptionParams m_pParams;
|
||||
public:
|
||||
CContentEncryptionParams(NMR::PCKeyStoreContentEncryptionParams const & p);
|
||||
// Inherited via IContentEncryptionParams
|
||||
Lib3MF_uint64 GetDescriptor();
|
||||
Lib3MF::eEncryptionAlgorithm GetEncryptionAlgorithm();
|
||||
void GetKey(Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64 *pByteDataNeededCount, Lib3MF_uint8 *pByteDataBuffer);
|
||||
void GetInitializationVector(Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64 *pByteDataNeededCount, Lib3MF_uint8 *pByteDataBuffer);
|
||||
void GetAuthenticationTag(Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64 *pByteDataNeededCount, Lib3MF_uint8 *pByteDataBuffer);
|
||||
void SetAuthenticationTag(Lib3MF_uint64 const nByteDataBufferSize, const Lib3MF_uint8 *pByteDataBuffer);
|
||||
void GetAdditionalAuthenticationData(Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64 *pByteDataNeededCount, Lib3MF_uint8 *pByteDataBuffer);
|
||||
void SetAdditionalAuthenticationData(Lib3MF_uint64 const nByteDataBufferSize, const Lib3MF_uint8 *pByteDataBuffer);
|
||||
std::string GetKeyUUID();
|
||||
|
||||
inline NMR::PKeyStoreCEKParams params() const {
|
||||
return m_pParams;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,119 @@
|
||||
/*++
|
||||
|
||||
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 CKeyStore
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_KEYSTORE
|
||||
#define __LIB3MF_KEYSTORE
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
// Include custom headers here.
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
#include "Model/Classes/NMR_Model.h"
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CKeyStore
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CKeyStore : public virtual IKeyStore, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::PKeyStore m_pKeyStore;
|
||||
NMR::PModel m_pModel;
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CKeyStore(NMR::PModel const & pModel);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
|
||||
// Inherited via IKeyStore
|
||||
IConsumer * AddConsumer(const std::string & sConsumerID, const std::string & sKeyID, const std::string & sKeyValue) override;
|
||||
|
||||
Lib3MF_uint64 GetConsumerCount() override;
|
||||
|
||||
IConsumer * GetConsumer(const Lib3MF_uint64 nConsumerIndex) override;
|
||||
|
||||
IConsumer * FindConsumer(const std::string & sConsumerID) override;
|
||||
|
||||
virtual void RemoveConsumer(IConsumer * pConsumerInstance) override;
|
||||
|
||||
std::string GetUUID(bool & bHasUUID) override;
|
||||
|
||||
void SetUUID(const std::string & sUUID) override;
|
||||
|
||||
virtual Lib3MF_uint64 GetResourceDataGroupCount() override;
|
||||
|
||||
virtual IResourceDataGroup * GetResourceDataGroup(const Lib3MF_uint64 nResourceDataIndex) override;
|
||||
|
||||
virtual IResourceDataGroup * AddResourceDataGroup() override;
|
||||
|
||||
virtual void RemoveResourceDataGroup(IResourceDataGroup * pTheResourceDataGroup) override;
|
||||
|
||||
virtual Lib3MF::Impl::IResourceDataGroup * FindResourceDataGroup(Lib3MF::Impl::IPackagePart *pPartPath);
|
||||
|
||||
virtual IResourceData * AddResourceData(IResourceDataGroup* pResourceDataGroup, IPackagePart* pPartPath, const Lib3MF::eEncryptionAlgorithm eAlgorithm, const Lib3MF::eCompression eCompression, const Lib3MF_uint64 nAdditionalAuthenticationDataBufferSize, const Lib3MF_uint8 * pAdditionalAuthenticationDataBuffer);
|
||||
|
||||
virtual void RemoveResourceData(Lib3MF::Impl::IResourceData *pResourceData);
|
||||
|
||||
virtual Lib3MF_uint64 GetResourceDataCount();
|
||||
|
||||
virtual Lib3MF::Impl::IResourceData * GetResourceData(const Lib3MF_uint64 nResourceDataIndex);
|
||||
|
||||
virtual IResourceData * FindResourceData(IPackagePart * pResourcePath) override;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#endif // __LIB3MF_KEYSTORE
|
||||
@@ -0,0 +1,137 @@
|
||||
/*++
|
||||
|
||||
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 CMeshObject
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_MESHOBJECT
|
||||
#define __LIB3MF_MESHOBJECT
|
||||
|
||||
#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_ModelMeshObject.h"
|
||||
#include "Common/MeshInformation/NMR_MeshInformation_Properties.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CMeshObject
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CMeshObject : public virtual IMeshObject, public virtual CObject {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::PModelMeshObject meshObject();
|
||||
NMR::CMesh* mesh();
|
||||
|
||||
NMR::CMeshInformation_Properties* getMeshInformationProperties();
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
static IMeshObject* fnCreateMeshObjectFromModelResource(NMR::PModelResource pResource, bool bFailIfUnkownClass);
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CMeshObject(NMR::PModelResource pResource);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
Lib3MF_uint32 GetVertexCount ();
|
||||
|
||||
Lib3MF_uint32 GetTriangleCount ();
|
||||
|
||||
void SetVertex (const Lib3MF_uint32 nIndex, const sLib3MFPosition Coordinates);
|
||||
|
||||
sLib3MFPosition GetVertex(const Lib3MF_uint32 nIndex);
|
||||
|
||||
Lib3MF_uint32 AddVertex (const sLib3MFPosition Coordinates);
|
||||
|
||||
virtual void GetVertices(Lib3MF_uint64 nVerticesBufferSize, Lib3MF_uint64* pVerticesNeededCount, sLib3MFPosition * pVerticesBuffer);
|
||||
|
||||
sLib3MFTriangle GetTriangle (const Lib3MF_uint32 nIndex);
|
||||
|
||||
void SetTriangle (const Lib3MF_uint32 nIndex, const sLib3MFTriangle Indices);
|
||||
|
||||
Lib3MF_uint32 AddTriangle (const sLib3MFTriangle Indices);
|
||||
|
||||
void GetTriangleIndices (Lib3MF_uint64 nIndicesBufferSize, Lib3MF_uint64* pIndicesNeededCount, sLib3MFTriangle * pIndicesBuffer);
|
||||
|
||||
void SetGeometry(const Lib3MF_uint64 nVerticesBufferSize, const sLib3MFPosition * pVerticesBuffer, const Lib3MF_uint64 nIndicesBufferSize, const sLib3MFTriangle * pIndicesBuffer);
|
||||
|
||||
bool IsManifoldAndOriented();
|
||||
|
||||
bool IsMeshObject();
|
||||
|
||||
bool IsComponentsObject();
|
||||
|
||||
bool IsValid();
|
||||
|
||||
virtual IBeamLattice * BeamLattice();
|
||||
|
||||
void SetObjectLevelProperty(const Lib3MF_uint32 nUniqueResourceID, const Lib3MF_uint32 nPropertyID);
|
||||
|
||||
bool GetObjectLevelProperty(Lib3MF_uint32 & nUniqueResourceID, Lib3MF_uint32 & nPropertyID);
|
||||
|
||||
void SetTriangleProperties(const Lib3MF_uint32 nIndex, const sLib3MFTriangleProperties Properties);
|
||||
|
||||
void GetTriangleProperties(const Lib3MF_uint32 nIndex, sLib3MFTriangleProperties & sProperty);
|
||||
|
||||
void SetAllTriangleProperties(const Lib3MF_uint64 nPropertiesArrayBufferSize, const sLib3MFTriangleProperties * pPropertiesArrayBuffer);
|
||||
|
||||
void GetAllTriangleProperties(Lib3MF_uint64 nPropertiesArrayBufferSize, Lib3MF_uint64* pPropertiesArrayNeededCount, sLib3MFTriangleProperties * pPropertiesArrayBuffer);
|
||||
|
||||
void ClearAllProperties();
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_MESHOBJECT
|
||||
@@ -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 CMeshObjectIterator
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_MESHOBJECTITERATOR
|
||||
#define __LIB3MF_MESHOBJECTITERATOR
|
||||
|
||||
#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 CMeshObjectIterator
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CMeshObjectIterator : public virtual IMeshObjectIterator, 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.
|
||||
*/
|
||||
|
||||
IMeshObject * GetCurrentMeshObject ();
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_MESHOBJECTITERATOR
|
||||
@@ -0,0 +1,110 @@
|
||||
/*++
|
||||
|
||||
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 CMetaData
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_METADATA
|
||||
#define __LIB3MF_METADATA
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
#include "Model/Classes/NMR_ModelMetaData.h"
|
||||
|
||||
// Include custom headers here.
|
||||
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CMetaData
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CMetaData : public virtual IMetaData, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::PModelMetaData m_pMetaData;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CMetaData(NMR::PModelMetaData pMetaData);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
std::string GetNameSpace ();
|
||||
|
||||
void SetNameSpace (const std::string & sNameSpace);
|
||||
|
||||
std::string GetName ();
|
||||
|
||||
std::string GetKey();
|
||||
|
||||
void SetName (const std::string & sName);
|
||||
|
||||
bool GetMustPreserve ();
|
||||
|
||||
void SetMustPreserve (const bool bMustPreserve);
|
||||
|
||||
std::string GetType ();
|
||||
|
||||
void SetType (const std::string & sType);
|
||||
|
||||
std::string GetValue ();
|
||||
|
||||
void SetValue (const std::string & sValue);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_METADATA
|
||||
@@ -0,0 +1,101 @@
|
||||
/*++
|
||||
|
||||
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 CMetaDataGroup
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_METADATAGROUP
|
||||
#define __LIB3MF_METADATAGROUP
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
#include "Model/Classes/NMR_ModelMetaDataGroup.h"
|
||||
|
||||
// Include custom headers here.
|
||||
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CMetaDataGroup
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CMetaDataGroup : public virtual IMetaDataGroup, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::PModelMetaDataGroup m_pModelMetaDataGroup;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CMetaDataGroup(NMR::PModelMetaDataGroup pMetaDataGroup);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
virtual Lib3MF_uint32 GetMetaDataCount();
|
||||
|
||||
IMetaData * GetMetaData(const Lib3MF_uint32 nIndex);
|
||||
|
||||
IMetaData * GetMetaDataByKey(const std::string & sNameSpace, const std::string & sName);
|
||||
|
||||
void RemoveMetaDataByIndex(const Lib3MF_uint32 nIndex);
|
||||
|
||||
void RemoveMetaData(IMetaData* pTheMetaData);
|
||||
|
||||
IMetaData * AddMetaData(const std::string & sNameSpace, const std::string & sName, const std::string & sValue, const std::string & sType, const bool bMustPreserve);
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_METADATAGROUP
|
||||
@@ -0,0 +1,206 @@
|
||||
/*++
|
||||
|
||||
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 CModel
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_MODEL
|
||||
#define __LIB3MF_MODEL
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
|
||||
// Include custom headers here.
|
||||
#include "Model/Classes/NMR_Model.h"
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CModel
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CModel : public virtual IModel, public virtual CBase {
|
||||
private:
|
||||
|
||||
NMR::PModel m_model;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CModel();
|
||||
|
||||
NMR::CModel& model();
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
IPackagePart * RootModelPart() override;
|
||||
|
||||
IPackagePart * FindOrCreatePackagePart(const std::string & sAbsolutePath) override;
|
||||
|
||||
void SetUnit (const eLib3MFModelUnit eUnit) override;
|
||||
|
||||
eLib3MFModelUnit GetUnit() override;
|
||||
|
||||
std::string GetLanguage() override;
|
||||
|
||||
void SetLanguage(const std::string & sLanguage) override;
|
||||
|
||||
IWriter * QueryWriter(const std::string & sWriterClass) override;
|
||||
|
||||
IReader * QueryReader(const std::string & sReaderClass) override;
|
||||
|
||||
ITexture2D * GetTexture2DByID(const Lib3MF_uint32 nUniqueResourceID) override;
|
||||
|
||||
eLib3MFPropertyType GetPropertyTypeByID(const Lib3MF_uint32 nUniqueResourceID) override;
|
||||
|
||||
IBaseMaterialGroup * GetBaseMaterialGroupByID(const Lib3MF_uint32 nUniqueResourceID) override;
|
||||
|
||||
IMeshObject * GetMeshObjectByID(const Lib3MF_uint32 nUniqueResourceID) override;
|
||||
|
||||
IComponentsObject * GetComponentsObjectByID(const Lib3MF_uint32 nUniqueResourceID) override;
|
||||
|
||||
IColorGroup * GetColorGroupByID(const Lib3MF_uint32 nUniqueResourceID) override;
|
||||
|
||||
ITexture2DGroup * GetTexture2DGroupByID(const Lib3MF_uint32 nUniqueResourceID) override;
|
||||
|
||||
ICompositeMaterials * GetCompositeMaterialsByID(const Lib3MF_uint32 nUniqueResourceID) override;
|
||||
|
||||
IMultiPropertyGroup * GetMultiPropertyGroupByID(const Lib3MF_uint32 nUniqueResourceID) override;
|
||||
|
||||
ISliceStack * GetSliceStackByID(const Lib3MF_uint32 nUniqueResourceID) override;
|
||||
|
||||
std::string GetBuildUUID (bool & bHasUUID) override;
|
||||
|
||||
void SetBuildUUID (const std::string & sUUID) override;
|
||||
|
||||
IBuildItemIterator * GetBuildItems() override;
|
||||
|
||||
IResourceIterator * GetResources() override;
|
||||
|
||||
IObjectIterator * GetObjects() override;
|
||||
|
||||
IMeshObjectIterator * GetMeshObjects() override;
|
||||
|
||||
IComponentsObjectIterator * GetComponentsObjects() override;
|
||||
|
||||
ITexture2DIterator * GetTexture2Ds() override;
|
||||
|
||||
IBaseMaterialGroupIterator * GetBaseMaterialGroups() override;
|
||||
|
||||
IColorGroupIterator * GetColorGroups() override;
|
||||
|
||||
ITexture2DGroupIterator * GetTexture2DGroups() override;
|
||||
|
||||
ICompositeMaterialsIterator * GetCompositeMaterials() override;
|
||||
|
||||
IMultiPropertyGroupIterator * GetMultiPropertyGroups() override;
|
||||
|
||||
ISliceStackIterator * GetSliceStacks() override;
|
||||
|
||||
IModel * MergeToModel() override;
|
||||
|
||||
IMeshObject * AddMeshObject() override;
|
||||
|
||||
IComponentsObject * AddComponentsObject() override;
|
||||
|
||||
ISliceStack * AddSliceStack(const Lib3MF_double dZBottom) override;
|
||||
|
||||
ITexture2D * AddTexture2DFromAttachment(IAttachment* pTextureAttachment) override;
|
||||
|
||||
IBaseMaterialGroup * AddBaseMaterialGroup() override;
|
||||
|
||||
IColorGroup * AddColorGroup() override;
|
||||
|
||||
ITexture2DGroup * AddTexture2DGroup(ITexture2D* pTexture2DInstance) override;
|
||||
|
||||
ICompositeMaterials * AddCompositeMaterials(IBaseMaterialGroup* pBaseMaterialGroupInstance) override;
|
||||
|
||||
IMultiPropertyGroup * AddMultiPropertyGroup() override;
|
||||
|
||||
IBuildItem * AddBuildItem(IObject* pObject, const sLib3MFTransform Transform) override;
|
||||
|
||||
void RemoveBuildItem(IBuildItem* pBuildItemInstance) override;
|
||||
|
||||
IMetaDataGroup * GetMetaDataGroup() override;
|
||||
|
||||
IAttachment * AddAttachment(const std::string & sURI, const std::string & sRelationShipType) override;
|
||||
|
||||
void RemoveAttachment(IAttachment* pAttachmentInstance) override;
|
||||
|
||||
IAttachment * GetAttachment(const Lib3MF_uint32 nIndex) override;
|
||||
|
||||
IAttachment * FindAttachment(const std::string & sURI) override;
|
||||
|
||||
Lib3MF_uint32 GetAttachmentCount() override;
|
||||
|
||||
bool HasPackageThumbnailAttachment() override;
|
||||
|
||||
IAttachment * CreatePackageThumbnailAttachment() override;
|
||||
|
||||
IAttachment * GetPackageThumbnailAttachment() override;
|
||||
|
||||
void RemovePackageThumbnailAttachment() override;
|
||||
|
||||
void AddCustomContentType(const std::string & sExtension, const std::string & sContentType) override;
|
||||
|
||||
void RemoveCustomContentType(const std::string & sExtension) override;
|
||||
|
||||
Lib3MF::sBox GetOutbox() override;
|
||||
|
||||
IKeyStore * GetKeyStore();
|
||||
|
||||
void SetRandomNumberCallback(const Lib3MF::RandomNumberCallback pTheCallback, const Lib3MF_pvoid pUserData);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // __LIB3MF_MODEL
|
||||
@@ -0,0 +1,111 @@
|
||||
/*++
|
||||
|
||||
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 CMultiPropertyGroup
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_MULTIPROPERTYGROUP
|
||||
#define __LIB3MF_MULTIPROPERTYGROUP
|
||||
|
||||
#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_ModelMultiPropertyGroup.h"
|
||||
|
||||
#define LIB3MF_MAXMULTIPROPERTIES (1UL << 31)
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CMultiPropertyGroup
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CMultiPropertyGroup : public virtual IMultiPropertyGroup, public virtual CResource {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
NMR::CModelMultiPropertyGroupResource& multiPropertyGroup();
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CMultiPropertyGroup(NMR::PModelMultiPropertyGroupResource pResource);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
Lib3MF_uint32 GetCount ();
|
||||
|
||||
void GetAllPropertyIDs (Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer);
|
||||
|
||||
Lib3MF_uint32 AddMultiProperty (const Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer);
|
||||
|
||||
void SetMultiProperty (const Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer);
|
||||
|
||||
void GetMultiProperty (const Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer);
|
||||
|
||||
void RemoveMultiProperty (const Lib3MF_uint32 nPropertyID);
|
||||
|
||||
Lib3MF_uint32 GetLayerCount ();
|
||||
|
||||
Lib3MF_uint32 AddLayer (const sLib3MFMultiPropertyLayer TheLayer);
|
||||
|
||||
sLib3MFMultiPropertyLayer GetLayer (const Lib3MF_uint32 nLayerIndex);
|
||||
|
||||
void RemoveLayer (const Lib3MF_uint32 nLayerIndex);
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_MULTIPROPERTYGROUP
|
||||
@@ -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 CMultiPropertyGroupIterator
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_MULTIPROPERTYGROUPITERATOR
|
||||
#define __LIB3MF_MULTIPROPERTYGROUPITERATOR
|
||||
|
||||
#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 CMultiPropertyGroupIterator
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CMultiPropertyGroupIterator : public virtual IMultiPropertyGroupIterator, 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.
|
||||
*/
|
||||
|
||||
IMultiPropertyGroup * GetCurrentMultiPropertyGroup ();
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_MULTIPROPERTYGROUPITERATOR
|
||||
@@ -0,0 +1,135 @@
|
||||
/*++
|
||||
|
||||
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 CObject
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_OBJECT
|
||||
#define __LIB3MF_OBJECT
|
||||
|
||||
#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_ModelResource.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CObject
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CObject : public virtual IObject, public virtual CResource {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
|
||||
protected:
|
||||
NMR::CModelObject* object();
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CObject(NMR::PModelResource pResource);
|
||||
CObject() = delete;
|
||||
|
||||
static IObject* fnCreateObjectFromModelResource(NMR::PModelResource pResource, bool bFailIfUnkownClass);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
eLib3MFObjectType GetType ();
|
||||
|
||||
void SetType (const eLib3MFObjectType eObjectType);
|
||||
|
||||
std::string GetName ();
|
||||
|
||||
void SetName (const std::string & sName);
|
||||
|
||||
std::string GetPartNumber ();
|
||||
|
||||
void SetPartNumber (const std::string & sPartNumber);
|
||||
|
||||
virtual bool IsMeshObject ();
|
||||
|
||||
virtual bool IsComponentsObject ();
|
||||
|
||||
virtual IMeshObject * AsMeshObject();
|
||||
|
||||
virtual IComponentsObject * AsComponentsObject();
|
||||
|
||||
bool IsValid ();
|
||||
|
||||
void SetAttachmentAsThumbnail(IAttachment* pAttachment);
|
||||
|
||||
IAttachment * GetThumbnailAttachment();
|
||||
|
||||
void ClearThumbnailAttachment();
|
||||
|
||||
IMetaDataGroup * GetMetaDataGroup ();
|
||||
|
||||
std::string GetUUID(bool & bHasUUID);
|
||||
|
||||
void SetUUID(const std::string & sUUID);
|
||||
|
||||
void SetSlicesMeshResolution(const eLib3MFSlicesMeshResolution eMeshResolution);
|
||||
|
||||
eLib3MFSlicesMeshResolution GetSlicesMeshResolution();
|
||||
|
||||
bool HasSlices(const bool bRecursive);
|
||||
|
||||
void ClearSliceStack();
|
||||
|
||||
ISliceStack * GetSliceStack();
|
||||
|
||||
void AssignSliceStack(ISliceStack* pSliceStackInstance);
|
||||
|
||||
Lib3MF::sBox GetOutbox();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_OBJECT
|
||||
@@ -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 CObjectIterator
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_OBJECTITERATOR
|
||||
#define __LIB3MF_OBJECTITERATOR
|
||||
|
||||
#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 CObjectIterator
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CObjectIterator : public virtual IObjectIterator, 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.
|
||||
*/
|
||||
|
||||
IObject * GetCurrentObject ();
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_OBJECTITERATOR
|
||||
@@ -0,0 +1,92 @@
|
||||
/*++
|
||||
|
||||
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 CPackagePart
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_MODELPART
|
||||
#define __LIB3MF_MODELPART
|
||||
|
||||
#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_PackageResourceID.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CPackagePart
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CPackagePart : public virtual IPackagePart, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::PPackageModelPath m_pPath;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CPackagePart(NMR::PPackageModelPath pPath);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
std::string GetPath() override;
|
||||
|
||||
void SetPath(const std::string & sPath) override;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_MODELPART
|
||||
@@ -0,0 +1,114 @@
|
||||
/*++
|
||||
|
||||
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 CReader
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_READER
|
||||
#define __LIB3MF_READER
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
|
||||
// Include custom headers here.
|
||||
#include "Model/Reader/NMR_ModelReader.h"
|
||||
#include "Model/Reader/NMR_ModelReader_3MF_Native.h"
|
||||
#include "Model/Reader/NMR_ModelReader_STL.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CReader
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CReader : public virtual IReader, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::PModelReader m_pReader;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CReader(std::string sReaderClass, NMR::PModel model);
|
||||
|
||||
NMR::CModelReader& reader();
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
void ReadFromFile (const std::string & sFilename);
|
||||
|
||||
void ReadFromBuffer (const Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer);
|
||||
|
||||
void ReadFromCallback(const Lib3MFReadCallback pTheReadCallback, const Lib3MF_uint64 nStreamSize, const Lib3MFSeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData);
|
||||
|
||||
void AddRelationToRead (const std::string & sRelationShipType);
|
||||
|
||||
void SetProgressCallback(const Lib3MFProgressCallback pProgressCallback, const Lib3MF_pvoid pUserData);
|
||||
|
||||
void RemoveRelationToRead (const std::string & sRelationShipType);
|
||||
|
||||
void SetStrictModeActive (const bool bStrictModeActive);
|
||||
|
||||
bool GetStrictModeActive ();
|
||||
|
||||
std::string GetWarning (const Lib3MF_uint32 nIndex, Lib3MF_uint32 & nErrorCode);
|
||||
|
||||
Lib3MF_uint32 GetWarningCount ();
|
||||
|
||||
void AddKeyWrappingCallback(const std::string &sConsumerID, const Lib3MF::KeyWrappingCallback pTheCallback, const Lib3MF_pvoid pUserData);
|
||||
|
||||
void SetContentEncryptionCallback(const Lib3MF::ContentEncryptionCallback pTheCallback, const Lib3MF_pvoid pUserData);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_READER
|
||||
@@ -0,0 +1,97 @@
|
||||
/*++
|
||||
|
||||
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 CResource
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_RESOURCE
|
||||
#define __LIB3MF_RESOURCE
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
|
||||
// Include custom headers here.
|
||||
#include "Model/Classes/NMR_ModelResource.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CResource
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CResource : public virtual IResource, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::PModelResource m_pResource;
|
||||
|
||||
protected:
|
||||
|
||||
NMR::PModelResource resource();
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CResource() = delete;
|
||||
CResource(NMR::PModelResource pResource);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
Lib3MF_uint32 GetResourceID() override;
|
||||
|
||||
Lib3MF_uint32 GetUniqueResourceID() override;
|
||||
|
||||
virtual IObject * AsObject();
|
||||
|
||||
IPackagePart * PackagePart() override;
|
||||
|
||||
void SetPackagePart(IPackagePart* pPackagePath) override;
|
||||
|
||||
Lib3MF_uint32 GetModelResourceID() override;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_RESOURCE
|
||||
@@ -0,0 +1,74 @@
|
||||
/*++
|
||||
|
||||
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 CResourceData
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_RESOURCEDATA
|
||||
#define __LIB3MF_RESOURCEDATA
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
#include "Model/Classes/NMR_KeyStoreResourceData.h"
|
||||
// Include custom headers here.
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CResourceData
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CResourceData : public virtual IResourceData, public virtual CBase {
|
||||
private:
|
||||
NMR::PKeyStoreResourceData m_pResourceData;
|
||||
public:
|
||||
CResourceData(NMR::PKeyStoreResourceData resourceData);
|
||||
|
||||
|
||||
// Inherited via IResourceData
|
||||
IPackagePart * GetPath() override;
|
||||
|
||||
Lib3MF::eEncryptionAlgorithm GetEncryptionAlgorithm() override;
|
||||
|
||||
Lib3MF::eCompression GetCompression() override;
|
||||
|
||||
void GetAdditionalAuthenticationData(Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64 * pByteDataNeededCount, Lib3MF_uint8 * pByteDataBuffer) override;
|
||||
|
||||
inline NMR::PKeyStoreResourceData resourceData() const {
|
||||
return m_pResourceData;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,74 @@
|
||||
/*++
|
||||
|
||||
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 CResourceDataGroup
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_RESOURCEDATAGROUP
|
||||
#define __LIB3MF_RESOURCEDATAGROUP
|
||||
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
#include "Model/Classes/NMR_KeyStoreResourceDataGroup.h"
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CResourceData
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CResourceDataGroup : public virtual IResourceDataGroup, public virtual CBase {
|
||||
NMR::PKeyStoreResourceDataGroup m_pDataGroup;
|
||||
public:
|
||||
CResourceDataGroup(NMR::PKeyStoreResourceDataGroup const & dg);
|
||||
|
||||
// Inherited via IResourceDataGroup
|
||||
virtual IAccessRight * AddAccessRight(IConsumer * pConsumer, const Lib3MF::eWrappingAlgorithm eWrappingAlgorithm, const Lib3MF::eMgfAlgorithm eMgfAlgorithm, const Lib3MF::eDigestMethod eDigestMethod) override;
|
||||
virtual IAccessRight * FindAccessRightByConsumer(IConsumer * pConsumerInstance) override;
|
||||
virtual void RemoveAccessRight(IConsumer * pConsumerInstance) override;
|
||||
virtual std::string GetKeyUUID() override;
|
||||
|
||||
|
||||
inline NMR::PKeyStoreResourceDataGroup resourceDataGroup() const {
|
||||
return m_pDataGroup;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif // !__LIB3MF_RESOURCEDATAGROUP
|
||||
@@ -0,0 +1,93 @@
|
||||
/*++
|
||||
|
||||
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 CResourceIterator
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_RESOURCEITERATOR
|
||||
#define __LIB3MF_RESOURCEITERATOR
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
|
||||
// Include custom headers here.
|
||||
#include "Model/Classes/NMR_ModelResource.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CResourceIterator
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CResourceIterator : public virtual IResourceIterator, public virtual CBase {
|
||||
|
||||
private:
|
||||
std::vector<NMR::PModelResource> m_pResources;
|
||||
Lib3MF_int32 m_nCurrentIndex;
|
||||
|
||||
protected:
|
||||
virtual NMR::PModelResource GetCurrentResource();
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CResourceIterator();
|
||||
|
||||
void addResource(NMR::PModelResource pResource);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
bool MoveNext ();
|
||||
|
||||
bool MovePrevious ();
|
||||
|
||||
IResource * GetCurrent ();
|
||||
|
||||
IResourceIterator * Clone ();
|
||||
|
||||
Lib3MF_uint64 Count();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_RESOURCEITERATOR
|
||||
@@ -0,0 +1,104 @@
|
||||
/*++
|
||||
|
||||
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 CSlice
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_SLICE
|
||||
#define __LIB3MF_SLICE
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
|
||||
// Include custom headers here.
|
||||
#include "Model/Classes/NMR_ModelSlice.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CSlice
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CSlice : public virtual ISlice, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::PSlice m_pSlice;
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CSlice(NMR::PSlice);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
void SetVertices (const Lib3MF_uint64 nVerticesBufferSize, const sLib3MFPosition2D * pVerticesBuffer);
|
||||
|
||||
void GetVertices (Lib3MF_uint64 nVerticesBufferSize, Lib3MF_uint64* pVerticesNeededCount, sLib3MFPosition2D * pVerticesBuffer);
|
||||
|
||||
Lib3MF_uint64 GetVertexCount ();
|
||||
|
||||
Lib3MF_uint64 GetPolygonCount();
|
||||
|
||||
Lib3MF_uint64 AddPolygon(const Lib3MF_uint64 nIndicesBufferSize, const Lib3MF_uint32 * pIndicesBuffer);
|
||||
|
||||
void SetPolygonIndices (const Lib3MF_uint64 nIndex, const Lib3MF_uint64 nIndicesBufferSize, const Lib3MF_uint32 * pIndicesBuffer);
|
||||
|
||||
void GetPolygonIndices (const Lib3MF_uint64 nIndex, Lib3MF_uint64 nIndicesBufferSize, Lib3MF_uint64* pIndicesNeededCount, Lib3MF_uint32 * pIndicesBuffer);
|
||||
|
||||
Lib3MF_uint64 GetPolygonIndexCount (const Lib3MF_uint64 nIndex);
|
||||
|
||||
double GetZTop();
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_SLICE
|
||||
@@ -0,0 +1,108 @@
|
||||
/*++
|
||||
|
||||
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 CSliceStack
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_SLICESTACK
|
||||
#define __LIB3MF_SLICESTACK
|
||||
|
||||
#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_ModelSliceStack.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CSliceStack
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CSliceStack : public virtual ISliceStack, public virtual CResource {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
NMR::PModelSliceStack sliceStack();
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CSliceStack(NMR::PModelSliceStack pSliceStack);
|
||||
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
double GetBottomZ();
|
||||
|
||||
Lib3MF_uint64 GetSliceCount ();
|
||||
|
||||
ISlice * AddSlice(const double fZTop);
|
||||
|
||||
ISlice * GetSlice (const Lib3MF_uint64 nSliceIndex);
|
||||
|
||||
Lib3MF_uint64 GetSliceRefCount();
|
||||
|
||||
void AddSliceStackReference(ISliceStack* pTheSliceStack) ;
|
||||
|
||||
ISliceStack * GetSliceStackReference(const Lib3MF_uint64 nSliceRefIndex);
|
||||
|
||||
void CollapseSliceReferences();
|
||||
|
||||
virtual void SetOwnPath(const std::string & sPath);
|
||||
|
||||
virtual std::string GetOwnPath();
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_SLICESTACK
|
||||
@@ -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 CSliceStackIterator
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_SLICESTACKITERATOR
|
||||
#define __LIB3MF_SLICESTACKITERATOR
|
||||
|
||||
#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 CSliceStackIterator
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CSliceStackIterator : public virtual ISliceStackIterator, 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.
|
||||
*/
|
||||
|
||||
ISliceStack * GetCurrentSliceStack ();
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_SLICESTACKITERATOR
|
||||
@@ -0,0 +1,105 @@
|
||||
/*++
|
||||
|
||||
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 CTexture2D
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_TEXTURE2D
|
||||
#define __LIB3MF_TEXTURE2D
|
||||
|
||||
#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_ModelTexture2D.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CTexture2D
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CTexture2D : public virtual ITexture2D, public virtual CResource {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
NMR::PModelTexture2DResource texture();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CTexture2D(NMR::PModelTexture2DResource pResource);
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
IAttachment * GetAttachment ();
|
||||
|
||||
void SetAttachment (IAttachment* pAttachment);
|
||||
|
||||
eLib3MFTextureType GetContentType ();
|
||||
|
||||
void SetContentType (const eLib3MFTextureType eContentType);
|
||||
|
||||
void GetTileStyleUV (eLib3MFTextureTileStyle & eTileStyleU, eLib3MFTextureTileStyle & eTileStyleV);
|
||||
|
||||
void SetTileStyleUV (const eLib3MFTextureTileStyle eTileStyleU, const eLib3MFTextureTileStyle eTileStyleV);
|
||||
|
||||
eLib3MFTextureFilter GetFilter ();
|
||||
|
||||
void SetFilter (const eLib3MFTextureFilter eFilter);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_TEXTURE2D
|
||||
@@ -0,0 +1,101 @@
|
||||
/*++
|
||||
|
||||
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 CTexture2DGroup
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_TEXTURE2DGROUP
|
||||
#define __LIB3MF_TEXTURE2DGROUP
|
||||
|
||||
#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_ModelTexture2DGroup.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CTexture2DGroup
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CTexture2DGroup : public virtual ITexture2DGroup, public virtual CResource {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
NMR::CModelTexture2DGroupResource& texture2DGroup();
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CTexture2DGroup(NMR::PModelTexture2DGroupResource pResource);
|
||||
|
||||
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
ITexture2D * GetTexture2D();
|
||||
|
||||
Lib3MF_uint32 GetCount ();
|
||||
|
||||
void GetAllPropertyIDs (Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer);
|
||||
|
||||
Lib3MF_uint32 AddTex2Coord (const sLib3MFTex2Coord UVCoordinate);
|
||||
|
||||
sLib3MFTex2Coord GetTex2Coord (const Lib3MF_uint32 nPropertyID);
|
||||
|
||||
void RemoveTex2Coord(const Lib3MF_uint32 nPropertyID);
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_TEXTURE2DGROUP
|
||||
@@ -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 CTexture2DGroupIterator
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_TEXTURE2DGROUPITERATOR
|
||||
#define __LIB3MF_TEXTURE2DGROUPITERATOR
|
||||
|
||||
#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 CTexture2DGroupIterator
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CTexture2DGroupIterator : public virtual ITexture2DGroupIterator, 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.
|
||||
*/
|
||||
|
||||
ITexture2DGroup * GetCurrentTexture2DGroup ();
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_TEXTURE2DGROUPITERATOR
|
||||
@@ -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 CTexture2DIterator
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_TEXTURE2DITERATOR
|
||||
#define __LIB3MF_TEXTURE2DITERATOR
|
||||
|
||||
#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 CTexture2DIterator
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CTexture2DIterator : public virtual ITexture2DIterator, 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.
|
||||
*/
|
||||
|
||||
ITexture2D * GetCurrentTexture2D ();
|
||||
|
||||
};
|
||||
|
||||
} // namespace Impl
|
||||
} // namespace Lib3MF
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_TEXTURE2DITERATOR
|
||||
@@ -0,0 +1,60 @@
|
||||
/*++
|
||||
|
||||
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 file contains utilties used in the API of lib3mf
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_UTILS
|
||||
#define __LIB3MF_UTILS
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
|
||||
// Include custom headers here.
|
||||
#include "Common/Math/NMR_Matrix.h"
|
||||
#include "Common/NMR_SecureContentTypes.h"
|
||||
|
||||
namespace Lib3MF {
|
||||
|
||||
NMR::NMATRIX3 TransformToMatrix(const sLib3MFTransform Transform);
|
||||
|
||||
sLib3MFTransform MatrixToTransform(const NMR::NMATRIX3 matrix);
|
||||
|
||||
eLib3MFEncryptionAlgorithm translateEncryptionAlgorithm(const NMR::eKeyStoreEncryptAlgorithm algorithm);
|
||||
|
||||
NMR::eKeyStoreEncryptAlgorithm translateEncryptionAlgorithm(const eLib3MFEncryptionAlgorithm algorithm);
|
||||
|
||||
eLib3MFWrappingAlgorithm translateWrappingAlgorithm(const NMR::eKeyStoreWrapAlgorithm algorithm);
|
||||
|
||||
NMR::eKeyStoreWrapAlgorithm translateWrappingAlgorithm(const eLib3MFWrappingAlgorithm algorithm);
|
||||
|
||||
eLib3MFCompression translateCompression(bool compression);
|
||||
bool translateCompression(const eLib3MFCompression compression);
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIB3MF_UTILS
|
||||
@@ -0,0 +1,121 @@
|
||||
/*++
|
||||
|
||||
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 CWriter
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __LIB3MF_WRITER
|
||||
#define __LIB3MF_WRITER
|
||||
|
||||
#include "lib3mf_interfaces.hpp"
|
||||
#include "lib3mf_base.hpp"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4250)
|
||||
#endif
|
||||
|
||||
|
||||
// Include custom headers here.
|
||||
#include "Model/Writer/NMR_ModelWriter.h"
|
||||
#include "Model/Writer/NMR_ModelWriter_3MF_Native.h"
|
||||
#include "Model/Writer/NMR_ModelWriter_STL.h"
|
||||
|
||||
namespace NMR {
|
||||
class CExportStreamMemory;
|
||||
using PExportStreamMemory = std::shared_ptr<CExportStreamMemory>;
|
||||
}
|
||||
|
||||
namespace Lib3MF {
|
||||
namespace Impl {
|
||||
|
||||
/*************************************************************************************************************************
|
||||
Class declaration of CWriter
|
||||
**************************************************************************************************************************/
|
||||
|
||||
class CWriter : public virtual IWriter, public virtual CBase {
|
||||
private:
|
||||
|
||||
/**
|
||||
* Put private members here.
|
||||
*/
|
||||
NMR::PModelWriter m_pWriter;
|
||||
|
||||
NMR::PExportStreamMemory momentBuffer;
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Put protected members here.
|
||||
*/
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Put additional public members here. They will not be visible in the external API.
|
||||
*/
|
||||
CWriter(std::string sWriterClass, NMR::PModel model);
|
||||
|
||||
NMR::CModelWriter& writer();
|
||||
/**
|
||||
* Public member functions to implement.
|
||||
*/
|
||||
|
||||
void WriteToFile(const std::string & sFilename) override;
|
||||
|
||||
Lib3MF_uint64 GetStreamSize() override;
|
||||
|
||||
void WriteToBuffer(Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer) override;
|
||||
|
||||
void WriteToCallback(const Lib3MFWriteCallback pTheWriteCallback, const Lib3MFSeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) override;
|
||||
|
||||
void SetProgressCallback(const Lib3MFProgressCallback pProgressCallback, const Lib3MF_pvoid pUserData) override;
|
||||
|
||||
Lib3MF_uint32 GetDecimalPrecision() override;
|
||||
|
||||
void SetDecimalPrecision(const Lib3MF_uint32 nDecimalPrecision) override;
|
||||
|
||||
void AddKeyWrappingCallback(const std::string & sConsumerID, const Lib3MF::KeyWrappingCallback pTheCallback, const Lib3MF_pvoid pUserData);
|
||||
|
||||
void SetContentEncryptionCallback(const Lib3MF::ContentEncryptionCallback pTheCallback, const Lib3MF_pvoid pUserData);
|
||||
|
||||
void SetStrictModeActive(const bool bStrictModeActive);
|
||||
|
||||
bool GetStrictModeActive();
|
||||
|
||||
std::string GetWarning(const Lib3MF_uint32 nIndex, Lib3MF_uint32 & nErrorCode);
|
||||
|
||||
Lib3MF_uint32 GetWarningCount();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif // __LIB3MF_WRITER
|
||||
Reference in New Issue
Block a user