| #pragma once |
| |
| #ifndef PLASTICDEFORMER_H |
| #define PLASTICDEFORMER_H |
| |
| #include <memory> |
| |
| |
| #include "tgeometry.h" |
| #include "tmeshimage.h" |
| |
| |
| #include "ext/plastichandle.h" |
| |
| |
| #include <vector> |
| |
| |
| #include "tcg/tcg_list.h" |
| |
| #undef DVAPI |
| #undef DVVAR |
| #ifdef TNZEXT_EXPORTS |
| #define DVAPI DV_EXPORT_API |
| #define DVVAR DV_EXPORT_VAR |
| #else |
| #define DVAPI DV_IMPORT_API |
| #define DVVAR DV_IMPORT_VAR |
| #endif |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| class DVAPI PlasticDeformer { |
| class Imp; |
| std::unique_ptr<Imp> m_imp; |
| |
| public: |
| PlasticDeformer(); |
| ~PlasticDeformer(); |
| |
| friend void swap(PlasticDeformer &a, PlasticDeformer &b) { |
| std::swap(a.m_imp, b.m_imp); |
| } |
| |
| |
| |
| |
| |
| bool compiled() const; |
| |
| |
| |
| |
| void initialize(const TTextureMeshP &mesh); |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| bool compile(const std::vector<PlasticHandle> &handles, int *faceHints = 0); |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| void deform(const TPointD *dstHandlePos, double *dstVerticesCoords) const; |
| |
| |
| |
| |
| |
| |
| |
| void releaseInitializedData(); |
| |
| private: |
| |
| PlasticDeformer(const PlasticDeformer &); |
| PlasticDeformer &operator=(const PlasticDeformer &); |
| }; |
| |
| #endif |