├── .DS_Store
├── pic
├── MLS-rigid.mp4
├── cuboid-orig.png
├── soldier-orig.png
├── soldier-rest.jpg
├── cuboid-MLS-sim.png
├── cuboid-MLS-rigid.png
├── soldier-deformed.jpg
├── cuboid-MLS-sim-arap.png
├── cuboid-MLS-rigid-arap.png
└── soldier-MLS-rigid-arap.png
├── .vs
└── PoissonMLS
│ └── v14
│ └── .suo
├── PoissonMLS.vcxproj.user
├── PoissonMLS.xcodeproj
├── project.xcworkspace
│ ├── xcuserdata
│ │ └── kaji.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ ├── UserInterfaceState (air2's conflicted copy 2016-12-13).xcuserstate
│ │ │ └── xcdebugger
│ │ │ └── Expressions.xcexplist
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── cageDeformer.xccheckout
├── xcuserdata
│ └── kaji.xcuserdatad
│ │ ├── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── PoissonMLS.xcscheme
│ │ └── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
└── project.pbxproj
├── PoissonMLS
├── StdAfx.cpp
├── StdAfx.h
├── PoissonMLS.h
└── PoissonMLS.cpp
├── PoissonMLS.user
├── PoissonMLS.sln
├── LICENSE
├── MayaPlugin.props
├── MayaPluginDebug.props
├── Makefile
├── deformerConst.h
├── README.md
├── blendAff.h
├── PoissonMLS.vcxproj
├── ui_PoissonMLS.py
├── laplacian.h
├── MeshMaya.h
├── distance.h
├── mayaHeaders.h
├── tetrise.h
└── affinelib.h
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/.DS_Store
--------------------------------------------------------------------------------
/pic/MLS-rigid.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/pic/MLS-rigid.mp4
--------------------------------------------------------------------------------
/pic/cuboid-orig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/pic/cuboid-orig.png
--------------------------------------------------------------------------------
/pic/soldier-orig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/pic/soldier-orig.png
--------------------------------------------------------------------------------
/pic/soldier-rest.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/pic/soldier-rest.jpg
--------------------------------------------------------------------------------
/pic/cuboid-MLS-sim.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/pic/cuboid-MLS-sim.png
--------------------------------------------------------------------------------
/.vs/PoissonMLS/v14/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/.vs/PoissonMLS/v14/.suo
--------------------------------------------------------------------------------
/pic/cuboid-MLS-rigid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/pic/cuboid-MLS-rigid.png
--------------------------------------------------------------------------------
/pic/soldier-deformed.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/pic/soldier-deformed.jpg
--------------------------------------------------------------------------------
/pic/cuboid-MLS-sim-arap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/pic/cuboid-MLS-sim-arap.png
--------------------------------------------------------------------------------
/pic/cuboid-MLS-rigid-arap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/pic/cuboid-MLS-rigid-arap.png
--------------------------------------------------------------------------------
/pic/soldier-MLS-rigid-arap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/pic/soldier-MLS-rigid-arap.png
--------------------------------------------------------------------------------
/PoissonMLS.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/PoissonMLS.xcodeproj/project.xcworkspace/xcuserdata/kaji.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/PoissonMLS.xcodeproj/project.xcworkspace/xcuserdata/kaji.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/PoissonMLS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PoissonMLS.xcodeproj/project.xcworkspace/xcuserdata/kaji.xcuserdatad/UserInterfaceState (air2's conflicted copy 2016-12-13).xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shizuo-kaji/PoissonMLS/HEAD/PoissonMLS.xcodeproj/project.xcworkspace/xcuserdata/kaji.xcuserdatad/UserInterfaceState (air2's conflicted copy 2016-12-13).xcuserstate
--------------------------------------------------------------------------------
/PoissonMLS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/PoissonMLS/StdAfx.cpp:
--------------------------------------------------------------------------------
1 |
2 |
3 | //-----------------------------------------------------------------------------
4 | //------ StdAfx.cpp : source file that includes just the standard includes
5 | //------ StdAfx.pch will be the pre-compiled header
6 | //------ StdAfx.obj will contain the pre-compiled type information
7 | //-----------------------------------------------------------------------------
8 | #include "StdAfx.h"
9 |
--------------------------------------------------------------------------------
/PoissonMLS.xcodeproj/project.xcworkspace/xcuserdata/kaji.xcuserdatad/xcdebugger/Expressions.xcexplist:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
7 |
8 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/PoissonMLS.xcodeproj/xcuserdata/kaji.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | PoissonMLS.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 2AA6F2111920C94E005B4AF8
16 |
17 | primary
18 |
19 |
20 | 2AA6F2271920CDC0005B4AF8
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/PoissonMLS.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | C:\Program Files\Autodesk\Maya2016\bin\maya.exe
5 | true
6 | WindowsLocalDebugger
7 | $(USERPROFILE)\Documents\maya\
8 |
9 |
10 | $(USERPROFILE)\Documents\maya\
11 | WindowsLocalDebugger
12 |
13 |
--------------------------------------------------------------------------------
/PoissonMLS.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PoissonMLS", "PoissonMLS.vcxproj", "{67131301-2A24-437B-8B18-9498812D7B0E}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Release|x64 = Release|x64
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {67131301-2A24-437B-8B18-9498812D7B0E}.Debug|x64.ActiveCfg = Debug|x64
15 | {67131301-2A24-437B-8B18-9498812D7B0E}.Debug|x64.Build.0 = Debug|x64
16 | {67131301-2A24-437B-8B18-9498812D7B0E}.Release|x64.ActiveCfg = Release|x64
17 | {67131301-2A24-437B-8B18-9498812D7B0E}.Release|x64.Build.0 = Release|x64
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7 | the Software, and to permit persons to whom the Software is furnished to do so,
8 | subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 |
--------------------------------------------------------------------------------
/PoissonMLS/StdAfx.h:
--------------------------------------------------------------------------------
1 |
2 | //-----------------------------------------------------------------------------
3 | //- StdAfx.h : include file for standard system include files,
4 | //- or project specific include files that are used frequently,
5 | //- but are changed infrequently
6 | //-----------------------------------------------------------------------------
7 | #pragma once
8 |
9 | //-----------------------------------------------------------------------------
10 | //----- This file is preprocessor symbol driven.
11 | //----- Define:
12 | //----- _PYTHON_MODULE_ to include and import Python headers and libs in your project.
13 | //#define _PYTHON_MODULE_
14 | //----- _MAYA_QT_ to include and import Maya QT headers and libs in your project.
15 | //#define _MAYA_QT_
16 | //----- _MAYA_VP2_ to include and import Maya Viewport 2.0 headers and libs in your project.
17 | //#define _MAYA_VP2_
18 |
19 | #include "../mayaHeaders.h"
20 | #ifdef NT_PLUGIN
21 | #include
22 | #else
23 | #define _T(a) a
24 | #endif
25 |
26 | //-----------------------------------------------------------------------------
27 | //----- If you need MFnPlugin definition more than once
28 | //- MNoVersionString is needed on MacOS and Linux to avoid multiple MApiVersion definition
29 | //#define MNoVersionString
30 | //- MNoPluginEntry is needed on Windows platform to avoid multiple DllMain definition
31 | //#define MNoPluginEntry
32 | //#include
33 |
--------------------------------------------------------------------------------
/MayaPlugin.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | $(SolutionDir)$(Configuration)\
7 | $(SolutionDir)$(Configuration)\
8 | .mll
9 |
10 |
11 |
12 | Full
13 |
14 |
15 |
16 |
17 | Speed
18 | _WINDLL;NT_PLUGIN;NDEBUG;REQUIRE_IOSTREAM;_WIN64%(PreprocessorDefinitions)
19 | true
20 | C:\Program Files\Autodesk\Maya2016\include;
21 |
22 |
23 | /export:initializePlugin /export:uninitializePlugin %(AdditionalOptions)
24 | OpenMaya.lib;OpenMayaRender.lib;OpenMayaAnim.lib;Foundation.lib;
25 | C:\Program Files\Autodesk\Maya2016\lib
26 | false
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/MayaPluginDebug.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | $(SolutionDir)$(Configuration)\
7 | $(SolutionDir)$(Configuration)\
8 | .mll
9 | <_PropertySheetDisplayName>MayaPluginDebug
10 |
11 |
12 |
13 | Disabled
14 |
15 |
16 |
17 |
18 | Speed
19 | _WINDLL;NT_PLUGIN;REQUIRE_IOSTREAM;_WIN64%(PreprocessorDefinitions)
20 | true
21 | C:\Program Files\Autodesk\Maya2016\include;
22 |
23 |
24 | /export:initializePlugin /export:uninitializePlugin %(AdditionalOptions)
25 | OpenMaya.lib;OpenMayaRender.lib;OpenMayaAnim.lib;Foundation.lib;
26 | C:\Program Files\Autodesk\Maya2016\lib
27 | true
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/PoissonMLS.xcodeproj/project.xcworkspace/xcshareddata/cageDeformer.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | E7C2CEA8-CE88-4D97-9284-A9874900D32E
9 | IDESourceControlProjectName
10 | cageDeformer
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 912A53A2095059FA181F9D8B8218E738CEF205A1
14 | github.com:shizuo-kaji/CageDeformerMaya.git
15 |
16 | IDESourceControlProjectPath
17 | cageDeformer.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 912A53A2095059FA181F9D8B8218E738CEF205A1
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | github.com:shizuo-kaji/CageDeformerMaya.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | 912A53A2095059FA181F9D8B8218E738CEF205A1
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 912A53A2095059FA181F9D8B8218E738CEF205A1
36 | IDESourceControlWCCName
37 | cageDeformer
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile for OS-X
2 |
3 | MAYA_LOCATION = /Applications/Autodesk/maya
4 |
5 | PROJ1 = PoissonMLS
6 | SOURCE1 = ./$(PROJ1)/$(PROJ1).cpp
7 | OBJECT1 = ./$(PROJ1).o
8 | ASM1 = ./$(PROJ1).s
9 |
10 | INCLUDES = -I$(MAYA_LOCATION)/devkit/include/ -I./ -I../ -I/usr/local/include/eigen3/
11 | LIBS = -L$(MAYA_LOCATION)/Maya.app/Contents/MacOS -lOpenMaya -lOpenMayaAnim -lOpenMayaRender -lOpenMayaUI -lFoundation
12 | ISYSROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
13 |
14 | #compiler options
15 | CC = /usr/bin/g++
16 | LD = /usr/bin/g++
17 | CLANG = /usr/bin/clang
18 |
19 | CFLAGS = -DCC_GNU_ -DOSMac_ -DOSMacOSX_ \
20 | -DOSMac_MachO_ -D_LANGUAGE_C_PLUS_PLUS \
21 | -include "$(MAYA_LOCATION)/devkit/include/maya/OpenMayaMac.h" \
22 | -DMAC_PLUGIN -D_BOOL -DREQUIRE_IOSTREAM -O2 -mavx
23 | #CFLAGS += -fopenmp
24 | C++FLAGS = $(CFLAGS) $(WARNFLAGS) $(ERROR_FLAGS) -fno-gnu-keywords
25 | LDFLAGS = $(C++FLAGS)
26 | DYNLIB_LOCATION = $(MAYA_LOCATION)/Maya.app/Contents/MacOS
27 |
28 | LDFLAGS += -isysroot $(ISYSROOT) $(ARCH_FLAGS) -headerpad_max_install_names -bundle
29 |
30 | LDFLAGS += -Wl,-exported_symbol,__Z16initializePlugin7MObject \
31 | -Wl,-exported_symbol,__Z18uninitializePlugin7MObject
32 |
33 | LREMAP = -Wl,-executable_path,"$(DYNLIB_LOCATION)"
34 | LDFLAGS += -L"$(DYNLIB_LOCATION)" $(LREMAP)
35 |
36 | .PHONY: all install clean
37 |
38 |
39 | all: $(PROJ1)
40 |
41 | $(PROJ1): $(OBJECT1)
42 | $(LD) $(LDFLAGS) $(LIBS) $^ -o $@.bundle
43 |
44 | $(OBJECT1): $(ASM1)
45 | $(CLANG) -c $^
46 |
47 | $(ASM1): $(SOURCE1)
48 | $(CC) -S $(INCLUDES) $(C++FLAGS) $^
49 |
50 | install:
51 | mv $(PROJ1).bundle /Users/Shared/Autodesk/maya/plug-ins/
52 |
53 | clean:
54 | rm -f $(PROJ1).bundle $(OBJECT1) $(ASM1)
55 |
--------------------------------------------------------------------------------
/deformerConst.h:
--------------------------------------------------------------------------------
1 | //
2 | // deformerConst.h
3 | //
4 |
5 | #pragma once
6 |
7 | #ifndef ProbeDeformer_deformerConst_h
8 | #define ProbeDeformer_deformerConst_h
9 |
10 | // parametrisation mode
11 | #define BM_SRL 0 // sym^+ so(3) R^3
12 | #define BM_SSE 1 // sym^+ se(3)
13 | #define BM_LOG3 3 // gl(3) R^3
14 | #define BM_LOG4 4 // aff(3)
15 | #define BM_SQL 5 // Sym quat R^3
16 | #define BM_SlRL 6 // Sym so(3) R^3
17 | #define BM_AFF 10 // Aff(3)
18 | #define BM_OFF -1
19 |
20 | // weight normalisation mode
21 | #define NM_NONE 0
22 | #define NM_LINEAR 1
23 | #define NM_SOFTMAX 2
24 |
25 | // weight mode
26 | #define WM_INV_DISTANCE 0
27 | #define WM_CUTOFF_DISTANCE 1
28 | #define WM_DRAW 2
29 | #define WM_HARMONIC 16
30 | #define WM_HARMONIC_ARAP 16
31 | #define WM_HARMONIC_COTAN 17
32 | #define WM_HARMONIC_TRANS 18
33 |
34 | // tetrahedra construction mode
35 | #define TM_FACE 0
36 | #define TM_EDGE 1
37 | #define TM_VERTEX 2
38 | #define TM_VFACE 3 // for each vertex and an adjacent face, make a tet by adding the face normal to the vertex
39 |
40 | // cage mode
41 | #define CM_MVC 8
42 | #define CM_MLS 16
43 | #define CM_MLS_AFF 16
44 | #define CM_MLS_SIM 17
45 | #define CM_MLS_RIGID 18
46 |
47 | // MLS mode
48 | #define MLS_OFF -1
49 | #define MLS_AFF 0
50 | #define MLS_RIGID 1
51 | #define MLS_SIM 2
52 | #define MLS_POSITIVE_DET 4
53 |
54 |
55 | // constraint mode
56 | #define CONSTRAINT_NEIGHBOUR 0
57 | #define CONSTRAINT_CLOSEST 1
58 |
59 | // stiffness mode
60 | #define SM_NONE 0
61 | #define SM_PAINT 1
62 | #define SM_LEARN 2
63 |
64 | // visualisation mode
65 | #define VM_OFF 0
66 | #define VM_ENERGY 1
67 | #define VM_EFFECT 2
68 | #define VM_CONSTRAINT 3
69 | #define VM_STIFFNESS 4
70 |
71 | // error codes
72 | #define ERROR_ARAP_PRECOMPUTE 1
73 | #define INCOMPATIBLE_MESH 2
74 | #define ERROR_ATTR 4
75 | #define ERROR_MLS_SINGULAR 8
76 |
77 |
78 | #endif
79 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | PoissonMLS plugin for Maya
2 | /**
3 | * @brief Poisson MLS Deformer plugins for Maya
4 | * @section LICENSE The MIT License
5 | * @section requirements: Eigen 3: http://eigen.tuxfamily.org/
6 | * @section Autodesk Maya: http://www.autodesk.com/products/autodesk-maya/overview
7 | * @section (included) AffineLib: https://github.com/shizuo-kaji/AffineLib
8 | * @version 0.10
9 | * @date 19/Nov/2016
10 | * @author Shizuo KAJI
11 | */
12 |
13 | ## The plugins
14 | This is a deformer plugin based on the Moving Least Square deformation
15 | and the Poisson mesh editing techniques.
16 | The algorithm is presented at MEIS2016:
17 |
18 | http://www.skaji.org/files/MEIS2016-MLS.pdf
19 |
20 |
21 | ## How to compile:
22 | - Get devkit at https://www.autodesk.com/developmaya
23 | - Mac OS: Look at the included Xcode project file
24 | - Windows: Look at the included Visual Studio project. __DO NOT__ turn on AVX instructions.
25 | - Other: Look at the included Makefile
26 | - on some systems, specifying the compiler option -DEIGEN_DONT_VECTORIZE may be necessary to avoid compilation errors (thank giordi91 for this information)
27 |
28 |
29 | ## How to use:
30 | - put the plugins in "MAYA_PLUG_IN_PATH"
31 | - put the UI python script in "MAYA_SCRIPT_PATH"
32 | - open script editor in Maya and type in the following Python command:
33 |
34 | ```python
35 | import ui_PoissonMLS as ui
36 | ui.UI_PoissonMLS()
37 | ```
38 |
39 | - Select multiple objects which you would like to make control points.
40 | - While holding the shift key, select the target mesh to be deformed.
41 | (that is, the target mesh is the last among the selected objects.)
42 | - Create deformer node from the menu of the included UI script.
43 | - By default, the weight(influence) of each control point is connected by the scale attribute.
44 |
45 | ## LIMITATION:
46 | The "poisson" option works only with clean meshes.
47 | First apply "Cleanup" from "Mesh" menu
48 | to remove zero faces and edges, non-manifold geometry, etc.
49 |
--------------------------------------------------------------------------------
/PoissonMLS/PoissonMLS.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #pragma comment(linker, "/export:initializePlugin /export:uninitializePlugin")
4 |
5 | #include
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | #include "../affinelib.h"
12 | #include "../deformerConst.h"
13 | #include "../tetrise.h"
14 | #include "../MeshMaya.h"
15 | #include "../laplacian.h"
16 | #include "../blendAff.h"
17 | #include "../distance.h"
18 |
19 | using namespace Eigen;
20 |
21 | class MLSDeformerNode : public MPxDeformerNode{
22 | public:
23 | MLSDeformerNode(): numPrb(0) {};
24 | virtual MStatus deform( MDataBlock& data, MItGeometry& itGeo, const MMatrix &localToWorldMatrix, unsigned int mIndex );
25 | static void* creator();
26 | static MStatus initialize();
27 |
28 | static MTypeId id;
29 | static MString nodeName;
30 | static MObject aMLSMode;
31 | static MObject aNormExponent;
32 | static MObject aWeightMode;
33 | static MObject aEffectRadius;
34 | static MObject aNormaliseWeight;
35 | static MObject aAreaWeighted;
36 | static MObject aNeighbourWeighting;
37 | static MObject aPositiveWeight;
38 | static MObject aCtlPoints;
39 | static MObject aInitCtlPoints;
40 | static MObject aRecompMLS;
41 | static MObject aRecompARAP;
42 | static MObject aPoisson;
43 | static MObject aCtlWeight;
44 | static MObject aTetMode;
45 | static MObject aIteration;
46 | static MObject aConstraintMode;
47 | static MObject aConstraintWeight;
48 | static MObject aConstraintRadius;
49 |
50 |
51 |
52 | private:
53 | Distance D;
54 | Laplacian mesh;
55 | std::vector< std::vector > w; // weight for the target mesh points
56 | int numPrb;
57 | int isError;
58 | // mesh
59 | std::vector< edge > edgeList;
60 | std::vector vertexList;
61 | std::vector faceList;
62 | std::vector pts;
63 | std::vector constraint;
64 | std::vector icenter;
65 | std::vector tetCenter; // location of tet
66 | //
67 | std::vector p;
68 | std::vector PPI;
69 | std::vector trPP;
70 | std::vector Q;
71 | };
72 |
73 |
--------------------------------------------------------------------------------
/PoissonMLS.xcodeproj/xcuserdata/kaji.xcuserdatad/xcschemes/PoissonMLS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
66 |
67 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/blendAff.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file blendAff.h
3 | * @brief blending ffine transformations
4 | * @section LICENSE The MIT License
5 | * @section requirements: Eigen library
6 | * @version 0.10
7 | * @date Oct. 2016
8 | * @author Shizuo KAJI
9 | */
10 |
11 | #pragma once
12 |
13 | #include