lib3mf :
- primo commit.
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2020 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
NMR_ModelReaderNode_BeamLattice1702_Ball.h covers the official 3MF beamlattice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_BEAMLATTICE1702_BALL
|
||||
#define __NMR_MODELREADERNODE_BEAMLATTICE1702_BALL
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
eModelBeamLatticeBallMode stringToBallMode(const nfChar * ballModeStr);
|
||||
|
||||
class CModelReaderNode_BeamLattice1702_Ball : public CModelReaderNode {
|
||||
private:
|
||||
nfInt32 m_nIndex;
|
||||
nfBool m_bHasRadius;
|
||||
nfDouble m_dRadius;
|
||||
nfBool m_bHasTag;
|
||||
nfInt32 m_nTag;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue, _In_z_ const nfChar * pNameSpace);
|
||||
public:
|
||||
CModelReaderNode_BeamLattice1702_Ball() = delete;
|
||||
CModelReaderNode_BeamLattice1702_Ball(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
void retrieveIndex(_Out_ nfInt32 & nIndex, nfInt32 nNodeCount);
|
||||
void retrieveRadius(_Out_ nfBool & bHasRadius, _Out_ nfDouble & dRadius);
|
||||
void retrieveTag(_Out_ nfBool & bHasTag, _Out_ nfInt32 & tag);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_BeamLattice1702_Ball> PModelReaderNode_BeamLattice1702_Ball;
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_BEAMLATTICE1702_BALL
|
||||
@@ -0,0 +1,59 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2020 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
NMR_ModelReaderNode_BeamLattice1702_BallRef.h covers the official 3MF beamlattice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_BEAMLATTICE1702_BALLREF
|
||||
#define __NMR_MODELREADERNODE_BEAMLATTICE1702_BALLREF
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_BeamLattice1702_BallRef : public CModelReaderNode {
|
||||
private:
|
||||
nfInt32 m_nIndex;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode_BeamLattice1702_BallRef() = delete;
|
||||
CModelReaderNode_BeamLattice1702_BallRef(_In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
void retrieveIndex(_Out_ nfInt32 & nIndex);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_BeamLattice1702_BallRef> PModelReaderNode_BeamLattice1702_BallRef;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_BEAMLATTICE1702_BALLREF
|
||||
@@ -0,0 +1,61 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2020 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_BeamLattice1702_Balls.h covers the official 3MF beamlattice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_BEAMLATTICE1702_BALLS
|
||||
#define __NMR_MODELREADERNODE_BEAMLATTICE1702_BALLS
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_BeamLattice1702_Balls : public CModelReaderNode {
|
||||
protected:
|
||||
CMesh* m_pMesh;
|
||||
CModel* m_pModel;
|
||||
|
||||
nfDouble m_dDefaultBallRadius;
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode_BeamLattice1702_Balls() = delete;
|
||||
CModelReaderNode_BeamLattice1702_Balls(_In_ CModel * pModel, _In_ CMesh * pMesh, _In_ nfDouble defaultBallRadius, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_BeamLattice1702_Balls> PModelReaderNode_BeamLattice1702_Balls;
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_BEAMLATTICE1702_BALLS
|
||||
@@ -0,0 +1,77 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
NMR_ModelReaderNode_BeamLattice1702_Beam.h covers the official 3MF beamlattice extension.
|
||||
(Initial version based on private beam extension)
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAM
|
||||
#define __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAM
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
eModelBeamLatticeCapMode stringToCapMode(const nfChar * capModeStr);
|
||||
|
||||
class CModelReaderNode_BeamLattice1702_Beam : public CModelReaderNode {
|
||||
private:
|
||||
nfInt32 m_nIndex1;
|
||||
nfInt32 m_nIndex2;
|
||||
nfBool m_bHasRadius1;
|
||||
nfBool m_bHasRadius2;
|
||||
nfDouble m_dRadius1;
|
||||
nfDouble m_dRadius2;
|
||||
nfBool m_bHasTag;
|
||||
nfInt32 m_nTag;
|
||||
nfBool m_bHasCap1;
|
||||
nfBool m_bHasCap2;
|
||||
eModelBeamLatticeCapMode m_eCapMode1;
|
||||
eModelBeamLatticeCapMode m_eCapMode2;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue, _In_z_ const nfChar * pNameSpace);
|
||||
public:
|
||||
CModelReaderNode_BeamLattice1702_Beam() = delete;
|
||||
CModelReaderNode_BeamLattice1702_Beam(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
void retrieveIndices(_Out_ nfInt32 & nIndex1, _Out_ nfInt32 & nIndex2, nfInt32 nNodeCount);
|
||||
void retrieveRadii(_Out_ nfBool & bHasRadius1, _Out_ nfDouble & dRadius1, _Out_ nfBool & bHasRadius2, _Out_ nfDouble & dRadius2);
|
||||
void retrieveCapModes(_Out_ nfBool & bHasCapMode1, _Out_ eModelBeamLatticeCapMode & eCapMode1, _Out_ nfBool & bHasCapMode2, _Out_ eModelBeamLatticeCapMode & eCapMode2);
|
||||
void retrieveTag(_Out_ nfBool & bHasTag, _Out_ nfInt32 & nTag);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_BeamLattice1702_Beam> PModelReaderNode_BeamLattice1702_Beam;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAM
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
NMR_ModelReaderNode_BeamLattice1702_BeamLattice.h covers the official 3MF beamlattice extension.
|
||||
(Initial version based on private beam extension)
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAMLATTICE
|
||||
#define __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAMLATTICE
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_BeamLattice1702_BeamLattice : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
CMesh * m_pMesh;
|
||||
|
||||
eModelBeamLatticeClipMode m_eClipMode;
|
||||
nfBool m_bHasClippingMeshID;
|
||||
ModelResourceID m_nClippingMeshID;
|
||||
nfBool m_bHasRepresentationMeshID;
|
||||
ModelResourceID m_nRepresentationMeshID;
|
||||
nfDouble m_dDefaultRadius;
|
||||
eModelBeamLatticeCapMode m_eDefaultCapMode;
|
||||
nfDouble m_dDefaultBallRadius;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue, _In_z_ const nfChar * pNameSpace);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode_BeamLattice1702_BeamLattice() = delete;
|
||||
CModelReaderNode_BeamLattice1702_BeamLattice(_In_ CModel * pModel, _In_ CMesh * pMesh, _In_ PModelWarnings pWarnings);
|
||||
|
||||
void retrieveClippingInfo(_Out_ eModelBeamLatticeClipMode &eClipMode, _Out_ nfBool & bHasClippingMode, _Out_ ModelResourceID & nClippingMeshID);
|
||||
void retrieveRepresentationInfo(_Out_ nfBool & bHasRepresentation, _Out_ ModelResourceID & nRepresentationMeshID);
|
||||
void validateBallOptions(_In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_BeamLattice1702_BeamLattice> PModelReaderNode_BeamLattice1702_BeamLattice;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAMLATTICE
|
||||
@@ -0,0 +1,66 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
NMR_ModelReaderNode_BeamLattice1702_BeamSet.h covers the official 3MF beamlattice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAMSET
|
||||
#define __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAMSET
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_BeamLattice1702_BeamSet : public CModelReaderNode {
|
||||
private:
|
||||
BEAMSET * m_pBeamSet;
|
||||
|
||||
std::unordered_set<std::string> * m_pUniqueIdentifiers;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue, _In_z_ const nfChar * pNameSpace);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode_BeamLattice1702_BeamSet() = delete;
|
||||
CModelReaderNode_BeamLattice1702_BeamSet(_In_ BEAMSET * pBeamSet, _In_ std::unordered_set<std::string> * pUniqueIdentifiers, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
// void retrieveId(_Out_ nfInt32 & nIndex1, _Out_ nfInt32 & nIndex2, nfInt32 nNodeCount);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_BeamLattice1702_BeamSet> PModelReaderNode_BeamLattice1702_BeamSet;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAMSET
|
||||
@@ -0,0 +1,63 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_BeamLattice1702_BeamSets.h covers the official 3MF beamlattice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAMSETS
|
||||
#define __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAMSETS
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_BeamLattice1702_BeamSets : public CModelReaderNode {
|
||||
private:
|
||||
std::unordered_set<std::string> m_uniqueIdentifiers; // Data structure used to ensure beamsets have unique identifiers
|
||||
protected:
|
||||
CMesh * m_pMesh;
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode_BeamLattice1702_BeamSets() = delete;
|
||||
CModelReaderNode_BeamLattice1702_BeamSets(_In_ CMesh * pMesh, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_BeamLattice1702_BeamSets> PModelReaderNode_BeamLattice1702_BeamSets;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAMSETS
|
||||
@@ -0,0 +1,65 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_BeamLattice1702_Beams.h covers the official 3MF beamlattice extension.
|
||||
(Initial version based on private beam extension)
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAMS
|
||||
#define __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAMS
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_BeamLattice1702_Beams : public CModelReaderNode {
|
||||
protected:
|
||||
CMesh * m_pMesh;
|
||||
CModel * m_pModel;
|
||||
|
||||
nfDouble m_dDefaultRadius;
|
||||
eModelBeamLatticeCapMode m_eDefaultCapMode;
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode_BeamLattice1702_Beams() = delete;
|
||||
CModelReaderNode_BeamLattice1702_Beams(_In_ CModel * pModel, _In_ CMesh * pMesh, _In_ nfDouble defaultRadius, _In_ eModelBeamLatticeCapMode defaultCapMode, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_BeamLattice1702_Beams> PModelReaderNode_BeamLattice1702_Beams;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_BEAMLATTICE1702_BEAMS
|
||||
@@ -0,0 +1,59 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
NMR_ModelReaderNode_BeamLattice1702_Ref.h covers the official 3MF beamlattice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_BEAMLATTICE1702_REF
|
||||
#define __NMR_MODELREADERNODE_BEAMLATTICE1702_REF
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_BeamLattice1702_Ref : public CModelReaderNode {
|
||||
private:
|
||||
nfInt32 m_nIndex;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode_BeamLattice1702_Ref() = delete;
|
||||
CModelReaderNode_BeamLattice1702_Ref(_In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
void retrieveIndex(_Out_ nfInt32 & nIndex);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_BeamLattice1702_Ref> PModelReaderNode_BeamLattice1702_Ref;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_BEAMLATTICE1702_REF
|
||||
@@ -0,0 +1,76 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_KeyStoreOpcPackageReader.h defines an OPC Package reader in a portable way.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef NMR_KEYSTOREOPCPACKAGEREADER
|
||||
#define NMR_KEYSTOREOPCPACKAGEREADER
|
||||
|
||||
#include <memory>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "Common/NMR_SecureContentTypes.h"
|
||||
#include "Common/OPC/NMR_IOpcPackageReader.h"
|
||||
#include "Common/Platform/NMR_ImportStream.h"
|
||||
#include "Common/3MF_ProgressMonitor.h"
|
||||
#include "Common/NMR_ModelWarnings.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelContext;
|
||||
|
||||
|
||||
class CKeyStoreOpcPackageReader: public IOpcPackageReader {
|
||||
private:
|
||||
CModelContext const & m_pContext;
|
||||
PIOpcPackageReader m_pPackageReader;
|
||||
std::map<std::string, POpcPackagePart> m_encryptedParts;
|
||||
protected:
|
||||
NMR::PImportStream findKeyStoreStream();
|
||||
void parseKeyStore(NMR::PImportStream keyStoreStream);
|
||||
void openAllResourceDataGroups();
|
||||
void checkAuthenticatedTags();
|
||||
public:
|
||||
CKeyStoreOpcPackageReader(_In_ PImportStream pImportStream, _In_ CModelContext const & context);
|
||||
|
||||
// Inherited via IOpcPackageReader
|
||||
virtual COpcPackageRelationship * findRootRelation(std::string sRelationType, nfBool bMustBeUnique) override;
|
||||
virtual POpcPackagePart createPart(std::string sPath) override;
|
||||
virtual nfUint64 getPartSize(std::string sPath) override;
|
||||
|
||||
void close() override;
|
||||
};
|
||||
|
||||
using PKeyStoreOpcPackageReader = std::shared_ptr<CKeyStoreOpcPackageReader>;
|
||||
|
||||
}
|
||||
|
||||
#endif // !NMR_KEYSTOREOPCPACKAGEREADER
|
||||
@@ -0,0 +1,70 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReader.h defines the Model Reader Class.
|
||||
A model reader reads in a model file and generates an in-memory representation of it.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADER
|
||||
#define __NMR_MODELREADER
|
||||
|
||||
#include "Model/Classes/NMR_ModelContext.h"
|
||||
#include "Common/NMR_ModelWarnings.h"
|
||||
#include "Common/MeshImport/NMR_MeshImporter.h"
|
||||
|
||||
#include <list>
|
||||
#include <set>
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReader : public CModelContext {
|
||||
protected:
|
||||
PImportStream m_pPrintTicketStream;
|
||||
std::string m_sPrintTicketContentType;
|
||||
std::set<std::string> m_RelationsToRead;
|
||||
|
||||
|
||||
void readFromMeshImporter(_In_ CMeshImporter * pImporter);
|
||||
public:
|
||||
CModelReader() = delete;
|
||||
CModelReader(_In_ PModel pModel);
|
||||
virtual ~CModelReader() = default;
|
||||
|
||||
virtual void readStream(_In_ PImportStream pStream) = 0;
|
||||
PImportStream retrievePrintTicket(_Out_ std::string & sContentType);
|
||||
|
||||
void addRelationToRead(_In_ std::string sRelationShipType);
|
||||
void removeRelationToRead(_In_ std::string sRelationShipType);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReader> PModelReader;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADER
|
||||
@@ -0,0 +1,80 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode.h defines the Model Reader Node Class.
|
||||
A model reader node is an abstract base class for all XML nodes of a 3MF Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE
|
||||
#define __NMR_MODELREADERNODE
|
||||
|
||||
#include "Model/Classes/NMR_Model.h"
|
||||
#include "Common/NMR_ModelWarnings.h"
|
||||
#include "Common/Platform/NMR_XmlReader.h"
|
||||
#include "Common/3MF_ProgressMonitor.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode {
|
||||
private:
|
||||
std::string m_sName;
|
||||
nfBool m_bParsedAttributes;
|
||||
nfBool m_bParsedContent;
|
||||
nfBool m_bIsEmptyElement;
|
||||
|
||||
protected:
|
||||
PProgressMonitor m_pProgressMonitor;
|
||||
PModelWarnings m_pWarnings;
|
||||
|
||||
void parseName(_In_ CXmlReader * pXMLReader);
|
||||
void parseAttributes(_In_ CXmlReader * pXMLReader);
|
||||
void parseContent(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnText(_In_z_ const nfChar * pText, _In_ CXmlReader * pXMLReader);
|
||||
virtual void OnEndElement(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
virtual void OnNSAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue, _In_z_ const nfChar * pNameSpace);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode() = delete;
|
||||
CModelReaderNode(_In_ PModelWarnings pWarnings, _In_ PProgressMonitor pProgressMonitor = nullptr);
|
||||
virtual ~CModelReaderNode() = default;
|
||||
|
||||
std::string getName();
|
||||
PModelWarnings getWarnings() const;
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader) = 0;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode> PModelReaderNode;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE
|
||||
@@ -0,0 +1,66 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_KeyStoreBase.h defines the base class for all Model Reader Node classes that are related to <keystore>.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_KEYSTOREBASE
|
||||
#define __NMR_MODELREADERNODE_KEYSTOREBASE
|
||||
|
||||
#include "Common/NMR_Local.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_Model.h"
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
#include <memory>
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_KeyStoreBase : public CModelReaderNode {
|
||||
protected:
|
||||
CKeyStore * const m_pKeyStore;
|
||||
CModel * const m_pModel;
|
||||
|
||||
public:
|
||||
CModelReaderNode_KeyStoreBase() = delete;
|
||||
CModelReaderNode_KeyStoreBase(_In_ CModel * const pModel, _In_ CKeyStore * const pKeyStore, _In_ PModelWarnings pWarnings);
|
||||
|
||||
inline CKeyStore * const keystore() const {
|
||||
return m_pKeyStore;
|
||||
}
|
||||
|
||||
inline CModel * const model() const {
|
||||
return m_pModel;
|
||||
}
|
||||
|
||||
template<class T> std::shared_ptr<T> extractCopy() const {
|
||||
return std::make_shared<T>(model(), keystore(), getWarnings());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_KEYSTOREBASE
|
||||
@@ -0,0 +1,83 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_ModelBase.h defines the Model Reader Model Node Class.
|
||||
A model reader model node is a parser for the root node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_MODELBASE
|
||||
#define __NMR_MODELREADERNODE_MODELBASE
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_ModelBase : public CModelReaderNode {
|
||||
protected:
|
||||
CModel * m_pModel;
|
||||
std::string m_sRequiredExtensions;
|
||||
std::map<std::string, std::string> m_ListedExtensions;
|
||||
|
||||
std::string m_sPath;
|
||||
nfBool m_bHasResources;
|
||||
nfBool m_bHasBuild;
|
||||
|
||||
nfBool m_bWithinIgnoredElement;
|
||||
nfBool m_bIgnoreBuild;
|
||||
nfBool m_bIgnoreMetaData;
|
||||
|
||||
nfBool m_bHaveWarnedAboutV093;
|
||||
|
||||
void ReadMetaDataNode(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
virtual void CheckRequiredExtensions();
|
||||
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue, _In_z_ const nfChar * pNameSpace);
|
||||
public:
|
||||
CModelReaderNode_ModelBase() = delete;
|
||||
CModelReaderNode_ModelBase(_In_ CModel *pModel, _In_ PModelWarnings pWarnings, const std::string sPath, _In_ PProgressMonitor pProgressMonitor);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
nfBool getHasResources();
|
||||
nfBool getHasBuild();
|
||||
|
||||
nfBool ignoreBuild();
|
||||
void setIgnoreBuild(bool bIgnoreBuild);
|
||||
nfBool ignoreMetaData();
|
||||
void setIgnoreMetaData(bool bIgnoreMetaData);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_ModelBase> PModelReaderNode_ModelBase;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_MODELBASE
|
||||
@@ -0,0 +1,39 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_KeyStoreKeyValue.h defines the Model Reader Node class that is related to <keyvalue>.
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
#if defined( _WIN64)
|
||||
#include "NMR_ModelReaderNode_StringValue_x64.h"
|
||||
#else
|
||||
#include "NMR_ModelReaderNode_StringValue_x32.h"
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_KeyStoreKeyValue.h defines the Model Reader Node class that is related to <keyvalue>.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_KEYSTOREKEYVALUE
|
||||
#define __NMR_MODELREADERNODE_KEYSTOREKEYVALUE
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
#include "Common/NMR_Local.h"
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_StringValue: public CModelReaderNode {
|
||||
private:
|
||||
std::string m_sKeyValue;
|
||||
protected:
|
||||
void OnText(_In_z_ const nfChar * pText, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode_StringValue() = delete;
|
||||
using CModelReaderNode::CModelReaderNode;
|
||||
|
||||
CModelReaderNode_StringValue(_In_ PModelWarnings pWarnings, _In_ PProgressMonitor pProgressMonitor = nullptr):
|
||||
CModelReaderNode( pWarnings, pProgressMonitor){};
|
||||
|
||||
std::string const & getValue() const;
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_StringValue> PModelReaderNode_StringValue;
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_KEYSTOREKEYVALUE
|
||||
@@ -0,0 +1,59 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_KeyStoreKeyValue.h defines the Model Reader Node class that is related to <keyvalue>.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_KEYSTOREKEYVALUE
|
||||
#define __NMR_MODELREADERNODE_KEYSTOREKEYVALUE
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
#include "Common/NMR_Local.h"
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_StringValue: public CModelReaderNode {
|
||||
private:
|
||||
std::string m_sKeyValue;
|
||||
protected:
|
||||
void OnText(_In_z_ const nfChar * pText, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode_StringValue() = delete;
|
||||
using CModelReaderNode::CModelReaderNode;
|
||||
|
||||
std::string const & getValue() const;
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_StringValue> PModelReaderNode_StringValue;
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_KEYSTOREKEYVALUE
|
||||
@@ -0,0 +1,61 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReader_3MF.h defines the Model Reader Class for
|
||||
3MF Files. A 3MF model reader reads in a 3MF file and generates an in-memory representation of it.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADER_3MF
|
||||
#define __NMR_MODELREADER_3MF
|
||||
|
||||
#include "Model/Reader/NMR_ModelReader.h"
|
||||
#include "Common/NMR_SecureContentTypes.h"
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReader_3MF : public CModelReader {
|
||||
protected:
|
||||
virtual PImportStream extract3MFOPCPackage(_In_ PImportStream pPackageStream) = 0;
|
||||
virtual void release3MFOPCPackage() = 0;
|
||||
|
||||
public:
|
||||
CModelReader_3MF() = delete;
|
||||
CModelReader_3MF(_In_ PModel pModel);
|
||||
|
||||
virtual void readStream(_In_ PImportStream pStream);
|
||||
virtual void addTextureAttachment(_In_ std::string sPath, _In_ PImportStream pStream);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReader_3MF> PModelReader_3MF;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADER_3MF
|
||||
@@ -0,0 +1,70 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReader_3MF_Native.h implements the Model Reader Class.
|
||||
A model reader reads in a 3MF file and generates an in-memory representation of it.
|
||||
It uses libzip and irrxml to parse the OPC package.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADER_3MF_NATIVE
|
||||
#define __NMR_MODELREADER_3MF_NATIVE
|
||||
|
||||
#include "Model/Reader/NMR_ModelReader_3MF.h"
|
||||
#include "Model/Reader/NMR_ModelReader.h"
|
||||
#include "Model/Classes/NMR_Model.h"
|
||||
#include "Common/Platform/NMR_XmlReader.h"
|
||||
#include "Model/Reader/NMR_KeyStoreOpcPackageReader.h"
|
||||
#include "Common/OPC/NMR_OpcPackagePart.h"
|
||||
#include <list>
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReader_3MF_Native : public CModelReader_3MF {
|
||||
private:
|
||||
PKeyStoreOpcPackageReader m_pPackageReader;
|
||||
|
||||
protected:
|
||||
void extractCustomDataFromRelationships(_In_ std::string& sTargetPartURIDir, _In_ COpcPackagePart * pModelPart);
|
||||
void extractTexturesFromRelationships(_In_ std::string& sTargetPartURIDir, _In_ COpcPackagePart * pModelPart);
|
||||
void extractModelDataFromRelationships(_In_ std::string& sTargetPartURIDir, _In_ COpcPackagePart * pModelPart);
|
||||
void checkContentTypes();
|
||||
|
||||
virtual PImportStream extract3MFOPCPackage(_In_ PImportStream pPackageStream);
|
||||
virtual void release3MFOPCPackage();
|
||||
|
||||
public:
|
||||
CModelReader_3MF_Native() = delete;
|
||||
CModelReader_3MF_Native(_In_ PModel pModel);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReader_3MF_Native> PModelReader_3MF_Native;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADER_3MF_NATIVE
|
||||
@@ -0,0 +1,83 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReader_ColorMapping.h defines the Model Reader Color Mapping Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADER_COLORMAPPING
|
||||
#define __NMR_MODELREADER_COLORMAPPING
|
||||
|
||||
#include "Common/NMR_Types.h"
|
||||
#include "Common/NMR_Local.h"
|
||||
#include "Model/Classes/NMR_ModelTypes.h"
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
namespace NMR {
|
||||
|
||||
typedef struct {
|
||||
ModelResourceID m_nResourceID;
|
||||
ModelResourceIndex m_nResourceIndex;
|
||||
} READERCOLORMAPPINGTREEENTRY;
|
||||
|
||||
bool operator< (_In_ const READERCOLORMAPPINGTREEENTRY & entry1, _In_ const READERCOLORMAPPINGTREEENTRY & entry2);
|
||||
|
||||
class CModelReader_ColorMapping {
|
||||
protected:
|
||||
std::map <READERCOLORMAPPINGTREEENTRY, nfColor> m_ColorEntries;
|
||||
std::map <ModelResourceID, nfInt32> m_ResourceIDs;
|
||||
std::map <ModelResourceID, ModelResourceID> m_TextureMappings;
|
||||
std::map <ModelResourceID, ModelResourceIndex> m_MaterialMappings;
|
||||
public:
|
||||
CModelReader_ColorMapping();
|
||||
|
||||
void registerColor(_In_ ModelResourceID nResourceID, _In_ ModelResourceIndex nResourceIndex, _In_ nfColor cColor);
|
||||
nfBool findColor(_In_ ModelResourceID nResourceID, _In_ ModelResourceIndex nResourceIndex, _Out_ nfColor & cColor);
|
||||
|
||||
nfBool hasResource(_In_ ModelResourceID nResourceID);
|
||||
|
||||
void registerTextureReference(_In_ ModelResourceID nResourceID, _In_ ModelResourceID nTextureID);
|
||||
nfBool hasTextureReference(_In_ ModelResourceID nResourceID);
|
||||
ModelResourceID getTextureReference(_In_ ModelResourceID nResourceID);
|
||||
|
||||
void registerMaterialReference(_In_ ModelResourceID nResourceID, _In_ ModelResourceIndex nMaterialIndex);
|
||||
nfBool hasMaterialReference(_In_ ModelResourceID nResourceID);
|
||||
nfBool getMaterialReference(_In_ ModelResourceID nResourceID, _Out_ ModelResourceIndex & nMaterialIndex);
|
||||
|
||||
nfBool retrieveAResource(_Out_ ModelResourceID& nResourceID);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReader_ColorMapping> PModelReader_ColorMapping;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADER_COLORMAPPING
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReader_InstructionElement.h defines a reader for an instruction element
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADER_INSTRUCTIONELEMENT
|
||||
#define __NMR_MODELREADER_INSTRUCTIONELEMENT
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReader_InstructionElement : public CModelReaderNode {
|
||||
private:
|
||||
std::string m_sEncoding;
|
||||
std::string m_sName;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReader_InstructionElement() = delete;
|
||||
CModelReader_InstructionElement(_In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseName(_In_ CXmlReader * pXMLReader);
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReader_InstructionElement> PModelReader_InstructionElement;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADER_INSTRUCTIONELEMENT
|
||||
@@ -0,0 +1,58 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReader_STL.h defines the Model Reader Class for
|
||||
STL Files. A STL model reader reads in a STL file and generates an in-memory representation of it.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADER_STL
|
||||
#define __NMR_MODELREADER_STL
|
||||
|
||||
#include "Model/Reader/NMR_ModelReader.h"
|
||||
#include "Common/MeshImport/NMR_MeshImporter.h"
|
||||
|
||||
#include <list>
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReader_STL : public CModelReader {
|
||||
protected:
|
||||
|
||||
public:
|
||||
CModelReader_STL() = delete;
|
||||
CModelReader_STL(_In_ PModel pModel);
|
||||
|
||||
virtual void readStream(_In_ PImportStream pStream);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReader_STL> PModelReader_STL;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADER
|
||||
@@ -0,0 +1,77 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReader_TexcoordMapping.h defines the Model Reader Texture Mapping Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADER_TEXCOORDMAPPING
|
||||
#define __NMR_MODELREADER_TEXCOORDMAPPING
|
||||
|
||||
#include "Common/NMR_Types.h"
|
||||
#include "Common/NMR_Local.h"
|
||||
#include "Model/Classes/NMR_ModelTypes.h"
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
namespace NMR {
|
||||
|
||||
typedef struct {
|
||||
ModelResourceID m_nResourceID;
|
||||
ModelResourceIndex m_nResourceIndex;
|
||||
} READERTEXCOORDMAPPINGTREEENTRY;
|
||||
|
||||
typedef struct {
|
||||
ModelResourceID m_nTextureID;
|
||||
nfFloat m_fU;
|
||||
nfFloat m_fV;
|
||||
} READERTEXCOORDMAPPINGVALUE;
|
||||
|
||||
bool operator< (_In_ const READERTEXCOORDMAPPINGTREEENTRY & entry1, _In_ const READERTEXCOORDMAPPINGTREEENTRY & entry2);
|
||||
|
||||
class CModelReader_TexCoordMapping {
|
||||
protected:
|
||||
std::map <READERTEXCOORDMAPPINGTREEENTRY, READERTEXCOORDMAPPINGVALUE> m_TexCoordEntries;
|
||||
std::map <ModelResourceID, nfInt32> m_ResourceIDs;
|
||||
public:
|
||||
CModelReader_TexCoordMapping();
|
||||
|
||||
void registerTexCoords(_In_ ModelResourceID nResourceID, _In_ ModelResourceIndex nResourceIndex, _In_ ModelResourceID nTextureID, _In_ nfFloat fU, _In_ nfFloat fV);
|
||||
nfBool findTexCoords(_In_ ModelResourceID nResourceID, _In_ ModelResourceIndex nResourceIndex, _Out_ ModelResourceID & nTextureID, _Out_ nfFloat & fU, _Out_ nfFloat & fV);
|
||||
|
||||
nfBool hasResource(_In_ ModelResourceID nResourceID);
|
||||
nfBool retrieveAResource(_Out_ ModelResourceID& nResourceID);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReader_TexCoordMapping> PModelReader_TexCoordMapping;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADER_TEXCOORDMAPPING
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_KeyStore.h defines the Model Reader Node class that is related to <keystore>.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_KEYSTORE
|
||||
#define __NMR_MODELREADERNODE_KEYSTORE
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_KeyStore: public CModelReaderNode_KeyStoreBase {
|
||||
private:
|
||||
PUUID m_UUID;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode_KeyStore() = delete;
|
||||
using CModelReaderNode_KeyStoreBase::CModelReaderNode_KeyStoreBase;
|
||||
|
||||
CModelReaderNode_KeyStore(_In_ CModel * const pModel, _In_ CKeyStore * const pKeyStore, _In_ PModelWarnings pWarnings):
|
||||
CModelReaderNode_KeyStoreBase( pModel,pKeyStore, pWarnings){};
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_KeyStore> PModelReaderNode_KeyStore;
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_KEYSTORE
|
||||
@@ -0,0 +1,70 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_KeyStoreDecryptRight.h defines the Model Reader Node class that is related to <decryptright>.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_KEYSTOACCESSRIGHT
|
||||
#define __NMR_MODELREADERNODE_KEYSTOACCESSRIGHT
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
#include "Model/Classes/NMR_KeyStoreAccessRight.h"
|
||||
#include "Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreKEKParams.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_KeyStoreAccessRight : public CModelReaderNode_KeyStoreBase {
|
||||
private:
|
||||
nfBool m_bHasParams = false;
|
||||
nfBool m_bHasConsumerIndex = false;
|
||||
nfBool m_bHasCipherData = false;
|
||||
nfUint64 m_nConsumerIndex = 0;
|
||||
KEKPARAMS m_sParams;
|
||||
std::vector<nfByte> m_rgCipherValue;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode_KeyStoreAccessRight() = delete;
|
||||
using CModelReaderNode_KeyStoreBase::CModelReaderNode_KeyStoreBase;
|
||||
|
||||
CModelReaderNode_KeyStoreAccessRight(_In_ CModel * const pModel, _In_ CKeyStore * const pKeyStore, _In_ PModelWarnings pWarnings):
|
||||
CModelReaderNode_KeyStoreBase( pModel, pKeyStore, pWarnings){};
|
||||
|
||||
PKeyStoreAccessRight getAccessRight();
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_KeyStoreAccessRight> PModelReaderNode_KeyStoreAccessRight;
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_KEYSTOACCESSRIGHT
|
||||
@@ -0,0 +1,71 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_KeyStoreCipherValue.h defines the Model Reader Node class that is related to <xenc:CipherValue>.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_KEYSTORECEKPARAMS
|
||||
#define __NMR_MODELREADERNODE_KEYSTORECEKPARAMS
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
#include "Model/Classes/NMR_KeyStoreAccessRight.h"
|
||||
#include "Model/Classes/NMR_KeyStoreCEKParams.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_KeyStoreCEKParams: public CModelReaderNode_KeyStoreBase {
|
||||
private:
|
||||
nfBool m_bCompressed = false;
|
||||
eKeyStoreEncryptAlgorithm m_eAlgorithm = eKeyStoreEncryptAlgorithm::AES256_GCM;
|
||||
std::vector<nfByte> m_iv;
|
||||
std::vector<nfByte> m_tag;
|
||||
std::vector<nfByte> m_aad;
|
||||
nfBool m_bHasAlgorithm = false;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
|
||||
public:
|
||||
CModelReaderNode_KeyStoreCEKParams() = delete;
|
||||
using CModelReaderNode_KeyStoreBase::CModelReaderNode_KeyStoreBase;
|
||||
|
||||
CModelReaderNode_KeyStoreCEKParams(_In_ CModel * const pModel, _In_ CKeyStore * const pKeyStore, _In_ PModelWarnings pWarnings):
|
||||
CModelReaderNode_KeyStoreBase( pModel, pKeyStore, pWarnings){};
|
||||
|
||||
PKeyStoreCEKParams getCEKParams();
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
typedef std::shared_ptr <CModelReaderNode_KeyStoreCEKParams> PModelReaderNode_KeyStoreCEKParams;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_KEYSTORECEKPARAMS
|
||||
@@ -0,0 +1,64 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_KeyStoreCipherValue.h defines the Model Reader Node class that is related to <xenc:CipherValue>.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_KEYSTORECIPHERVALUE
|
||||
#define __NMR_MODELREADERNODE_KEYSTORECIPHERVALUE
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
#include "Model/Classes/NMR_KeyStoreAccessRight.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_KeyStoreCipherValue: public CModelReaderNode_KeyStoreBase {
|
||||
private:
|
||||
std::vector<nfByte> m_sCipherValue;
|
||||
protected:
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode_KeyStoreCipherValue() = delete;
|
||||
using CModelReaderNode_KeyStoreBase::CModelReaderNode_KeyStoreBase;
|
||||
|
||||
CModelReaderNode_KeyStoreCipherValue(_In_ CModel * const pModel, _In_ CKeyStore * const pKeyStore, _In_ PModelWarnings pWarnings) :
|
||||
CModelReaderNode_KeyStoreBase( pModel, pKeyStore, pWarnings) {};
|
||||
|
||||
|
||||
std::vector<nfByte> const & getCipherValue() const;
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_KeyStoreCipherValue> PModelReaderNode_KeyStoreCipherValue;
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_KEYSTORECIPHERVALUE
|
||||
@@ -0,0 +1,63 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_KeyStoreConsumer.h defines the Model Reader Node class that is related to <consumer>.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_KEYSTORECONSUMER
|
||||
#define __NMR_MODELREADERNODE_KEYSTORECONSUMER
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_KeyStoreConsumer: public CModelReaderNode_KeyStoreBase {
|
||||
private:
|
||||
std::string m_sConsumerID;
|
||||
std::string m_sKeyID;
|
||||
std::string m_sKeyValue;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode_KeyStoreConsumer() = delete;
|
||||
using CModelReaderNode_KeyStoreBase::CModelReaderNode_KeyStoreBase;
|
||||
|
||||
CModelReaderNode_KeyStoreConsumer(_In_ CModel * const pModel, _In_ CKeyStore * const pKeyStore, _In_ PModelWarnings pWarnings) :
|
||||
CModelReaderNode_KeyStoreBase( pModel, pKeyStore, pWarnings){};
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_KeyStoreConsumer> PModelReaderNode_KeyStoreConsumer;
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_KEYSTORECONSUMER
|
||||
@@ -0,0 +1,77 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_KeyStoreCipherValue.h defines the Model Reader Node class that is related to <xenc:CipherValue>.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_KEYSTOREKEKPARAMS
|
||||
#define __NMR_MODELREADERNODE_KEYSTOREKEKPARAMS
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
#include "Common/NMR_SecureContentTypes.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
namespace ParserUtils {
|
||||
eKeyStoreWrapAlgorithm parseWrapAlgorithm(std::string const & value, bool & hasMgf1);
|
||||
eKeyStoreMaskGenerationFunction parseMgf(std::string const & value);
|
||||
eKeyStoreMessageDigest parseMessageDigest(std::string const & value);
|
||||
}
|
||||
|
||||
struct KEKPARAMS {
|
||||
eKeyStoreWrapAlgorithm m_eAlgorithm;
|
||||
eKeyStoreMaskGenerationFunction m_eMgf;
|
||||
eKeyStoreMessageDigest m_eDigest;
|
||||
};
|
||||
|
||||
class CModelReaderNode_KeyStoreKEKParams: public CModelReaderNode_KeyStoreBase {
|
||||
private:
|
||||
KEKPARAMS m_sKekParams = KEKPARAMS{ eKeyStoreWrapAlgorithm::RSA_OAEP, eKeyStoreMaskGenerationFunction::MGF1_SHA1, eKeyStoreMessageDigest::SHA1 };
|
||||
nfBool m_bAlgHasMgf = false;
|
||||
nfBool m_bHasAlgorithm = false;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode_KeyStoreKEKParams() = delete;
|
||||
using CModelReaderNode_KeyStoreBase::CModelReaderNode_KeyStoreBase;
|
||||
|
||||
CModelReaderNode_KeyStoreKEKParams(_In_ CModel * const pModel, _In_ CKeyStore * const pKeyStore, _In_ PModelWarnings pWarnings):
|
||||
CModelReaderNode_KeyStoreBase( pModel, pKeyStore, pWarnings) {};
|
||||
|
||||
KEKPARAMS getKekParams();
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_KeyStoreKEKParams> PModelReaderNode_KeyStoreKEKParams;
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_KEYSTOREKEKPARAMS
|
||||
@@ -0,0 +1,68 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_KeyStoreResourceData.h defines the Model Reader Node class that is related to <resourcedata>.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_KEYSTORERESOURCEDATA
|
||||
#define __NMR_MODELREADERNODE_KEYSTORERESOURCEDATA
|
||||
|
||||
#include "Model/Classes/NMR_KeyStoreResourceData.h"
|
||||
#include "Model/Classes/NMR_KeyStoreCEKParams.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
#include "Model/Classes/NMR_KeyStoreResourceDataGroup.h"
|
||||
|
||||
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_KeyStoreResourceData : public CModelReaderNode_KeyStoreBase {
|
||||
private:
|
||||
std::string m_sPath;
|
||||
PKeyStoreCEKParams m_pCekParams;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode_KeyStoreResourceData() = delete;
|
||||
using CModelReaderNode_KeyStoreBase::CModelReaderNode_KeyStoreBase;
|
||||
|
||||
CModelReaderNode_KeyStoreResourceData(_In_ CModel * const pModel, _In_ CKeyStore * const pKeyStore, _In_ PModelWarnings pWarnings):
|
||||
CModelReaderNode_KeyStoreBase( pModel, pKeyStore, pWarnings) {};
|
||||
|
||||
PKeyStoreResourceData getResourceData(PKeyStoreResourceDataGroup const & rdg);
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_KeyStoreResourceData> PModelReaderNode_KeyStoreResourceData;
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_KEYSTORERESOURCEDATA
|
||||
@@ -0,0 +1,68 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_KeyStoreResourceData.h defines the Model Reader Node class that is related to <resourcedata>.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_KEYSTORERESOURCEDATAGROUP
|
||||
#define __NMR_MODELREADERNODE_KEYSTORERESOURCEDATAGROUP
|
||||
|
||||
#include "Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreAccessRight.h"
|
||||
#include "Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreResourceData.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_KeyStore.h"
|
||||
#include "Model/Classes/NMR_KeyStoreAccessRight.h"
|
||||
#include "Model/Classes/NMR_KeyStoreResourceData.h"
|
||||
#include "Model/Classes/NMR_KeyStoreResourceDataGroup.h"
|
||||
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_KeyStoreResourceDataGroup : public CModelReaderNode_KeyStoreBase {
|
||||
private:
|
||||
PKeyStoreResourceDataGroup m_pGroup;
|
||||
nfBool m_bHasUuid = false;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode_KeyStoreResourceDataGroup() = delete;
|
||||
using CModelReaderNode_KeyStoreBase::CModelReaderNode_KeyStoreBase;
|
||||
|
||||
CModelReaderNode_KeyStoreResourceDataGroup(_In_ CModel * const pModel, _In_ CKeyStore * const pKeyStore, _In_ PModelWarnings pWarnings) :
|
||||
CModelReaderNode_KeyStoreBase( pModel, pKeyStore, pWarnings) {};
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_KeyStoreResourceDataGroup> PModelReaderNode_KeyStoreResourceDataGroup;
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE_KEYSTORERESOURCEDATAGROUP
|
||||
@@ -0,0 +1,62 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_SLICE1507_POLYGON
|
||||
#define __NMR_MODELREADERNODE_SLICE1507_POLYGON
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
#include "Model/Classes/NMR_ModelConstants_Slices.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_Slices1507_Polygon : public CModelReaderNode {
|
||||
private:
|
||||
CSlice *m_pSlice;
|
||||
|
||||
nfUint32 m_PolygonIndex;
|
||||
nfUint32 m_StartV;
|
||||
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
|
||||
public:
|
||||
CModelReaderNode_Slices1507_Polygon() = delete;
|
||||
CModelReaderNode_Slices1507_Polygon(_In_ CSlice *pSlice, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<CModelReaderNode_Slices1507_Polygon> PModelReaderNode_Slices1507_Polygon;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,63 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_slice1507_Segment.h covers the segments of the private 3MF slice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_SLICE1507_SEGMENT
|
||||
#define __NMR_MODELREADERNODE_SLICE1507_SEGMENT
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelConstants_Slices.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode_Slices1507_Segment : public CModelReaderNode {
|
||||
private:
|
||||
CSlice *m_pSlice;
|
||||
nfUint32 m_PolygonIndex;
|
||||
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
|
||||
public:
|
||||
CModelReaderNode_Slices1507_Segment() = delete;
|
||||
CModelReaderNode_Slices1507_Segment(_In_ CSlice *pSlice, nfUint32 nPolygonIndex, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<CModelReaderNode_Slices1507_Segment> PModelReaderNode_Slices1507_Segment;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,65 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_slice1507_Segment.h covers the slices of the private 3MF slice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_SLICE1507_SLICE
|
||||
#define __NMR_MODELREADERNODE_SLICE1507_SLICE
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelConstants_Slices.h"
|
||||
|
||||
namespace NMR {
|
||||
class CModelReaderNode_Slices1507_Slice : public CModelReaderNode {
|
||||
private:
|
||||
CModelSliceStack *m_pSliceStack;
|
||||
PSlice m_Slice;
|
||||
|
||||
nfFloat m_TopZ;
|
||||
bool m_bHasZTop;
|
||||
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
|
||||
public:
|
||||
CModelReaderNode_Slices1507_Slice() = delete;
|
||||
CModelReaderNode_Slices1507_Slice(_In_ CModelSliceStack *pSliceStack, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode_Slices1507_Slice> PModelReaderNode_Slices1507_Slice;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,66 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_slice1507_Segment.h covers the slices of the private 3MF slice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_SLICE1507_SLICEREF
|
||||
#define __NMR_MODELREADERNODE_SLICE1507_SLICEREF
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelConstants_Slices.h"
|
||||
|
||||
namespace NMR {
|
||||
class CModelReaderNode_Slice1507_SliceRef : public CModelReaderNode {
|
||||
private:
|
||||
nfUint32 m_SliceStackId;
|
||||
std::string m_Path;
|
||||
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
|
||||
public:
|
||||
CModelReaderNode_Slice1507_SliceRef() = delete;
|
||||
CModelReaderNode_Slice1507_SliceRef(_In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
std::string Path();
|
||||
nfUint32 SliceStackId();
|
||||
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<CModelReaderNode_Slice1507_SliceRef> PModelReaderNode_Slice1507_SliceRef;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,62 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_slice1507.h covers the private 3MF slice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_SLICE1507_SLICEREFMODEL
|
||||
#define __NMR_MODELREADERNODE_SLICE1507_SLICEREFMODEL
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode_ModelBase.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelConstants_Slices.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReader_Slice1507_SliceRefModel : public CModelReaderNode_ModelBase {
|
||||
private:
|
||||
std::string m_sSliceRefPath;
|
||||
|
||||
protected:
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
|
||||
public:
|
||||
CModelReader_Slice1507_SliceRefModel() = delete;
|
||||
CModelReader_Slice1507_SliceRefModel(_In_ CModel *pModel, _In_ PModelWarnings pWarnings, _In_z_ const std::string sSliceRefPath);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<CModelReader_Slice1507_SliceRefModel> PModelReader_Slice1507_SliceRefModel;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,61 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_slice1507_Segment.h covers the sliceref resources of the private 3MF slice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_SLICE1507_SLICEREFRESOURCES
|
||||
#define __NMR_MODELREADERNODE_SLICE1507_SLICEREFRESOURCES
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelConstants_Slices.h"
|
||||
|
||||
namespace NMR {
|
||||
class CModelReader_Slice1507_SliceRefResources : public CModelReaderNode {
|
||||
private:
|
||||
CModel *m_pModel;
|
||||
std::string m_sSliceRefPath;
|
||||
|
||||
protected:
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
|
||||
public:
|
||||
CModelReader_Slice1507_SliceRefResources() = delete;
|
||||
CModelReader_Slice1507_SliceRefResources(_In_ CModel *pModel, _In_ PModelWarnings pWarnings, _In_z_ const std::string sSliceRefPath);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<CModelReader_Slice1507_SliceRefResources> PModelReader_Slice1507_SliceRefResources;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,66 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_slice1507_Segment.h covers the slicestack of the private 3MF slice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_SLICE1507_SLICESTACK
|
||||
#define __NMR_MODELREADERNODE_SLICE1507_SLICESTACK
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelConstants_Slices.h"
|
||||
|
||||
namespace NMR {
|
||||
class CModelReaderNode_Slice1507_SliceStack : public CModelReaderNode {
|
||||
private:
|
||||
CModel *m_pModel;
|
||||
|
||||
nfFloat m_BottomZ;
|
||||
nfUint32 m_Id;
|
||||
|
||||
PModelSliceStack m_pSliceStackResource;
|
||||
std::string m_sSlicePath;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
|
||||
public:
|
||||
CModelReaderNode_Slice1507_SliceStack() = delete;
|
||||
CModelReaderNode_Slice1507_SliceStack(_In_ CModel *pModel, _In_ PModelWarnings pWarnings, _In_ PProgressMonitor pProgressMonitor, _In_ const std::string sSlicePath);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<CModelReaderNode_Slice1507_SliceStack> PModelReaderNode_Slice1507_SliceStack;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_slice1507_Segment.h covers the segments of the private 3MF slice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_SLICE1507_VERTEX
|
||||
#define __NMR_MODELREADERNODE_SLICE1507_VERTEX
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelConstants_Slices.h"
|
||||
|
||||
namespace NMR {
|
||||
class CModelReaderNode_Slices1507_Vertex : public CModelReaderNode {
|
||||
private:
|
||||
nfFloat m_x;
|
||||
nfFloat m_y;
|
||||
|
||||
CSlice *m_pSlice;
|
||||
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
|
||||
public:
|
||||
CModelReaderNode_Slices1507_Vertex() = delete;
|
||||
CModelReaderNode_Slices1507_Vertex(_In_ CSlice *pSlice, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<CModelReaderNode_Slices1507_Vertex> PModelReaderNode_Slices1507_Vertex;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,61 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_slice1507_Segment.h covers the vertices of the private 3MF slice extension.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE_SLICE1507_VERTICES
|
||||
#define __NMR_MODELREADERNODE_SLICE1507_VERTICES
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelConstants_Slices.h"
|
||||
|
||||
namespace NMR {
|
||||
class CModelReaderNode_Slices1507_Vertices : public CModelReaderNode {
|
||||
private:
|
||||
CSlice *m_pSlice;
|
||||
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
|
||||
public:
|
||||
CModelReaderNode_Slices1507_Vertices() = delete;
|
||||
CModelReaderNode_Slices1507_Vertices(_In_ CSlice *pSlice, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<CModelReaderNode_Slices1507_Vertices> PModelReaderNode_Slices1507_Vertices;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode093_Build.h defines the Model Reader Build Node Class.
|
||||
A build reader model node is a parser for the build node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
#ifndef __NMR_MODELREADERNODE093_BUILD
|
||||
#define __NMR_MODELREADERNODE093_BUILD
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_Build : public CModelReaderNode {
|
||||
protected:
|
||||
CModel * m_pModel;
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode093_Build() = delete;
|
||||
CModelReaderNode093_Build(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_BUILD
|
||||
@@ -0,0 +1,58 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode093_BuildItem.h defines the Model Reader BuildItem Node Class.
|
||||
A builditem reader model node is a parser for the builditem node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_BUILDITEM
|
||||
#define __NMR_MODELREADERNODE093_BUILDITEM
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_BuildItem : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
nfInt32 m_ObjectID;
|
||||
nfBool m_bHasID;
|
||||
NMATRIX3 m_mTransform;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode093_BuildItem() = delete;
|
||||
CModelReaderNode093_BuildItem(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_BUILDITEM
|
||||
@@ -0,0 +1,68 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode093_Color.h defines the Model Reader Color Node Class.
|
||||
A color reader model node is a parser for the vertex node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_COLOR
|
||||
#define __NMR_MODELREADERNODE093_COLOR
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_Color : public CModelReaderNode {
|
||||
private:
|
||||
ModelResourceID m_nTextureID;
|
||||
std::string m_sColorString;
|
||||
ModelResourceID m_nResourceID;
|
||||
nfColor m_cColor;
|
||||
|
||||
void parseColor();
|
||||
public:
|
||||
CModelReaderNode093_Color() = delete;
|
||||
CModelReaderNode093_Color(_In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
nfColor retrieveColor();
|
||||
ModelResourceID retrieveID();
|
||||
ModelResourceID retrieveTextureID();
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode093_Color> PModelReaderNode093_Color;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_COLOR
|
||||
@@ -0,0 +1,63 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReader093_Component.h defines the Model Component Reader Node Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_COMPONENT
|
||||
#define __NMR_MODELREADERNODE093_COMPONENT
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_Component : public CModelReaderNode {
|
||||
protected:
|
||||
CModel * m_pModel;
|
||||
ModelResourceID m_ObjectID;
|
||||
nfBool m_bHasID;
|
||||
NMATRIX3 m_mTransform;
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode093_Component() = delete;
|
||||
CModelReaderNode093_Component(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
CModelObject * getObject();
|
||||
NMATRIX3 getTransform();
|
||||
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode093_Component> PModelReaderNode093_Component;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_COMPONENT
|
||||
@@ -0,0 +1,57 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Components.h defines the Model Components Reader Node Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_COMPONENTS
|
||||
#define __NMR_MODELREADERNODE100_COMPONENTS
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_Components : public CModelReaderNode {
|
||||
private:
|
||||
protected:
|
||||
CModelComponentsObject * m_pComponentsObject;
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode093_Components() = delete;
|
||||
CModelReaderNode093_Components(_In_ CModelComponentsObject * pComponentsObject, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_COMPONENTS
|
||||
@@ -0,0 +1,65 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode093_Color.h defines the Model Reader Material Node Class.
|
||||
A color reader material node is a parser for the material node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_MATERIAL
|
||||
#define __NMR_MODELREADERNODE093_MATERIAL
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_Material : public CModelReaderNode {
|
||||
private:
|
||||
std::string m_sName;
|
||||
ModelResourceID m_nResourceID;
|
||||
ModelResourceID m_nColorID;
|
||||
public:
|
||||
CModelReaderNode093_Material() = delete;
|
||||
CModelReaderNode093_Material(_In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
std::string retrieveName();
|
||||
ModelResourceID retrieveID();
|
||||
ModelResourceID retrieveColorID();
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode093_Material> PModelReaderNode093_Material;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_MATERIAL
|
||||
@@ -0,0 +1,65 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode093_Mesh.h defines the Model Reader Mesh Node Class.
|
||||
A mesh reader model node is a parser for the mesh node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_MESH
|
||||
#define __NMR_MODELREADERNODE093_MESH
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Reader/NMR_ModelReader_TexCoordMapping.h"
|
||||
#include "Model/Reader/NMR_ModelReader_ColorMapping.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelBaseMaterials.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_Mesh : public CModelReaderNode {
|
||||
private:
|
||||
CMesh * m_pMesh;
|
||||
CModel * m_pModel;
|
||||
PModelReader_TexCoordMapping m_pTexCoordMapping;
|
||||
PModelReader_ColorMapping m_pColorMapping;
|
||||
PModelBaseMaterialResource m_pMaterialResource;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode093_Mesh() = delete;
|
||||
CModelReaderNode093_Mesh(_In_ CModel * pModel, _In_ CMesh * pMesh, _In_ PModelReader_ColorMapping pColorMapping, _In_ PModelBaseMaterialResource pMaterialResource, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_MESH
|
||||
@@ -0,0 +1,73 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode093_Object.h defines the Model Reader Object Node Class.
|
||||
A object reader model node is a parser for the object node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_OBJECT
|
||||
#define __NMR_MODELREADERNODE093_OBJECT
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelBaseMaterials.h"
|
||||
|
||||
#include "Model/Reader/NMR_ModelReader_ColorMapping.h"
|
||||
#include "Model/Reader/NMR_ModelReader_TexCoordMapping.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_Object : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
ModelResourceID m_nID;
|
||||
std::string m_sThumbnail;
|
||||
std::string m_sName;
|
||||
std::string m_sType;
|
||||
nfBool m_bHasType;
|
||||
PModelObject m_pObject;
|
||||
PModelReader_ColorMapping m_pColorMapping;
|
||||
nfInt32 m_nObjectLevelColorID;
|
||||
nfInt32 m_nObjectLevelMaterialID;
|
||||
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode093_Object() = delete;
|
||||
CModelReaderNode093_Object(_In_ CModel * pModel, _In_ PModelReader_ColorMapping pColorMapping, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_OBJECT
|
||||
@@ -0,0 +1,62 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode093_Resources.h defines the Model Reader Resources Node Class.
|
||||
A resources reader model node is a parser for the resources node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_RESOURCES
|
||||
#define __NMR_MODELREADERNODE093_RESOURCES
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Reader/NMR_ModelReader_ColorMapping.h"
|
||||
#include "Model/Reader/NMR_ModelReader_TexCoordMapping.h"
|
||||
|
||||
#include "Model/Classes/NMR_ModelResource.h"
|
||||
#include "Model/Classes/NMR_ModelBaseMaterial.h"
|
||||
#include "Model/Classes/NMR_ModelBaseMaterials.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_Resources : public CModelReaderNode {
|
||||
protected:
|
||||
PModelReader_ColorMapping m_pColorMapping;
|
||||
|
||||
CModel * m_pModel;
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode093_Resources() = delete;
|
||||
CModelReaderNode093_Resources(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_RESOURCES
|
||||
@@ -0,0 +1,77 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode093_Texture.h defines the Model Reader Texture Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_TEXTURE
|
||||
#define __NMR_MODELREADERNODE093_TEXTURE
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_Texture : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
ModelResourceID m_nID;
|
||||
|
||||
std::string m_sPath;
|
||||
std::string m_sContentType;
|
||||
std::string m_sTileStyleU;
|
||||
std::string m_sTileStyleV;
|
||||
std::string m_sFilter;
|
||||
|
||||
PModelTexture2DResource m_pTexture2DResource;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode093_Texture() = delete;
|
||||
CModelReaderNode093_Texture(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
ModelResourceID getID ();
|
||||
|
||||
std::string getPath();
|
||||
std::string getContentType();
|
||||
std::string getTileStyleU();
|
||||
std::string getTileStyleV();
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode093_Texture> PModelReaderNode093_Texture;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_TEXTURE
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_TextureVertex.h defines the Model Reader Texture Vertex Node Class.
|
||||
A texture vertex reader model node is a parser for the texture vertex node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_TEXTUREVERTEX
|
||||
#define __NMR_MODELREADERNODE093_TEXTUREVERTEX
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_TextureVertex : public CModelReaderNode {
|
||||
private:
|
||||
nfFloat m_fU;
|
||||
nfFloat m_fV;
|
||||
nfBool m_bHasU;
|
||||
nfBool m_bHasV;
|
||||
public:
|
||||
CModelReaderNode093_TextureVertex() = delete;
|
||||
CModelReaderNode093_TextureVertex(_In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
void retrieveTexCoords(_Out_ nfFloat & fU, _Out_ nfFloat & fV);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode093_TextureVertex> PModelReaderNode093_TextureVertex;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_TEXTUREVERTEX
|
||||
@@ -0,0 +1,63 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode093_TextureVertices.h defines the Model Reader Texture Vertices Node Class.
|
||||
A vertices reader model node is a parser for the vertices node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_TEXTUREVERTICES
|
||||
#define __NMR_MODELREADERNODE093_TEXTUREVERTICES
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Reader/NMR_ModelReader_TexCoordMapping.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_TextureVertices : public CModelReaderNode {
|
||||
private:
|
||||
CMesh * m_pMesh;
|
||||
PModelReader_TexCoordMapping m_pTexCoordMapping;
|
||||
ModelResourceIndex m_nTexCoordIndex;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode093_TextureVertices() = delete;
|
||||
CModelReaderNode093_TextureVertices(_In_ CMesh * pMesh, _In_ PModelWarnings pWarnings, _In_ PModelReader_TexCoordMapping pTexCoordMapping);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode093_TextureVertices> PModelReaderNode093_TextureVertices;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_TEXTUREVERTICES
|
||||
@@ -0,0 +1,75 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode093_Triangle.h defines the Model Reader Triangle Node Class.
|
||||
A triangle reader model node is a parser for the triangle node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_TRIANGLE
|
||||
#define __NMR_MODELREADERNODE093_TRIANGLE
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_Triangle : public CModelReaderNode {
|
||||
protected:
|
||||
nfInt32 m_nIndex1;
|
||||
nfInt32 m_nIndex2;
|
||||
nfInt32 m_nIndex3;
|
||||
nfInt32 m_nTextureIndex1;
|
||||
nfInt32 m_nTextureIndex2;
|
||||
nfInt32 m_nTextureIndex3;
|
||||
nfInt32 m_nColorID1;
|
||||
nfInt32 m_nColorID2;
|
||||
nfInt32 m_nColorID3;
|
||||
nfInt32 m_nMaterialID;
|
||||
nfInt32 m_nTextureID;
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode093_Triangle() = delete;
|
||||
CModelReaderNode093_Triangle(_In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
void retrieveIndices(_Out_ nfInt32 & nIndex1, _Out_ nfInt32 & nIndex2, _Out_ nfInt32 & nIndex3, nfInt32 nNodeCount);
|
||||
nfBool retrieveTextureIndices(_Out_ nfInt32 & nIndex1, _Out_ nfInt32 & nIndex2, _Out_ nfInt32 & nIndex3);
|
||||
|
||||
nfBool retrieveColorIDs(_Out_ nfInt32 & nColorID1, _Out_ nfInt32 & nColorID2, _Out_ nfInt32 & nColorID3);
|
||||
nfInt32 retrieveTextureID();
|
||||
nfInt32 retrieveMaterialID();
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode093_Triangle> PModelReaderNode093_Triangle;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_TRIANGLE
|
||||
@@ -0,0 +1,72 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_Triangles.h defines the Model Reader Triangles Node Class.
|
||||
A triangles reader model node is a parser for the triangles node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_TRIANGLES
|
||||
#define __NMR_MODELREADERNODE093_TRIANGLES
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Reader/NMR_ModelReader_ColorMapping.h"
|
||||
#include "Model/Reader/NMR_ModelReader_TexCoordMapping.h"
|
||||
|
||||
#include "Common/MeshInformation/NMR_MeshInformation_Properties.h"
|
||||
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelBaseMaterials.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_Triangles : public CModelReaderNode {
|
||||
protected:
|
||||
CMesh * m_pMesh;
|
||||
CModel * m_pModel;
|
||||
PModelReader_ColorMapping m_pColorMapping;
|
||||
PModelReader_TexCoordMapping m_pTexCoordMapping;
|
||||
PModelBaseMaterialResource m_pDefaultMaterialResource;
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
|
||||
_Ret_notnull_ CMeshInformation_Properties * createPropertiesInformation();
|
||||
public:
|
||||
CModelReaderNode093_Triangles() = delete;
|
||||
CModelReaderNode093_Triangles(_In_ CModel * pModel, _In_ CMesh * pMesh, _In_ PModelReader_ColorMapping pColorMapping, _In_ PModelReader_TexCoordMapping pTexCoordMapping, PModelBaseMaterialResource pMaterialResource, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode093_Triangles> PModelReaderNode093_Triangles;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_TRIANGLES
|
||||
@@ -0,0 +1,66 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_Vertex.h defines the Model Reader Vertex Node Class.
|
||||
A vertex reader model node is a parser for the vertex node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_VERTEX
|
||||
#define __NMR_MODELREADERNODE093_VERTEX
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_Vertex : public CModelReaderNode {
|
||||
private:
|
||||
nfFloat m_fX;
|
||||
nfFloat m_fY;
|
||||
nfFloat m_fZ;
|
||||
nfBool m_bHasX;
|
||||
nfBool m_bHasY;
|
||||
nfBool m_bHasZ;
|
||||
public:
|
||||
CModelReaderNode093_Vertex() = delete;
|
||||
CModelReaderNode093_Vertex(_In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
void retrievePosition(_Out_ nfFloat & fX, _Out_ nfFloat & fY, _Out_ nfFloat & fZ);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode093_Vertex> PModelReaderNode093_Vertex;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_VERTEX
|
||||
@@ -0,0 +1,60 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2018 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode093_Vertices.h defines the Model Reader Vertices Node Class.
|
||||
A vertices reader model node is a parser for the vertices node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE093_VERTICES
|
||||
#define __NMR_MODELREADERNODE093_VERTICES
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode093_Vertices : public CModelReaderNode {
|
||||
private:
|
||||
CMesh * m_pMesh;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode093_Vertices() = delete;
|
||||
CModelReaderNode093_Vertices(_In_ CMesh * pMesh, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode093_Vertices> PModelReaderNode093_Vertices;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE093_VERTICES
|
||||
@@ -0,0 +1,71 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_BaseMaterial.h defines the Model Reader Base Material Node Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_BASEMATERIAL
|
||||
#define __NMR_MODELREADERNODE100_BASEMATERIAL
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_BaseMaterial : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
|
||||
nfBool m_bHasName;
|
||||
std::string m_sName;
|
||||
|
||||
nfBool m_bHasDisplayColor;
|
||||
nfColor m_cDisplayColor;
|
||||
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode100_BaseMaterial() = delete;
|
||||
CModelReaderNode100_BaseMaterial(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
nfBool hasDisplayColor();
|
||||
nfBool hasName();
|
||||
nfColor getDisplayColor();
|
||||
std::string getMaterialName();
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode100_BaseMaterial> PModelReaderNode100_BaseMaterial;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_BASEMATERIAL
|
||||
@@ -0,0 +1,61 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_BaseMaterials.h defines the Model Reader Base Materials Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_BASEMATERIALS
|
||||
#define __NMR_MODELREADERNODE100_BASEMATERIALS
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_BaseMaterials : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
ModelResourceID m_nID;
|
||||
|
||||
PModelBaseMaterialResource m_pBaseMaterialResource;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_BaseMaterials() = delete;
|
||||
CModelReaderNode100_BaseMaterials(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_BASEMATERIALS
|
||||
@@ -0,0 +1,57 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Build.h defines the Model Reader Build Node Class.
|
||||
A build reader model node is a parser for the build node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
#ifndef __NMR_MODELREADERNODE100_BUILD
|
||||
#define __NMR_MODELREADERNODE100_BUILD
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Build : public CModelReaderNode {
|
||||
protected:
|
||||
CModel * m_pModel;
|
||||
PUUID m_UUID;
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue, _In_z_ const nfChar * pNameSpace);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_Build() = delete;
|
||||
CModelReaderNode100_Build(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_BUILD
|
||||
@@ -0,0 +1,69 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_BuildItem.h defines the Model Reader BuildItem Node Class.
|
||||
A builditem reader model node is a parser for the builditem node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_BUILDITEM
|
||||
#define __NMR_MODELREADERNODE100_BUILDITEM
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelMetaDataGroup.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_BuildItem : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
nfInt32 m_ObjectID;
|
||||
nfBool m_bHasID;
|
||||
std::string m_sPartNumber;
|
||||
NMATRIX3 m_mTransform;
|
||||
|
||||
// Production Extension
|
||||
std::string m_sPath;
|
||||
PUUID m_UUID;
|
||||
|
||||
bool m_hasPath;
|
||||
PModelMetaDataGroup m_MetaDataGroup;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue, _In_z_ const nfChar * pNameSpace);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_BuildItem() = delete;
|
||||
CModelReaderNode100_BuildItem(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_BUILDITEM
|
||||
@@ -0,0 +1,66 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Color.h defines the Model Reader Color Node Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_COLOR
|
||||
#define __NMR_MODELREADERNODE100_COLOR
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Color : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
|
||||
nfBool m_bHasColor;
|
||||
nfColor m_cColor;
|
||||
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode100_Color() = delete;
|
||||
CModelReaderNode100_Color(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
nfBool hasColor();
|
||||
nfColor getColor();
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode100_Color> PModelReaderNode100_Color;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_COLOR
|
||||
@@ -0,0 +1,62 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_BaseMaterials.h defines the Model Reader Colors Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_COLORS
|
||||
#define __NMR_MODELREADERNODE100_COLORS
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Colors : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
ModelResourceID m_nID;
|
||||
ModelResourceIndex m_nColorIndex;
|
||||
PModelColorGroupResource m_pColorGroup;
|
||||
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_Colors() = delete;
|
||||
CModelReaderNode100_Colors(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_COLORS
|
||||
@@ -0,0 +1,70 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReader100_Component.h defines the Model Component Reader Node Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_COMPONENT
|
||||
#define __NMR_MODELREADERNODE100_COMPONENT
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Component : public CModelReaderNode {
|
||||
protected:
|
||||
CModel * m_pModel;
|
||||
ModelResourceID m_ObjectID;
|
||||
nfBool m_bHasID;
|
||||
NMATRIX3 m_mTransform;
|
||||
|
||||
nfBool m_bHasPath;
|
||||
PUUID m_UUID;
|
||||
std::string m_sPath;
|
||||
|
||||
virtual void OnNSAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue, _In_z_ const nfChar * pNameSpace);
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode100_Component() = delete;
|
||||
CModelReaderNode100_Component(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
CModelObject * getObject();
|
||||
NMATRIX3 getTransform();
|
||||
|
||||
PUUID uuid();
|
||||
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode100_Component> PModelReaderNode100_Component;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_COMPONENT
|
||||
@@ -0,0 +1,58 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Components.h defines the Model Components Reader Node Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_COMPONENTS
|
||||
#define __NMR_MODELREADERNODE100_COMPONENTS
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelMetaData.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Components : public CModelReaderNode {
|
||||
private:
|
||||
protected:
|
||||
CModelComponentsObject * m_pComponentsObject;
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_Components() = delete;
|
||||
CModelReaderNode100_Components(_In_ CModelComponentsObject * pComponentsObject, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_COMPONENTS
|
||||
@@ -0,0 +1,66 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Composite.h defines the Model Reader Tex2Coord Node Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_COMPOSITE
|
||||
#define __NMR_MODELREADERNODE100_COMPOSITE
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelCompositeMaterials.h"
|
||||
#include "Model/Classes/NMR_ModelTypes.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Composite : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
|
||||
PModelComposite m_pModelComposite;
|
||||
const std::vector<ModelPropertyID>& m_vctBaseMaterialPropertyIds;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode100_Composite() = delete;
|
||||
CModelReaderNode100_Composite(_In_ CModel * pModel, _In_ PModelWarnings pWarnings, _In_z_ const std::vector<ModelPropertyID>& baseMaterialPropertyIds);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
PModelComposite getComposite();
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<CModelReaderNode100_Composite> PModelReaderNode100_Composite;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_COMPOSITE
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_CompositeMaterials.h defines the Model Reader CompositeMaterials Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_COMPOSITEMATERIALS
|
||||
#define __NMR_MODELREADERNODE100_COMPOSITEMATERIALS
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelCompositeMaterials.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_CompositeMaterials : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
ModelResourceID m_nID;
|
||||
ModelResourceID m_nBaseMaterialID;
|
||||
std::shared_ptr<std::vector<nfUint32>> m_pMatIndices;
|
||||
std::vector<ModelPropertyID> m_vctMaterialPropertyIDs;
|
||||
|
||||
PModelCompositeMaterialsResource m_pCompositeMaterials;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_CompositeMaterials() = delete;
|
||||
CModelReaderNode100_CompositeMaterials(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_COMPOSITEMATERIALS
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Mesh.h defines the Model Reader Mesh Node Class.
|
||||
A mesh reader model node is a parser for the mesh node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_MESH
|
||||
#define __NMR_MODELREADERNODE100_MESH
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Reader/NMR_ModelReader_TexCoordMapping.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Mesh : public CModelReaderNode {
|
||||
private:
|
||||
CMesh * m_pMesh;
|
||||
CModel * m_pModel;
|
||||
|
||||
PPackageResourceID m_pObjectLevelPropertyID;
|
||||
ModelResourceIndex m_nObjectLevelPropertyIndex;
|
||||
|
||||
eModelBeamLatticeClipMode m_eClipMode;
|
||||
nfBool m_bHasClippingMeshID;
|
||||
ModelResourceID m_nClippingMeshID;
|
||||
nfBool m_bHasRepresentationMeshID;
|
||||
ModelResourceID m_nRepresentationMeshID;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_Mesh() = delete;
|
||||
CModelReaderNode100_Mesh(_In_ CModel * pModel, _In_ CMesh * pMesh, _In_ PModelWarnings pWarnings, _In_ PProgressMonitor pProgressMonitor, _In_ PPackageResourceID m_pObjectLevelPropertyID, _In_ ModelResourceIndex nDefaultPropertyIndex);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
void retrieveClippingInfo(_Out_ eModelBeamLatticeClipMode &eClipMode, _Out_ nfBool & bHasClippingMode, _Out_ ModelResourceID & nClippingMeshID);
|
||||
void retrieveRepresentationInfo(_Out_ nfBool & bHasRepresentation, _Out_ ModelResourceID & nRepresentationMeshID);
|
||||
};
|
||||
typedef std::shared_ptr <CModelReaderNode100_Mesh> PModelReaderNode100_Mesh;
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_MESH
|
||||
@@ -0,0 +1,66 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_MetaData.h defines the Model Reader MetaData Node Class.
|
||||
A metadata reader model node is a parser for the triangle node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_METADATA
|
||||
#define __NMR_MODELREADERNODE100_METADATA
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_MetaData : public CModelReaderNode {
|
||||
private:
|
||||
std::string m_sKey;
|
||||
std::string m_sValue;
|
||||
std::string m_sType;
|
||||
nfBool m_bPreserve;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnText(_In_z_ const nfChar * pText, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_MetaData() = delete;
|
||||
CModelReaderNode100_MetaData(_In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
std::string getKey();
|
||||
std::string getValue();
|
||||
std::string getType();
|
||||
nfBool getPreserve();
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode100_MetaData> PModelReaderNode100_MetaData;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_METADATA
|
||||
@@ -0,0 +1,62 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_MetaDataGroup.h defines the Model Reader MetaDataGroup Node Class.
|
||||
A metadatagroup reader node is a parser for the metadatagroup node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_METADATAGROUP
|
||||
#define __NMR_MODELREADERNODE100_METADATAGROUP
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelMetaDataGroup.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_MetaDataGroup : public CModelReaderNode {
|
||||
private:
|
||||
PModelMetaDataGroup m_MetaDataGroup;
|
||||
protected:
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnText(_In_z_ const nfChar * pText, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_MetaDataGroup() = delete;
|
||||
CModelReaderNode100_MetaDataGroup(_In_ PModelWarnings pWarnings);
|
||||
|
||||
PModelMetaDataGroup getMetaDataGroup();
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode100_MetaDataGroup> PModelReaderNode100_MetaDataGroup;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_METADATAGROUP
|
||||
@@ -0,0 +1,65 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Multi.h defines the Model Reader Multi Node Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_MULTI
|
||||
#define __NMR_MODELREADERNODE100_MULTI
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelTypes.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Multi : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
|
||||
nfBool m_bHasPIndices;
|
||||
std::vector<ModelResourceIndex> m_vctPIndices;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode100_Multi() = delete;
|
||||
CModelReaderNode100_Multi(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
std::vector<ModelResourceIndex>& getPIndices();
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<CModelReaderNode100_Multi> PModelReaderNode100_Multi;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_MULTI
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_MultiProperties.h defines the Model Reader MultiProperties Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_MULTIPROPERTIES
|
||||
#define __NMR_MODELREADERNODE100_MULTIPROPERTIES
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelMultiPropertyGroup.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_MultiProperties : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
ModelResourceID m_nID;
|
||||
std::shared_ptr<std::vector<ModelResourceID>> m_pPIDs;
|
||||
std::shared_ptr<std::vector<eModelBlendMethod>> m_pBlendMethods;
|
||||
PModelMultiPropertyGroupResource m_pMultiPropertyGroup;
|
||||
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_MultiProperties() = delete;
|
||||
CModelReaderNode100_MultiProperties(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_MULTIPROPERTIES
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Object.h defines the Model Reader Object Node Class.
|
||||
A object reader model node is a parser for the object node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_OBJECT
|
||||
#define __NMR_MODELREADERNODE100_OBJECT
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Reader/v100/NMR_ModelReaderNode100_Mesh.h"
|
||||
#include "Model/Reader/NMR_ModelReader_TexCoordMapping.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelMetaDataGroup.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Object : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
ModelResourceID m_nID;
|
||||
nfBool m_bHasThumbnail;
|
||||
std::string m_sThumbnailPath;
|
||||
std::string m_sPartNumber;
|
||||
std::string m_sName;
|
||||
PUUID m_UUID;
|
||||
std::string m_sType;
|
||||
nfBool m_bHasType;
|
||||
PModelObject m_pObject;
|
||||
nfBool m_bHasDefaultPropertyID;
|
||||
nfBool m_bHasDefaultPropertyIndex;
|
||||
ModelResourceID m_nObjectLevelPropertyModelID;
|
||||
PPackageResourceID m_pObjectLevelPropertyID;
|
||||
ModelResourceIndex m_nObjectLevelPropertyIndex;
|
||||
|
||||
nfUint32 m_nSliceStackId;
|
||||
eModelSlicesMeshResolution m_eSlicesMeshResolution;
|
||||
nfBool m_bHasMeshResolution;
|
||||
|
||||
PModelMetaDataGroup m_MetaDataGroup;
|
||||
|
||||
void createDefaultProperties();
|
||||
void handleBeamLatticeExtension(CModelReaderNode100_Mesh* pXMLNode);
|
||||
protected:
|
||||
virtual void OnNSAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue, _In_z_ const nfChar * pNameSpace);
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_Object() = delete;
|
||||
CModelReaderNode100_Object(_In_ CModel * pModel, _In_ PModelWarnings pWarnings, _In_ PProgressMonitor pProgressMonitor);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_OBJECT
|
||||
@@ -0,0 +1,59 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Resources.h defines the Model Reader Resources Node Class.
|
||||
A resources reader model node is a parser for the resources node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_RESOURCES
|
||||
#define __NMR_MODELREADERNODE100_RESOURCES
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelTexture2DGroup.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Resources : public CModelReaderNode {
|
||||
protected:
|
||||
CModel * m_pModel;
|
||||
std::string m_sPath;
|
||||
|
||||
int m_nProgressCount;
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_Resources() = delete;
|
||||
CModelReaderNode100_Resources(_In_ CModel * pModel, _In_ PModelWarnings pWarnings, _In_z_ const std::string sPath, _In_ PProgressMonitor pProgressMonitor);
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_RESOURCES
|
||||
@@ -0,0 +1,70 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Tex2Coord.h defines the Model Reader Tex2Coord Node Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_TEX2COORD
|
||||
#define __NMR_MODELREADERNODE100_TEX2COORD
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Tex2Coord : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
|
||||
nfBool m_bHasU;
|
||||
nfBool m_bHasV;
|
||||
MODELTEXTURE2DCOORDINATE m_sUVCoordinate;
|
||||
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode100_Tex2Coord() = delete;
|
||||
CModelReaderNode100_Tex2Coord(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
nfBool hasU();
|
||||
nfBool hasV();
|
||||
MODELTEXTURE2DCOORDINATE getUV();
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode100_Tex2Coord> PModelReaderNode100_Tex2Coord;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_TEX2COORD
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Tex2DGroup.h defines the Model Reader Tex2DGroup Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_TEX2DGROUP
|
||||
#define __NMR_MODELREADERNODE100_TEX2DGROUP
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
#include "Model/Classes/NMR_ModelTexture2DGroup.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Tex2DGroup : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
ModelResourceID m_nID;
|
||||
ModelResourceID m_nTextureID;
|
||||
|
||||
PModelTexture2DGroupResource m_pTexture2DGroup;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_Tex2DGroup() = delete;
|
||||
CModelReaderNode100_Tex2DGroup(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_TEX2DGROUP
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Texture2D.h defines the Model Reader Texture 2D Class.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_TEXTURE2D
|
||||
#define __NMR_MODELREADERNODE100_TEXTURE2D
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelComponentsObject.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Texture2D : public CModelReaderNode {
|
||||
private:
|
||||
CModel * m_pModel;
|
||||
ModelResourceID m_nID;
|
||||
|
||||
std::string m_sPath;
|
||||
std::string m_sContentType;
|
||||
std::string m_sTileStyleU;
|
||||
std::string m_sTileStyleV;
|
||||
std::string m_sFilter;
|
||||
|
||||
nfBool m_hasBox;
|
||||
nfFloat m_fU;
|
||||
nfFloat m_fV;
|
||||
nfFloat m_fWidth;
|
||||
nfFloat m_fHeight;
|
||||
|
||||
PModelTexture2DResource m_pTexture2DResource;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode100_Texture2D() = delete;
|
||||
CModelReaderNode100_Texture2D(_In_ CModel * pModel, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_TEXTURE2D
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Triangle.h defines the Model Reader Triangle Node Class.
|
||||
A triangle reader model node is a parser for the triangle node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_TRIANGLE
|
||||
#define __NMR_MODELREADERNODE100_TRIANGLE
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Triangle : public CModelReaderNode {
|
||||
protected:
|
||||
nfInt32 m_nPropertyID;
|
||||
nfInt32 m_nPropertyIndex1;
|
||||
nfInt32 m_nPropertyIndex2;
|
||||
nfInt32 m_nPropertyIndex3;
|
||||
nfInt32 m_nIndex1;
|
||||
nfInt32 m_nIndex2;
|
||||
nfInt32 m_nIndex3;
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
public:
|
||||
CModelReaderNode100_Triangle() = delete;
|
||||
CModelReaderNode100_Triangle(_In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
void retrieveIndices(_Out_ nfInt32 & nIndex1, _Out_ nfInt32 & nIndex2, _Out_ nfInt32 & nIndex3, nfInt32 nNodeCount);
|
||||
nfBool retrieveProperties(_Inout_ ModelResourceID & nPropertyID, _Inout_ ModelResourceIndex & nPropertyIndex1, _Inout_ ModelResourceIndex & nPropertyIndex2, _Inout_ ModelResourceIndex & nPropertyIndex3);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode100_Triangle> PModelReaderNode100_Triangle;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_TRIANGLE
|
||||
@@ -0,0 +1,71 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_Triangles.h defines the Model Reader Triangles Node Class.
|
||||
A triangles reader model node is a parser for the triangles node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_TRIANGLES
|
||||
#define __NMR_MODELREADERNODE100_TRIANGLES
|
||||
|
||||
#include "Common/MeshInformation/NMR_MeshInformation_Properties.h"
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Reader/NMR_ModelReader_TexCoordMapping.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Triangles : public CModelReaderNode {
|
||||
protected:
|
||||
CMesh * m_pMesh;
|
||||
CModel * m_pModel;
|
||||
|
||||
PPackageResourceID m_pObjectLevelPropertyID;
|
||||
ModelResourceIndex m_nDefaultResourceIndex;
|
||||
ModelResourceID m_nUsedResourceID;
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
|
||||
_Ret_notnull_ CMeshInformation_Properties * createPropertiesInformation();
|
||||
public:
|
||||
CModelReaderNode100_Triangles() = delete;
|
||||
CModelReaderNode100_Triangles(_In_ CModel * pModel, _In_ CMesh * pMesh, _In_ PModelWarnings pWarnings,
|
||||
_In_ PPackageResourceID pObjectLevelPropertyID, _In_ ModelResourceIndex nDefaultPropertyIndex);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
ModelResourceID getUsedPropertyID() const;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode100_Triangles> PModelReaderNode100_Triangles;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_TRIANGLES
|
||||
@@ -0,0 +1,66 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode_Vertex.h defines the Model Reader Vertex Node Class.
|
||||
A vertex reader model node is a parser for the vertex node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_VERTEX
|
||||
#define __NMR_MODELREADERNODE100_VERTEX
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Vertex : public CModelReaderNode {
|
||||
private:
|
||||
nfFloat m_fX;
|
||||
nfFloat m_fY;
|
||||
nfFloat m_fZ;
|
||||
nfBool m_bHasX;
|
||||
nfBool m_bHasY;
|
||||
nfBool m_bHasZ;
|
||||
public:
|
||||
CModelReaderNode100_Vertex() = delete;
|
||||
CModelReaderNode100_Vertex(_In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
|
||||
void retrievePosition(_Out_ nfFloat & fX, _Out_ nfFloat & fY, _Out_ nfFloat & fZ);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode100_Vertex> PModelReaderNode100_Vertex;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_VERTEX
|
||||
@@ -0,0 +1,60 @@
|
||||
/*++
|
||||
|
||||
Copyright (C) 2019 3MF Consortium
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Abstract:
|
||||
|
||||
NMR_ModelReaderNode100_Vertices.h defines the Model Reader Vertices Node Class.
|
||||
A vertices reader model node is a parser for the vertices node of an XML Model Stream.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __NMR_MODELREADERNODE100_VERTICES
|
||||
#define __NMR_MODELREADERNODE100_VERTICES
|
||||
|
||||
#include "Model/Reader/NMR_ModelReaderNode.h"
|
||||
#include "Model/Classes/NMR_ModelComponent.h"
|
||||
#include "Model/Classes/NMR_ModelObject.h"
|
||||
|
||||
namespace NMR {
|
||||
|
||||
class CModelReaderNode100_Vertices : public CModelReaderNode {
|
||||
private:
|
||||
CMesh * m_pMesh;
|
||||
protected:
|
||||
virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue);
|
||||
virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader);
|
||||
public:
|
||||
CModelReaderNode100_Vertices() = delete;
|
||||
CModelReaderNode100_Vertices(_In_ CMesh * pMesh, _In_ PModelWarnings pWarnings);
|
||||
|
||||
virtual void parseXML(_In_ CXmlReader * pXMLReader);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr <CModelReaderNode100_Vertices> PModelReaderNode100_Vertices;
|
||||
|
||||
}
|
||||
|
||||
#endif // __NMR_MODELREADERNODE100_VERTICES
|
||||
Reference in New Issue
Block a user