浏览代码

add contents from svn

/main
Lasse Jon Fuglsang Pedersen 5 年前
当前提交
8541826c
共有 255 个文件被更改,包括 12094 次插入0 次删除
  1. 8
      Editor.Deps.meta
  2. 8
      Editor.meta
  3. 5
      LICENSE.md
  4. 7
      LICENSE.md.meta
  5. 7
      README.md.meta
  6. 8
      Runtime.meta
  7. 8
      ShaderLibrary.meta
  8. 13
      TODO.txt
  9. 7
      TODO.txt.meta
  10. 16
      Third Party Notices.md
  11. 7
      Third Party Notices.md.meta
  12. 13
      package.json
  13. 7
      package.json.meta
  14. 8
      Editor.Deps/Accord.NET.meta
  15. 54
      Editor.Deps/Accord.NET/Contributors.txt
  16. 7
      Editor.Deps/Accord.NET/Contributors.txt.meta
  17. 514
      Editor.Deps/Accord.NET/Copyright.txt
  18. 7
      Editor.Deps/Accord.NET/Copyright.txt.meta
  19. 534
      Editor.Deps/Accord.NET/License.txt
  20. 7
      Editor.Deps/Accord.NET/License.txt.meta
  21. 8
      Editor.Deps/Accord.NET/Release.meta
  22. 1001
      Editor.Deps/Accord.NET/Release/Accord.Math.Core.dll
  23. 67
      Editor.Deps/Accord.NET/Release/Accord.Math.Core.dll.meta
  24. 1001
      Editor.Deps/Accord.NET/Release/Accord.Math.dll
  25. 67
      Editor.Deps/Accord.NET/Release/Accord.Math.dll.meta
  26. 1001
      Editor.Deps/Accord.NET/Release/Accord.Statistics.dll
  27. 67
      Editor.Deps/Accord.NET/Release/Accord.Statistics.dll.meta
  28. 1001
      Editor.Deps/Accord.NET/Release/Accord.dll
  29. 69
      Editor.Deps/Accord.NET/Release/Accord.dll.meta
  30. 1
      Editor.Deps/Accord.NET/Version.txt
  31. 7
      Editor.Deps/Accord.NET/Version.txt.meta
  32. 8
      Editor.Deps/CSparse.NET.meta
  33. 505
      Editor.Deps/CSparse.NET/LICENSE
  34. 7
      Editor.Deps/CSparse.NET/LICENSE.meta
  35. 20
      Editor.Deps/CSparse.NET/README.md
  36. 7
      Editor.Deps/CSparse.NET/README.md.meta
  37. 8
      Editor.Deps/CSparse.NET/Release.meta
  38. 8
      Editor.Deps/CSparse.NET/Release/bin.meta
  39. 1001
      Editor.Deps/CSparse.NET/Release/bin/CSparse.dll
  40. 292
      Editor.Deps/CSparse.NET/Release/bin/CSparse.dll.mdb
  41. 7
      Editor.Deps/CSparse.NET/Release/bin/CSparse.dll.mdb.meta
  42. 69
      Editor.Deps/CSparse.NET/Release/bin/CSparse.dll.meta
  43. 538
      Editor.Deps/CSparse.NET/Release/bin/CSparse.pdb
  44. 7
      Editor.Deps/CSparse.NET/Release/bin/CSparse.pdb.meta
  45. 1001
      Editor.Deps/CSparse.NET/Release/bin/CSparse.xml
  46. 7
      Editor.Deps/CSparse.NET/Release/bin/CSparse.xml.meta
  47. 15
      Editor.Deps/Unity.DemoTeam.DigitalHuman.Editor.Deps.asmdef
  48. 7
      Editor.Deps/Unity.DemoTeam.DigitalHuman.Editor.Deps.asmdef.meta
  49. 7
      Editor.Deps/Unity.DemoTeam.DigitalHuman.Editor.Deps_Dummy.cs
  50. 11
      Editor.Deps/Unity.DemoTeam.DigitalHuman.Editor.Deps_Dummy.cs.meta
  51. 8
      Editor/CustomPasses.meta
  52. 44
      Editor/CustomPasses/NormalBufferBlurPassDrawer.cs
  53. 11
      Editor/CustomPasses/NormalBufferBlurPassDrawer.cs.meta
  54. 8
      Editor/MeshTools.meta
  55. 536
      Editor/MeshTools/MeshLaplacian.cs
  56. 11
      Editor/MeshTools/MeshLaplacian.cs.meta
  57. 95
      Editor/SkinAttachmentEditor.cs
  58. 11
      Editor/SkinAttachmentEditor.cs.meta
  59. 164
      Editor/SkinAttachmentTargetEditor.cs
  60. 11
      Editor/SkinAttachmentTargetEditor.cs.meta
  61. 752
      Editor/SkinDeformationClipEditor.cs
  62. 11
      Editor/SkinDeformationClipEditor.cs.meta
  63. 131
      Editor/SkinDeformationClipPreview.cs
  64. 11
      Editor/SkinDeformationClipPreview.cs.meta
  65. 397
      Editor/SkinDeformationFitting.cs
  66. 11
      Editor/SkinDeformationFitting.cs.meta
  67. 27
      Editor/SkinDeformationPlayableAssetEditor.cs
  68. 11
      Editor/SkinDeformationPlayableAssetEditor.cs.meta
  69. 51
      Editor/SnappersHeadImporterEditor.cs
  70. 11
      Editor/SnappersHeadImporterEditor.cs.meta
  71. 179
      Editor/SnappersHeadRendererEditor.cs
  72. 11
      Editor/SnappersHeadRendererEditor.cs.meta
  73. 21
      Editor/Unity.DemoTeam.DigitalHuman.Editor.asmdef
  74. 7
      Editor/Unity.DemoTeam.DigitalHuman.Editor.asmdef.meta
  75. 8
      Runtime/Attributes.meta
  76. 109
      Runtime/Attributes/CmpFieldAttribute.cs
  77. 11
      Runtime/Attributes/CmpFieldAttribute.cs.meta
  78. 32
      Runtime/Attributes/EditableIfAttribute.cs
  79. 11
      Runtime/Attributes/EditableIfAttribute.cs.meta
  80. 24
      Runtime/Attributes/EnumFlagAttribute.cs
  81. 11
      Runtime/Attributes/EnumFlagAttribute.cs.meta
  82. 30
      Runtime/Attributes/ReadOnlyAttribute.cs
  83. 11
      Runtime/Attributes/ReadOnlyAttribute.cs.meta
  84. 35
      Runtime/Attributes/VisibleIfAttribute.cs
  85. 11
      Runtime/Attributes/VisibleIfAttribute.cs.meta
  86. 8
      Runtime/CustomPasses.meta
  87. 203
      Runtime/CustomPasses/NormalBufferBlurPass.cs

8
Editor.Deps.meta


fileFormatVersion: 2
guid: ed033090741284047951e4eee7b2daa8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Editor.meta


fileFormatVersion: 2
guid: b5f0a27e3405a2f429630e18a1518887
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

5
LICENSE.md


Copyright © 2019 Unity Technologies ApS
Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License).
Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions.

7
LICENSE.md.meta


fileFormatVersion: 2
guid: a4345fccf33025d43bd8f021bc7e46d0
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

7
README.md.meta


fileFormatVersion: 2
guid: 5ad31e78e43e7d047bc8cc281d1c9d9f
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Runtime.meta


fileFormatVersion: 2
guid: 55f0de741bd9567488007bc7812d5ef7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
ShaderLibrary.meta


fileFormatVersion: 2
guid: ac7bea9faba84f14688f139b275c778b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

13
TODO.txt


X missing specular for some reason
X make the snappers setup a bit more generic
X move eye code to shadergraph
X fix attachments conservative bounds
X fix attachments scaling
X pending HDRP tasks
X EyeMasterNode
X StackLitMasterNode custom specular occlusion
X implement the tearline
X blur decals?
X CustomPassInjectionPoint.AfterGBuffer (-> AfterOpaqueDepthAndNormal)
* implement the control rig

7
TODO.txt.meta


fileFormatVersion: 2
guid: 2ead9af64b3f86b47ad1c448ec147e12
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

16
Third Party Notices.md


This package contains third-party software components governed by the license(s) indicated below:
---------
Component Name: Accord.NET
License Type: LGPL 2.1
See: [Editor.Deps/Accord.NET/License.txt](Editor.Deps/Accord.NET/License.txt)
[Provide ]
---------
Component Name: CSparse.NET
License Type: LGPL 2.1
See: [Editor.Deps/CSparse.NET/LICENSE](Editor.Deps/CSparse.NET/LICENSE)

7
Third Party Notices.md.meta


fileFormatVersion: 2
guid: 106b22cf98968a648842c80c89f72788
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

13
package.json


{
"name": "com.unity.demoteam.digital-human",
"displayName": "Demo Team Digital Human",
"version": "0.1.0-preview",
"unity": "2019.3",
"dependencies": {
"com.unity.demoteam.attributes": "0.1.0-preview",
"com.unity.entities": "0.1.1-preview",
"com.unity.timeline": "1.2.6",
"com.unity.render-pipelines.high-definition": "7.1.6"
},
"description": "Library of digital human tech features from 'The Heretic'."
}

7
package.json.meta


fileFormatVersion: 2
guid: e1bcaaccf14b0314aa8d1ee686ec7798
PackageManifestImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Editor.Deps/Accord.NET.meta


fileFormatVersion: 2
guid: c7f61f030f7b3b14d9c46b35b654219b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

54
Editor.Deps/Accord.NET/Contributors.txt


The Accord.NET Framework
http://accord-framework.net
This project has been the result of years of work, in which several
contributors, including engineers, researchers and hobbyists alike
decided to share their work and contribute to its development. The
space below enlists a few of those people who either agreed to help
or actively participated on its development:
- Alex Cross
- Anders Gustafsson
- Antonino Porcino
- Antonis Kalapodis
- Andrew Kirillov
- Ashley Messer
- Benjamin Collins
- Darko Juric
- Darren Schroeder
- David Durrleman
- Doug Blank
- Hans Wolff
- Hashem Zawary
- Ivan Pizhenko
- Marcos Diego Catalano
- Max B�gler
- Mathias Brandewinder
- Mikkel Porse Rasmussen
- Peter Sergio Larsen
- Remy Disp
- Yang Ting
In May 2015, the project has been merged with the AForge.NET codebase,
incorporating the work of even more contributors. In a true spirit of
community, notorious previous contributors are also listed below:
- Andrew Kirillov (the project creator, with the best ideas)
- F�bio Caversan
- Alejandro Pirola
- Cezary Wagner
- Dale McCoy
- Fabio Caversan
- Frank Nagl
- Israel Lot
- Jeremy Noring
- Joan Charmant
- Joris Geurts
- Krzysztof Blacha
- Kyle Parrigan
- Markus Falkensteiner
- Mladen Prajdic
- Volodymyr Goncharov
- Yves Vander Haeghen

7
Editor.Deps/Accord.NET/Contributors.txt.meta


fileFormatVersion: 2
guid: 2ab30b860d61f24448b41d0f6f2d1000
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

514
Editor.Deps/Accord.NET/Copyright.txt


The Accord.NET Framework
Copyright (c) 2009-2017, Accord.NET Authors <authors @ accord-framework.net>
This library is free software; you can redistribute it and/or modify it under the terms of
the GNU Lesser General Public License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The copyright holders provide no reassurances that the source code provided does
not infringe any patent, copyright, or any other intellectual property rights of
third parties. The copyright holders disclaim any liability to any recipient for
claims brought against recipient by any third party for infringement of that parties
intellectual property rights.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Some modules of this library are distributed under the GPL, and not the LGPL. Those modules
have been marked with .GPL.dll in their name. All relevant licensing information should also
be accompanying each respective source code. Other extra modules may carry other restrictions.
Please see relevant source headers for details.
The documentation sections contains references to Wikipedia and is thus entirely available under the
Creative Commons Attribution/Share-Alike License. All referenced sections include a hyperlink to the
original article page. If you think you have found something which has not been properly linked, please
let me know so it can be corrected.
Overall framework architecture and style was greatly inspired by AForge.NET. In May 2015, this project
has been merged with the AForge.NET framework since public support for AForge.NET has ended. The original
AForge.NET Framework is a copyrighted work by Andrew Kirillov, altough developed and shared under the same
LGPL license.
This library also contains routines adapted from Lutz Roeder's Mapack for .NET, LAPACK and Jama
routines. Jama has been released under the public domain. LAPACK has been released under a compatible
3-clause BSD license, listed below. Original ArrayDataView code is copyright (c) 2004 Mihail Stefanov,
licensed under the LGPL with permission of the original author. Original SortableBindingList source
code is copyright (c) 2008 Tim Van Wassenhove, licensed under the LGPL with permission of the original
author. Statistics module contains code for computing the Kolmogorov-Smirnov distribution based on
original code by Richard Simard, redistributed under the LGPL with permission of the original author.
Imaging module contains code for Gabor filter based on the original code by Max Bügler, redistributed
under the LGPL with permission of the original author.
The Augmented Lagrangian Solver implementation is based on the NLopt Numerical Optimization Library,
copyright (c) 2008 Steven G. Johnson, distributed under the MIT license. Some image filters have been
contributed by Diego Catalano, distributed under the LGPL license and included with permission of the
original author. Mathematics module includes the Kinematic joint models by Rémy Dispagne, licensed
under the LGPL with permission of the original author. The Haar Object detector contains contributions
from Darko Jurić, added with permission of the original author.
The Accord.Vision module includes definitions for Haar Cascades created by Modesto Castrillon-Santana,
distributed under the LGPL with permission of the original author. The SURF interest points detector
implementation is based on code by Christopher Evans, licensed under the LGPL with permission of the
original author. The FAST corners detector has been created using a code generation tool created by
Edward Rosten, distributed under a compatible 3-clause BSD license, listed below. The Camshift tracker
implementation is based on the FaceIt ActionScript Camshift tracker, copyright (c) 2009 Benjamin Jung,
distributed under the MIT license, listed below. The Project Marilena is copyright (c) 2008 Masakazu
Ohtsuka, distributed under a compatible 2-clause BSD license, listed below. See actual sources for
details.
Below are the licenses applying to specific sections of the code. Those are not
applicable to the work as a whole (the Framework), but to the specifics of each
portion of the framework. See actual sources for details.
The FaceIt Library - Copyright (C) 2009 Benjamin Jung
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
The Marilena Project - Copyright (C) 2008 Masakazu Ohtsuka
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistribution's of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistribution's 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 Intel Corporation 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.
The FAST corners detector - Copyright (C) 2006-2010 Edward Rosten
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
* Neither the name of the University of Cambridge nor the names of
its contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
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 OWNER 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.
The Cephes Math Library - Copyright (C) 1984-2000 Stephen L. Moshier
Release 2.8 - June, 2000 Copyright 1984, 1987, 1988, 2000 by Stephen L. Moshier
Some software in this archive may be from the book _Methods and
Programs for Mathematical Functions_ (Prentice-Hall or Simon & Schuster
International, 1989) or from the Cephes Mathematical Library, a
commercial product. In either event, it is copyrighted by the author.
What you see here may be used freely but it comes with no support or
guarantee.
The two known misprints in the book are repaired here in the
source listings for the gamma function and the incomplete beta
integral.
Stephen L. Moshier
moshier@na-net.ornl.gov
The LAPACK Linear Algebra Package - Copyright (C) 1992-2010
Copyright (c) 1992-2010 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved.
Copyright (c) 2000-2010 The University of California Berkeley. All rights reserved.
Copyright (c) 2006-2010 The University of Colorado Denver. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer listed
in this license in the documentation and/or other materials
provided with the distribution.
- Neither the name of the copyright holders nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
The copyright holders provide no reassurances that the source code
provided does not infringe any patent, copyright, or any other
intellectual property rights of third parties. The copyright holders
disclaim any liability to any recipient for claims brought against
recipient by any third party for infringement of that parties
intellectual property rights.
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
OWNER 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.
NLopt Numerical Optimization Library - Copyright (c) 2008-2014 Steven G. Johnson
Copyright (c) 2007-2011 Massachusetts Institute of Technology
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Peter Kovesi's Computer Vision functions - Copyright (c) 1995-2010 Peter Kovesi
Copyright (c) 1995-2010 Peter Kovesi
Centre for Exploration Targeting
School of Earth and Environment
The University of Western Australia
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The software is provided "as is", without warranty of any kind, express or
implied, including but not limited to the warranties of merchantability,
fitness for a particular purpose and noninfringement. In no event shall the
authors or copyright holders be liable for any claim, damages or other liability,
whether in an action of contract, tort or otherwise, arising from, out of or in
connection with the software or the use or other dealings in the software.
LibSVM & liblinear library for Support Vector Machines
Copyright (c) 2000-2014 Chih-Chung Chang and Chih-Jen Lin
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.
3. Neither name of copyright holders nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
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 REGENTS 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.
Circular Statistics Toolbox (Directional Statistics)
Copyright © Philipp Berens, 2006-2012
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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 OWNER 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.
LumenWorks.Framework.IO.CSV.CsvReader - A Fast CSV Reader
Copyright © Sebastien Lorion, 2005-2011
All rights reserved.
MIT license (http://en.wikipedia.org/wiki/MIT_License)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Munkres algorithm - The Hungarian method for solving the assignment problem
The MIT License (MIT)
Copyright (c) 2000 Robert A. Pilgrim
Murray State University
Dept. of Computer Science & Information Systems
Murray,Kentucky
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
LIBLINEAR - A library for large linear classification
Copyright (c) 2007-2011 The LIBLINEAR Project.
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.
3. Neither name of copyright holders nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
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 REGENTS 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.
Snowball: A language for stemming algorithms
Copyright (c) 2001, Dr Martin Porter
Copyright (c) 2004,2005, Richard Boulton
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.
3. Neither the name of the Snowball project nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
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 OWNER 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.
MathExtension: Mathematical extensions and structures for the .NET framework
The MIT License(MIT)
Copyright(c) 2015 AJ Richardson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Partitioning around medoids and Voronoi iteration algorithm for
the K-Medoids clustering: algorithm implementation and unit tests
The MIT License (MIT)
Copyright (c) 2017 Ivan Pizhenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Statistical Quantiles: implementation and unit tests
The MIT License (MIT)
Copyright (c) 2017 Ivan Pizhenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

7
Editor.Deps/Accord.NET/Copyright.txt.meta


fileFormatVersion: 2
guid: 3e47971e4dfb3c541a3bdcc50ebc161d
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

534
Editor.Deps/Accord.NET/License.txt


The Accord.NET Framework
Copyright (c) 2009-2017, Accord.NET Authors <authors@accord-framework.net>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at
your option) any later version.
The copyright holders provide no reassurances that the source code provided
does not infringe any patent, copyright, or any other intellectual property
rights of third parties. The copyright holders disclaim any liability to
any recipient for claims brought against recipient by any third party for
infringement of that parties intellectual property rights.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
for more details.
Warning: Depending on your installation options, some modules of the library
may be available under different licenses. Those modules have been identified
as GPL or noncommercial only. In this case, check the copyright headers of each
extra module for more details before installing or using them.
The integral text of the GNU Lesser General Public License is reproduced
below. Installing or using this software means you have understand and agreed
by the terms of the license. A official version of the license is also
available at <http://www.gnu.org/licenses/>.
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice

7
Editor.Deps/Accord.NET/License.txt.meta


fileFormatVersion: 2
guid: 0e2b08e860b487b4980780da649265a0
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Editor.Deps/Accord.NET/Release.meta


fileFormatVersion: 2
guid: c933a188eef919b4eb126d790934c103
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
Editor.Deps/Accord.NET/Release/Accord.Math.Core.dll
文件差异内容过多而无法显示
查看文件

67
Editor.Deps/Accord.NET/Release/Accord.Math.Core.dll.meta


fileFormatVersion: 2
guid: 92f3ad6d7e829e84ea633534c2d504fa
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
DefaultValueInitialized: true
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

1001
Editor.Deps/Accord.NET/Release/Accord.Math.dll
文件差异内容过多而无法显示
查看文件

67
Editor.Deps/Accord.NET/Release/Accord.Math.dll.meta


fileFormatVersion: 2
guid: a5332589f824e224981966ba745a8b2d
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
DefaultValueInitialized: true
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

1001
Editor.Deps/Accord.NET/Release/Accord.Statistics.dll
文件差异内容过多而无法显示
查看文件

67
Editor.Deps/Accord.NET/Release/Accord.Statistics.dll.meta


fileFormatVersion: 2
guid: c891b321734026040be617a7c9d5f86d
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
DefaultValueInitialized: true
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

1001
Editor.Deps/Accord.NET/Release/Accord.dll
文件差异内容过多而无法显示
查看文件

69
Editor.Deps/Accord.NET/Release/Accord.dll.meta


fileFormatVersion: 2
guid: ec53565f19db0d44bbb81507db5c375c
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

1
Editor.Deps/Accord.NET/Version.txt


3.8.0

7
Editor.Deps/Accord.NET/Version.txt.meta


fileFormatVersion: 2
guid: c4908ede04ad07442abef70306b2d285
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Editor.Deps/CSparse.NET.meta


fileFormatVersion: 2
guid: dffcc2978d647a24090de1d05b6ebef6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

505
Editor.Deps/CSparse.NET/LICENSE


GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
(This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.)
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
{description}
Copyright (C) {year} {fullname}
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random
Hacker.
{signature of Ty Coon}, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

7
Editor.Deps/CSparse.NET/LICENSE.meta


fileFormatVersion: 2
guid: 45c103de87e0482478aa1a5b27d20ba6
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

20
Editor.Deps/CSparse.NET/README.md


# CSparse.NET
A concise library for solving sparse linear systems with direct methods. The code is a C# port of CSparse, written by Tim Davis and part of the [SuiteSparse](http://faculty.cse.tamu.edu/davis/suitesparse.html) project.
[![Build status](https://ci.appveyor.com/api/projects/status/ji9ig6jrh8u45tb8?svg=true)](https://ci.appveyor.com/project/wo80/csparse-net)
[![Nuget downloads](http://wo80.bplaced.net/php/badges/nuget-dt-csparse.svg)](https://www.nuget.org/packages/CSparse)
## Features
* Sparse LU, Cholesky and QR decomposition of real and complex systems
* Fill-reducing orderings
* Dulmage-Mendelsohn decomposition
All methods are described in detail in the excellent textbook _Direct Methods for Sparse Linear Systems, SIAM, Philadelphia, PA, 2006_ by Tim Davis.
## Examples
* Creating a [sparse LU factorization](https://github.com/wo80/CSparse.NET/wiki/Sparse-LU-example)
* Creating a [sparse Cholesky factorization](https://github.com/wo80/CSparse.NET/wiki/Sparse-Cholesky-example)
* Creating a [sparse QR factorization](https://github.com/wo80/CSparse.NET/wiki/Sparse-QR-example)
* Using [Math.NET Numerics and CSparse.NET](https://github.com/wo80/CSparse.NET/wiki/Math.NET-Numerics-and-CSparse)

7
Editor.Deps/CSparse.NET/README.md.meta


fileFormatVersion: 2
guid: 6efc29639b6beed4090517bc7a52a98e
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Editor.Deps/CSparse.NET/Release.meta


fileFormatVersion: 2
guid: 2d4c54e23de83764baa574a55a14389c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Editor.Deps/CSparse.NET/Release/bin.meta


fileFormatVersion: 2
guid: 6371ed7a314900f4b9f45cc22cc127c6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
Editor.Deps/CSparse.NET/Release/bin/CSparse.dll
文件差异内容过多而无法显示
查看文件

292
Editor.Deps/CSparse.NET/Release/bin/CSparse.dll.mdb


��#&�E2Ɲ'ıO�M�w��E�!��p�� �� ��O�������� RC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Check.cskl}l��5
;��@�9VC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Constants.cs��R7�Ѻ5�5�k��GKXC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\GraphHelper.cs��D���G�Dۇ���SC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Helper.cs��],�E#���Ӕ@�MXC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Permutation.csM�fg��1����sVC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Converter.csE��_�P���DA�SC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Matrix.cs&~ ̱ ��� ����lC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Storage\CompressedColumnStorage.cs8(�>H�DM�.R�fC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Storage\CoordinateStorage.cs�h���v�dAI�b+��lC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Storage\DenseColumnMajorStorage.cs%�gF!�A�Ti8��'�njC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Storage\SymbolicColumnStorage.cs�Տ�@�gJ� ,�!�$jC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Properties\Resources.Designer.cs����h��#�����R}�YC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Ordering\AMD.cs��8����k�f=-"�[gC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Ordering\DulmageMendelsohn.csoa�X�=�55P{��eC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Ordering\MaximumMatching.csvk�k���-
"T��bC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\IO\MatrixMarketReader.cs����g��+��TsS�GcC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Factorization\SparseQR.cs��``e�ئ�)S�cB�_C:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Double\DenseMatrix.cs��8l��������H4e�`C:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Double\SparseMatrix.cs��* �D D���/��`C:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Double\SolverHelper.cs&MY�
��zx?/�Z�ZC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Double\Vector.cs�炌]g� �͵� pC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Double\Factorization\SparseCholesky.cs��-ˀ`<���
�\��tkC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Double\Factorization\SparseLDL.csG�Ex_�>ڜ�O"Ֆ%\jC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Double\Factorization\SparseLU.csѹ�ەU�%pim�٭� jC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Double\Factorization\SparseQR.cs��Ts,0�(���`C:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Complex\DenseMatrix.cs��ҢWڮ��@3��:�aC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Complex\SparseMatrix.cs�p�[�`'��j��97aC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Complex\SolverHelper.cs��S��F� Em����\[C:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Complex\Vector.cso(�!n��sV�+��7�TqC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Complex\Factorization\SparseCholesky.cs����`!���or�IkC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Complex\Factorization\SparseLU.cs�{'?�o~
��ЕwՍkC:\Users\lassejon\Downloads\CSparse.NET-master\CSparse.NET-master\CSparse\Complex\Factorization\SparseQR.csc�,��]W6��-Gx?
  $D  7
�"�"�"Ll  %J
�"�"�"|l  -K
�#�#�#$<mLl   P1Q
�#�#�#1,l  $P
�#�#�#! d�#�#�#ipp2jnewheaddone %J�������Ck=S#��� ʠ��+;Sc#����* ,;����
! / 91 ).95"*EM/#/$"<7#�$�$�$ikpinextparentancestorprevTLK$,K����2*-�������33��������������33*����P*����*����* )$*.8%  ')#6'" "#?-))87,2;6#�%�&�&jkpostwnextstackz"CCKL�������**+�������;S����*0�������;����*/ ! % %   -%"%&/#%("(#%F#�'�(�(ijkJpqjleafATpATi colcount
delta head next mnATwmaxfirstprevleaffirst�#"$:KLlMTSST�����������*6ccd���ǡ��+���ˡ������*���� * ST$cTc<���ۡ������*6���ߡ��"���ᡄ�����:^K����* ���衄�2*3���롄�+:���� �����������;�2s2����:����
b
:����*�������:����*6#.; 1   3  $!=-$% &))6&8/& &  ,9F0? #+$"))&#((%5"@1#%!'#($'"+4@;'!'".#%9-$$S(4(494P6%7#%I#�)�*�*qssparentjprev�|+l;33c:�������2C�������3����/   /% [3$!+(>-'!0#�/�/�/iptop�{�������3+,+[;+����   O #'$�0�1�1ptop�*$���Ӣ��L����*  ���ܢ������*8 ," )&Q/*.% �1�2�2ipnlentopApAi�Z[KMd�������3.�������L���� *���������������* �����������*0d ; ,," :E))%"&9*) /*(% �3�3�3inz�������+;����*,# !$&!�5�5�5-����   -(>?/�5�5�5A����   -(>@/�6�6�6k���� ($K�����������*/  (! %$+&
�6�6�6k���� (5$K���������*/  (! %$+&
�7�7�7ijtmpprand����4dKD%���堄�����*.�����������*0-L�������}+;����*  $ $ $ "'"&'"-5 ! '"�7�8�8knpinvy,D�����������*/   % #�9�9�9lengthcheckii���� +����+>�,D�������l����*
�������4����* )) #*0"$,''",'�:�:�: nrowsncolsvaluesrowindcolindpknzcolumnPointers columnCounts
result
rowIndices storageValuesCDCCLL[L�����������:\TKD���Ƞ���S����:SSTD$E  ! !  *-)-015/+$XJ23/+.$,4+""�;�<�<rowCount columnCountstorageij���� N$FPKL����ꠄ����전�����:����* 2!+ /2l350.)�>�>�>nrowsncolsstorageij����C;h+<\������������������:����* ,!( &)I3/*+&A�?�?�@storageij����;3��������������������*����* 2!+ l?50.)�@�A�ArowCount columnCountstorageij����C;�+<\������������������:����* 2!+ )/U350.)�B�B�Bstorageij����;3�����ʡ�����̡������*����* 2!+ lB50.)�C�C�C##�D�D�D)&�D�D�D/<LeCC  81]&,
�D�D�E�$,   .=�E�E�E� -�E�E�EhashNumhashicolrow����WO��%���֡��Sk����* .! @/4C1,�E�F�F_ ?=�F�F�F*6�G�G�G1M *
�G�G�G:L{l,l  *<3 1
�G�G�GILTeTeKKC   *:c4[2*"
�G�G�Gindexlengthpos]Ss� 0=J2�H�H�Hf�� C3
�H�H�HtargetmlL -#�H�I�Iinapaiaxk����.iwd=DCCL��������,����:
  $ .'#%!P''"
�I�I�Itarget�lL *)�J�J�JaiaxcolEndk����+H�d=;CD<�����������*.  7+ +'%!.)':5
�J�J�Jresult��C g$�K�K�Kijpcxcpciw�CKLt���ۡ������*����㡄���� 塄��3����*���� *   : H-* $,()$=83+,'KF-(
�L�L�Lnresultone�;E�e�<\  #&?Il)*�M�M�Mcolumnsnnzapairesult�;DDCD�$���t��   &,**&BhZC2hZ�N�N�Nnaxapaiiendj����'x,m4m�DTCCG�������L�������4����:����:   .%$ &$"*&%#5&1,'"�O�O�Obxbpbi�CCD��d��;   $,(RT)TO"
�P�P�P�K %
�Q�Q�Qbxbpbi�CCD,���d��;    $,(/^RT,TR"
�Q�Q�Qresult��L G*�R�R�Rnapaidiagi����k�DCDD��������d����:
 $ &*&%O7U'"�R�R�Rkiiij����%����*M����M�Y���������3����* 3�����������*X�������K�������K�����:���� *  . .4%. /1,$1,!###721,
�S�S�Sinnz�T���ɤ������
*/,S|"  )%% )1
�U�U�U��v�v   -3.3/�V�V�V��~�~   -3.3/�V�V�V�,�kl  9:4�V�V�Wfromsizetopqidxvali�������������[|<5�6�������[{��������������s����*����: 1(. *0&@&-)#?7!A1-4/1,
�W�W�WhashNumhashipk�{#%���˥����� ͥ��\����*���� *   L1. </D+)OJ1,�Y�Y�Y !! �Z�Z�Z )! �Z�Z�Z 1! �Z�Z�Z 9 �[�[�[ A �[�[�[ I �[�[�[ O<CD,�Dkkl  ^#&;..,
�[�[�[ rL�|�tete{{�{      $#%<%< 
�\�\�\result ��km$���kkm   O"777((( �\�\�\ �,PkklD   111 �]�]�]  = �]�]�]
5
�]�]�]
�768
�^�^�^
%� 9
�^�^�^
-LC ""
�^�^�^
5 6
�^�^�^
=� 7
�^�^�^target
ClL -
�_�_�_target
MlL *$
�_�_�_i����-
W���전�����*V. :1,
�_�_�_
`� H
�`�`�`targeti����/
jD�����������*V . &:1,
�`�`�`target
yD� &H
�a�a�aresult
��C S$
�a�a�atargetjindexi����P CC
�D�������S�����������*���� *  /!. (*G2-1,
�b�b�bnresult
�;E��DL  #&?RB 
�c�c�cnresult
�;E|�DL  #'4RB%
�c�c�cresultrowcolumn����D7
��������������������*���� *  >(/ 8&=F<4-
�d�d�dresultrowcolumn����H;
��������������������*���� *  M&/ 8$=UK4-
�e�e�erowcolumn����:w>j
�$e��������������������*���� *   <&/ ;RS$TD:4-
�f�f�frowcolumn����:w>j
�$e�����Ң�����Ԣ������*���� *   <&/ ;RS$TD:4-
�g�g�hresult
�T| SY
�h�i�i
�� u
�i�i�i
�� a
�i�i�i
�� <
�i�i�ijjj����!`
�$eL,?"����������� **N   -joE ;3/3+C�msh
�i�j�j
��v�v   -3.3/
�j�j�j &# �k�k�k .& �k�k�k 66 �k�k�k 9=LeCD,{l   c1]&,@7
�k�k�k R,D,E   *"0
�l�l�l d,�l  95 �l�l�lfromsizetopqidxi����� u�������[|<5s�������[����������������� *����: 1(. *0&8&-#?!A14/1,
�l�m�mnnnzresult �;CDT˼ #&*Eoc �n�n�njkpmresultcicjw �C<\[�t���ˡ������*����ӡ����� ա�������*���� *  ST : H-* #&D%1)$=83+,KF-(($ �o�o�o jnzmnanzbnzwcpci ��=CD<�5MSl�������3�����* 5LTKL    P/'+3 ))89#&D($ �p�q�q pjnzmnanzbnzbpbi result
cp ci work �|=CLKLKLlc�L�������T�4�����������*���� *=LST  0!  4/#'*++'D%6%(=C3.#&($ �r�s�s ijknznapaicpci �LKML��KL���좄�3[�����������*���� * ;  0!  &,(/<8.*,E3.#
�t�t�tijnz ��������U��� ����������*���� * }l3* '(0861-(.8 �v�v�vip ���� ����S<+���� *
 D) '#$$"GB �w�w�wnnnzresult �;CDT$˻km   "%)Irf<4 �w�x�x ; 
�x�x�x (C�4?�($ �x�x�x 7( �y�y�y :; ) �y�y�y C\ �y�y�y LX �y�y�y UY �y�y�y ^a �z�z�z g^ �z�z�z pW �z�z�z yS �z�z�z �f �z�z�z �R �{�{�{ �X �{�{�{3CpCiPWnvnextheadelendegree w
hhead d dk dextlemaxeelenkelnijkk1k2k3jlastlndensenzmaxmindegnvinvjnvk mark!wnvi"cnz#nel$p%p1&p2'p3(p4)pj*pk+pk1,pk2-pn.q/n0ok1h2C "##&L%U�K=�u�[[cde���٠������:>3cL���᠄�3;���� :cccdkkktsC3=�������C,C;3;<;;;S{JS[����:��� �����������:�JK[CCE��������\K���� :"��������Kc�����������:����
 .#K;k+�������<++Sc;<���ɡ��ccCKcJcDk���� :<S����:% *+C;SE����衄�;cKC����;T�D���� :���� :�������;;k+""�������;D[4CcCS����:k+S�������;cCc����:,SKCCC;;�KK;c�[C����:; Cc��������;c;C���Ģ��;C���Ƣ��R:s+���ʢ������͢��b����:�,S�;;CC+��������B:����:' *���䢄�;kCs�JS[3CcC���� : C�3<*����� �������b:;�������::;�������Kk���� :8�������KDk���� : "�������D����:2  3   ! ( F$(!!"!9*(,,"/!;%* !(!!!!!90.&* GB-"!7L1!!!!!!!!+6C* (3)! % &!!!( '<1.M#:,2? %#*#)"$#$#!(()&&" $"&'7'!#ND#4(!8.+.+&&6+)(3=7/.$ +%$# &0#&'+>(270* *"3- + "1 ."'##*),5>9.( +&.#'0*+.(2*<7+$$#0"& 1, *&#$$#&<))$,6,&".( -9 $"##'+WE@#)C/6BOJ$20+.-1+-2AI4.(' -!.4'7'!2#!71+  ):#3$'!$ !+%$!R+& �{�}�} �*: ��ŒÌk �\�������4����*$ $ 0#"'" ݌���� �  ������
resultATmndensepp2colptrrowind j����C�v� �DCD,,�K3E%�lKL���ԣ��ED}����:���� :=sN�  /(!  1$ #>N$?%>00,#$3"22-+& 6)& ԍ����!<k{k|kk 0!%!%""
ڏۏ܏.������3 ������nsk����C:���Ѡ��|����* )!J,'ǐѐڐijkcnzncnb1nb2Cpps rs
A m n resultpqrsccrrjimatchpinvCCi������WUSTcSSSSST\*�������2*3�������2*4�����ӍTStScD����������� *G[tk;SD�����������*0[UKKC��������*3�������r*3��������*3�������r*3#{B;�������{{����*8LSS<CCU�� "% %   -! *! &!&!&!&! "  : #6 ""?!./#/#HM".BCB.0:## +0+#%)(-(&>$:$>$:$"((%  11������ ikbnbtopxiprAp ATp
AT D�LKTlSST#���衄�D����*����������� */#�������3F[����*
3�������Z*+k��������������J*���� *.�����������
*.�����������*.      '" 3. !"  $#%%1"q#&# n#8% @1,$"% (#������ ApAiheadtailjipj2C��������c;����
:8"�*K�������[�������;C;[KC����
:����
     0! #5##(O)##$"5%#(3. ٚ����kckrj����8�;K���Ģ��C{���� *0K; $ "#5'"
������ikr�;�����2J*+K%5  4A#
؝����� .������ijnzaiap�CL���袄�5�����;����*���� *5l '  #'9(*%#0Ȟ����ijkpn2m2jimatchwcheap js
iss ps Cp qnmApAiC jmatch_offset imatch_offset"%KKKM����������������K����*���� * l���ɠ��2*���ʠ��2*3���ˠ��J*���̠��J*4%���Ѡ��R*5�*$SSTstTSSST���栄�J*3���砄�2*3���蠄�J*4[�����������*7�����������*7�������\����*% 0!' )$$)$$%   % % %      #+# )%*3"/3.*%%8'"4"<'"8" 0#M+#33 6#/#E#-n#1#5M#������foundpiheadjs�������;L;�������+����
*o;$3N�������+nC3+[����*  T����)$����������� */  E(7$ ( $&'CHC"'*"#;&#::5(<+&
������stream����$D��� R���� 8.
������reader����!0D���RǠ�� 9T
������ complexsparsepatternsymmetryparsesizesrowscolsnnz storage
upper����D�>�T�cd$d|\CG\M%  \@d,,/I>&&V6 /������ijlowerupperlinetrimtokens����k'kf�������S̄kl�,,����   (>_228&&78������mapaiajaxijnk����$_�DCCDL�������;<<����:
 $ 6),%02'"
������linetokens����%����� ����C��<e�e##e<#G##+f<+�++++���� Q  !!!!!!!!!!!!!!!! '$7�+�EO',#+#[+)+1'0'0'^+A+I'K'O'K'`7}����ŭlinetrim����!�������C����� 
 (>!7M�������$��C    ;-k.�/�������,��    <-.N/������� bM������B������ zeroipp1toplencolnap ai
ax q parent pinvm2vnzrnzleftmostwxsVbrprirxvpvivxcurrentstep!k������6>CLKKLssststtkT-˻�KKDSST�����������*7c�"#�������DD$vCSCk+��������K�������{����2�������;;����8K�tc����* �������K�;�SL����* ������������ *7C����:? CC ! .#4#&'$ ) #'#%!)'LL/'#'#$"%"%*8",!)!*";,1$%"+'"72"5!&!(F)$&%*%K'"
��ײ��mnsymCpostk�������CD�D��{� C���١������:7 (! #<YbCJ[*+&
������ikppapinvleftmostparentmn ap
ai w head tailnque�LKKKL��SSST�������2*3�������2*3�������2*3������������������*���� *�������33+�3K����* CK�������3{*�3��T:KcK����*�������D���� *# % % % 0!%%% (   4 #)%,0 ###2#2#6#)3.(#!$1 (#'$",';+%)#!##������
tjknznapairesultcp ci�CLKLTST�������3[�����������*���� * < 0!  #'#:,(,E3.#������� >
������T *
ھ۾ܾsumnormji����
WB"\�������[�����������*V����*
 /!. #A2-,1,������rnormjii���� OB����St4l���ˠ�����͠������*���� * ,���ՠ��D����:
 /!. + *B2-1, !!.)������sumnormlengthi����"BNZ\|���砄�{����*0  ) )1+#,'$������values^� 8C������Arowscolsisumj����SK$FfDCD�������d�����������:7����*  +!' !$"5.)*%
������Arowscolsisumj����]U$F{DCD�������d�����������:7����*  +!' !$"5.)2*%
������Arowscolsjcolsumi����WO)J�DCD�������4d�����������:7����*  +!' !$$"..)*%
������Arowscolsjjcolsumi����+����+~0sAb�DCD�����������
*/���ơ��<d���̡������:7����:  '+!' !$$*%$"..)3*%
������columnstargetablengthi����>\�;E�=DCD,���衄����� :>  ) &,H/(!")),'
������
ABCmnoijsum k����,�1�6~Ak�CCDCKL��������������d�����������:?����:����: ,%(!$ "#'!&#@/*++&'"
������xytargetlengthi����g���e�eCDD,����������� :6   ) PIRI"((),'
������denselength otherValuesi����?a��D$|D������������*   ) PB1,F",'������L *
������T 6
������'t N
������CS$<>8__locals0func���Š�� �x   "������ijnzG���ޠ��U��� 堄�Ջ�����*���� * }L3* '(;0861-(.������sumnormji����`KhD\�������[��� ��������*v����*
  L1. )#/0OJ,1,������normworkjij����i!\����i�|D\l���������� ��������*���� * ����������� :_ L1.+ )-/@OJ1,0.)������nzsumnormi����;�DZ\�������{����*0 % ))+#(#$������axapaiendijk����7����7}Cm�CCE���ǡ������ :
���Ρ��E���ӡ������:����:

 +.%. "*&.)!#.1,1,
������axapaiendxijik����6����6�Js�CCE���롄����� :
�������LD�����������:����: 
 +.%. "*&$.)#!#,1,1,
������axapaiyiik����_$J�CCF�������]�����������:`����: 
 4%. "*&#,721,
������axapaiyiendstartik����k/Q�CCF4�������LK�����������:><����: 
 .%. "*&#!"#41,1,
������ pjnznwxcicjcx�;E�fKFSST���碄�3������������� *����* 5SC  )!  #&?I #,($FF&,'#"
������mnanzbnzpjnzcpci cx
bp bi bx wxresult�CDCD'$e|e�eKKMKLlS���������SSC�����������:g����������� :����:;SD     0!)!  #'*+:4ITB+'# #<(3C($N3.&,'#"������onzii����:_����_��D$DD���գ�������* ���ݣ��������*  3% +)kC"61;"H"(#������ijpqnnzmarker�#t�����������*W�������#��� ����SD�;[�����* ���� * �K 'H-* $. *%+'(8)-1"KF'-(4
������ipcj�BL��� ����TD3*{[,����*  + $D) *5%'#!!#<"$.GB������pjknlplilxDKKL��������D�����������*����*  ,%  +'###./*#
������pjklplilx0<CKL���ˠ��<���Ϡ������*/����*  ,%% +'##./*#(#
������pjkupuiuxK<CKL���栄��L���전�����*����*  (!% +'#+#.+&(#
������pjknupuiuxfDKKL�������T�����������*/����*  (!  +'##.+&+#
������{ S
������!k J
������resulti����)D�����������*/ ) 2#,'������result8T| 6V������D[ )
������lengthresulti����$L,\���堄�����
*/ ) #!','������lengthi����],�����������
*. ) #$,'
������lengthresulti����$j,\�����������
*/ ) #!','&������lengthscalessqiabsxi����h*`{,Z\�������|[4�#���� * !) #*!3'M'B,'+������lengthi�����,����������� *. ) #,'
������lengthi���� �,�����������*. ) #&,'
������lengthi�����,���ɡ������*. ) #3,'
������' +������2,�  W@������A '������nLcdDcl=ML ###(*+&&������a<Ck &'
������l*������xv"d"dD�ll� ! I K;+45
������� !������� "������npfjalphagammaw1w2beta beta2
delta parent lp lilxcpcicxwork�bdt,sstKKLllL���ԡ������ *H���١������ *H���ߡ��3c��S�s+,�������S�����*���� 2    (*" '# '#'#&&("%+&)= *G8O&;M-(/ ������dlkitopipkccinc s
x colp pinv parentCcpcicxlplilxcurrentstep�MSTLsst�SST�sst�����������:?c��������DD$w�{�������R���� :f;�������3ss;�����������:>;�C����*le�C���� :1 [   %0!2)!  # #B'#L'#(#"%"%*8g$63. , '150$ !&T&#
������nsymCpostc�D�m��u�} #<.4cAo%D
������ijpqi2j2napai ax
result cp ci cxw�LKKLtTSSTT�������c�������3+c����*���� * l�������c�������3+cc,����*���� * 0!  0!  #'#-*,($"15+3.#,15F$'3.#������"<,emMC  R 6$(
������7*������ xlxlplidendipi i
p����l�y���������������A"d"dl�kklO���砄�K���ꠄ�����:����:

�����������:`���
����K�����������:����: � ! .%$$.%)! I K(;'#!#.1,'"'"!#.1,,'5
������nsymapaiPPinvlpparentlnz flag
i k p kkp2uD�CESU[MKN�������;C;�K���������������JC{����B���� :����:3�����������:7KKKK 2. *"    #<'#,.%%"# 1! B1@&);,-(#,#!
ւ����napaiaxparentPPinvlpli lx
y pattern flag lnzyil_kiikpkkp2lentop�DCCDsstk� ssuKKKO���衄�{#C;�K��������<��������k����B��� ������������:{�������CC{s�����������:>{�CC����:����� :5 5'*"-%!  #'#%!$L7'##&#"1! B '%0)B3=(-(& )#00+&'"&!F#
ɅɆʆ* 0������6 E������A ,������nMcdDcke=MT ###(*&5%&+̊ъҊf<Ck '
������qB������x{"d"dD�ll� ! I K9++9
֋ۋ܋x�"d"dD�ll� ! I K1443
������qilnzunzxxiipivtopp col
pivot a t liuilpuplxuxcurrentstepk�������mkl�˕K����ɡ������ *Xsuc����ޡ��DD$�;<�+�,sssss�#c�������;d�+$k���� :
�e�.C;[c;��������;d3����� :����
:N [[s�����������:8ss   00&&$ " HH$%#))"%"%*8/R/R##.=%6#&+*)$,DB !# !%%2 )$'"%% 
݌Ս���}E; <?
������ gpgigxbpbibxntopj J
p q px�JCCDCKLM����袄�����:?����������� :W�������C�3#������������:����:  * ",$ )4'#'##I% "/*2<08."("������  +������nCpATp����#?����Af+d;DL$MmKDUuM   # #(0K*(1L+Ŕ۔��O<CC 0
������xkk����S{������`"d"d�}������������*Wm��m��� ��������*0� ! (! -% I K&?8+&/=58#80+9
������si�\"]�����������*7Clck|�k�     &4#$: ,������ptauvpvivxvpi1�\*CCLD���ԡ������*6+���١������*6  ' ' )'#")*%)*%��ØĘ� ?
ؙٙڙT *
������sumnormji����
[F#\�������[�����������*V����*
 /!. #A2-,1,������rnormjii���� SF����Wx5l���̠�����Π������*���� * ,���֠��D����:
 /!. + *B2-1, !!.)��̛��sumnormlengthi����"FOZ\|���蠄������*0  ) )1+#,'$������values_� 9C������Arowscolsisumj����c[ RgDCD�������D�����������:7���� *  +!' !$,5.)*%
��͞ޞArowscolsisumj����}u R|DCD�������D�����������:7����*  +!' !$,5.)2*%
������Arowscolsjrowsumi����g_%V�DCD�������4D�����������:7���� *  +!' !$$,..)*%
����ѡArowscolsjrowsumi�����y%V�DCD���¡��4D���ȡ������:7����*  +!' !$$,..)2*%
ڢ����ntargetablengthi����>l�;E�=DCD,���䡄�����:>  ) !?/(!" ),'
����ɤ
ABCmnoijsum k����,�1�6�=w�CCDCKL��������������D����������� :?����:����: ,%(!$ "#'!0#@/*++&'"
��٥��xytargetlengthi����g���e�eCDD,�����������:6   ) PIRI"((),'
��ɧӧdenselength otherValuesi����?m��D$|D�����������*   ) PC1,I",'��ܨ��L *
ϩЩѩ T 6
������(t N
������CS$<>8__locals0func���Ơ�� �x   "��ƪǪijnzH���ߠ��U��� 栄��ˋ����*���� * }L3* '(;0861-(.������sumnormji����iTiD\�������[��� ��������*v����*
  L1. )#/:OJ,1,������worknormjij����h[����r�}Dl���������� ��������
*���� * \����������� :_ L1. + )-/JOJ1,0.)��׭��nzsumnormi����?�DZ\������������*0 % )).#(#$������axapaiendijk����@����@�L��CCE���ȡ������:
���ϡ��E���ԡ������:����:

 +.%. "*&.)!#.1,1,
����°axapaiendxijik����B����B�^��CCE���졄�����:
��������D����������� :����: 
 +.%. "*&$.)#!#,1,1,
������axapaiyiik����x)_�CCF�������������������:`���� : 
 4%. "*&#,721,
������axapaiyiendstartik�����7m�CCF4�������L������������:>\����: 
 .%. "*&#!"#41,1,
����ʵijpcxcpciw�CKLt���Ӣ������*����ۢ����� ݢ���3����*���� *   : H-* $,()$=83+,:KF-(
۶���� pjnznwxcicjcx�;E�fKFSST�������3�������������*����* 5SC  )!  #&?I $,($FF&,'#"
������mnanzbnzpjnzcpci cx
bp bi bx wxresult�CDCD'$e|e�eKKMKLlS���̣����SSC���֣������:g���ۣ������:����:;SD     0!)!  #'*+:4ITB+'# $<(3C($N3.&,'#"������naxapaiiendj����'u,j4j�DTCCD�������L�����������:����:   .%$ &$"*&%#H&1,'"������onzii����:_����_��D$DD������������* ��������V ����*  3% +)kC"61;"\"(#����Ͼijpqnnzmarker�#t�����������*W�������#��� ä��SDs;[�����* ���� * �K 'H-* $. *%+'(8)-1"KF'-(4
������ipcj�BL��� ����TD3*�[,���� *  + $D) *5%'#!!#<"$.GB������pjknlplilxDKKL�������,D�����������*����*  ,%  +'###./*#
������pjklplilx1<CKL���̠��<���Р������*/����*  ,%% +'##A/*6(#
������pjkupuiuxL<CKL���砄�DL�����������*����*  (!% +'#+#.+&(#
������pjknupuiuxgDKKL�������T�����������*/���� *  (!  +'##A+&>#
������[ .
������"K %
������resulti����*D�����������*/ ) 4#,'������result9T\ 81������E[ )
������lengthresulti����>M,����栄�����*/ ) #":,'������lengthi����*^,�����������*. ) #$,'
������reimsumlengthi����Dk\,�������{{����
: ) %# %,,'#������lengthscalessqiabsxi����z8r~,Z\��������{4�#���� * !) #*!6'M'B,'+������lengthi����(�,�����������*. ) #,'
������lengthi����4�,�����������*. ) #&,'
������lengthi����7�,���̡������ *. ) #3,'
������( +������3,�  W@������B '������nMcdDcl=ML ###(*+&&������b<Ck &(
������m*������xw"d"dD�ll� ! I K;+45
������� !������� "������npfjalphagammaw1w2phase beta
beta2 delta parent lplilxcpcicxwork�bdt,sstKKLllL���ա������ *H���ڡ������*H���ࡄ�3�,�S�3< ,#��������s;�����*���� 2    (*" '# '#'#&'("%+&)W *GKO4 &;M$-(/ ������dlkitopipkccinc s
x colp pinv parentCcpcicxlplilxcurrentstep�MSTLsst�SST�sst�����������:?c��������DD$w���������R����:f[�������3�{;���Ģ������ :>��C����*<e�C����:1 [   %0!2)!  # #B'#M'#(#"%"%*8g$63. , '1507 4&5T)#
������nsymCpostc�D�m��u�} #<.4cAo%D
������ijpqi2j2napai ax
result cp ci cxw�LKKLtTSSTT�������c�������3+c����*���� * l�������c�������3+cc,����*���� * 0!  0!  #'#-*,($"15+3.#,15F$O3.#������+ 0������7 E������B ,������nNcdDcke=MT ###(*&5%&+������g<Ck (
������rB������x|"d"dD�ll� ! I K9++9
������x�"d"dD�ll� ! I K1443
������qilnzunzxxiipivtopp col
pivot a t liuilpuplxuxcurrentstepk�������mkl�˕K����ʡ������ *Xsuc����ߡ��DD$�;<�+�,sssss�#c�������;d�+$k����:
�e.c;{c;��������;d3�����:����
:N [[s�����������:8ss   00&&$ " II$%#))"%"%*8/R/R##.=%9#&+*)$,DE !# !%%2 )$'"%% 
�������}E; <?
������ gpgigxbpbibxntopj J
p q px�JCCDCKLM����预�����:?��������:W�������C�K�������������:����:  * ",$ )4'#'##I% "/*2<08."("������ ! + ������nCpATp����#?����Af ,d;DL$MmKDUuM   # #(0K*(1L+ ������ P<CC 0
������xkk����S{������ a"d"d�}������������*Wm��m��� ��������*0� ! (! -% I K'?8+&/=58#80+9
������si �<"E�����������*7C|cs�<�L     &&G#!$= D ������ptauvpvivxvpi1 �<*CCLD���ա������*6s���ڡ������
*6  ' ' ()'#"<*%)*% ���������ڢ��lkkl���⢄�����墄����㢄������� .%$ &"*&%#J1,'"
������
���������������������?�������������<&/ $iD:4-
�������,:�������,j�������,��������D����������������������M������=8������6)������>8������7)������`O~m���������'���Mo���z���� �1�J�����U^�[ p  !!� "�!E!#D"�!$\"Q"%t"i"&�"�"5�"�"7�"�"8f##9�#s#:�#�#;�#�#<�#�#=$�#>U$>$?u$b$@�$�$A(%�$BR%>%C�%~%D�%�%E�&#&F'�&K�'H'MM(�'N�(i(O�(�(P
)�(Q4) )R�)b)S�*�)T"+�*UK+/+Vt+X+W�+�+X�,�+[4-�,\L-A-]d-Y-^|-q-_�-�-`�-�-a�-�-b.�-cP. .d�.f.e�.�.f�.�.g�.�.h/ /i7/(/jW/D/ko/d/l�/|/m�/�/n�/�/o,0�/pH090q�0j0r�0�0s�0�0t�1-1u�1�1w2�1{�2C2|@3�2}�3h3~t44�4�4��4�4��4�4��4�4�l55��5y5��5�5��5�5��5�5�6�5�=6"6�a6J6�D7�6��7d7�u8�7�09�8�4:�9��:j:��;;��;�;�@< <�\<M<��<i<��<�<��<�<��<�<��<�<��<�<�=
=�-="=�E=:=�]=R=�v=j=��=�=��=�=�7F�>�PFDF��FdF��F�F��G"G�H�G�HH�:H/H��H[H�iK3I�LM�K�VN�M��N|N�O�N�;O/O��ObO��RsP� TS�WT-T��TxT�\UU�V�U��VBV��W�V��W�W�(X�W�_X8X�~XoX��X�X��[cY�\�[�^^�\�._�^�M_>_�l_]_�
`�_��`E`�Zaa��asa�7b�a��bwb��c2c��d�c�:e�d�3f�e��fjf�Wg�f�vggg��g�g��g�g�h�g��h%h�Di�h�j�i��jJj�wk�j�gl�k�m�l��m[m��nn� po��p=p��q�p�Hr�q��rwr��ss�8t�s��tgt��t�t�uu�}uCu��u�u��u�u�4v�u��vYv��v�v��w>w��w�w�\x!x��x�x��x�x��x�x�y
y�Ty)y�{ydy�y�y�y�y�y�yzz�{�z�}=|~�}|o~�� ��
I�3� ���� ��K�  ���$��?�4���S�����Ʌ�� �݅P� �����ۈˆ�(�8�-���m�ӊ��������ˌE���ی ��� ��:�!���"����#��$Տ_�%���&M�Ґ'���(��J�)����*+�ԓ+”f�,��Ҕ-���.��/s�H�0 ���1��>�2����3����4��C�5י1�6���7N�˚8*�}�9�b�:Z�d�;���<��P�=ڠ�>_���? ���@��4�AU�ڢB����C��D=�.�E��b�FȤ��G��ؤHT��I��y�J2���KϦq�L/���M��T�N����O ��P/��QJ�?�R��^�S����T˨��U�ߨV*��WF�:�X�ͩY ���Zg�6�[ή��\��ޮ]���^��_g�3�`��w�a����b����c0��d����e����f�� �g��h��O�i����jx���k����l��*�oS�¶wݷc������� ��2�%��O�B��k�_����{������������ٸθ��������p�\�K�=� @
� V � n�r�} � 
�
 � " � : � ?�?� _������� 

  "%(+.147:=@CF I

7
Editor.Deps/CSparse.NET/Release/bin/CSparse.dll.mdb.meta


fileFormatVersion: 2
guid: 3f501b278c0858a468f7486c619bd481
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

69
Editor.Deps/CSparse.NET/Release/bin/CSparse.dll.meta


fileFormatVersion: 2
guid: f4d932e3bdb2e5745822b820188f5fe6
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 0
Exclude Linux64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

538
Editor.Deps/CSparse.NET/Release/bin/CSparse.pdb
文件差异内容过多而无法显示
查看文件

7
Editor.Deps/CSparse.NET/Release/bin/CSparse.pdb.meta


fileFormatVersion: 2
guid: cf08b4f4979edde43ba35a22e2c857cd
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
Editor.Deps/CSparse.NET/Release/bin/CSparse.xml
文件差异内容过多而无法显示
查看文件

7
Editor.Deps/CSparse.NET/Release/bin/CSparse.xml.meta


fileFormatVersion: 2
guid: 0094e1fc7cfeeda44bf3470c4dba61b5
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

15
Editor.Deps/Unity.DemoTeam.DigitalHuman.Editor.Deps.asmdef


{
"name": "Unity.DemoTeam.DigitalHuman.Editor.Deps",
"references": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": false,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

7
Editor.Deps/Unity.DemoTeam.DigitalHuman.Editor.Deps.asmdef.meta


fileFormatVersion: 2
guid: 36d17776a2f55c64bae1282588126e63
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

7
Editor.Deps/Unity.DemoTeam.DigitalHuman.Editor.Deps_Dummy.cs


namespace Unity.DemoTeam.DigitalHuman.Editor.Deps
{
class Dummy
{
}
}

11
Editor.Deps/Unity.DemoTeam.DigitalHuman.Editor.Deps_Dummy.cs.meta


fileFormatVersion: 2
guid: 800385902e9f4794eace0e6762d8df49
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
Editor/CustomPasses.meta


fileFormatVersion: 2
guid: 26c77618c5fc8b340b532e54f4703371
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

44
Editor/CustomPasses/NormalBufferBlurPassDrawer.cs


using UnityEngine;
using UnityEngine.Rendering.HighDefinition;
using UnityEditor;
using UnityEditor.Rendering.HighDefinition;
[CustomPassDrawer(typeof(NormalBufferBlurPass))]
class NormalBufferBlurPassDrawer : CustomPassDrawer
{
static readonly float lineFeed = EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
SerializedProperty queue;
SerializedProperty layerMask;
protected override void Initialize(SerializedProperty customPass)
{
queue = customPass.FindPropertyRelative("queue");
layerMask = customPass.FindPropertyRelative("layerMask");
}
protected override PassUIFlag commonPassUIFlags => PassUIFlag.Name;
protected override float GetPassHeight(SerializedProperty customPass)
{
float height = base.GetPassHeight(customPass);
height += lineFeed;
height += lineFeed;
return height;
}
protected override void DoPassGUI(SerializedProperty customPass, Rect rect)
{
base.DoPassGUI(customPass, rect);
// queue
queue.intValue = (int)(CustomPass.RenderQueueType)EditorGUI.EnumPopup(rect, "Queue", (CustomPass.RenderQueueType)queue.intValue);
rect.y += lineFeed;
// layerMask
EditorGUI.PropertyField(rect, layerMask);
rect.y += lineFeed;
}
}

11
Editor/CustomPasses/NormalBufferBlurPassDrawer.cs.meta


fileFormatVersion: 2
guid: 2d0236de664d8044a8e667d2b416b9aa
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
Editor/MeshTools.meta


fileFormatVersion: 2
guid: 49587aae57f307843bbdf95f336cc480
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

536
Editor/MeshTools/MeshLaplacian.cs


using CSparse;
using CSparse.Double;
using CSparse.Double.Factorization;
using CSparse.Storage;
using UnityEngine;
using UnityEngine.Profiling;
using Unity.Collections.LowLevel.Unsafe;
using Unity.DemoTeam.DigitalHuman;
public class MeshLaplacian
{
public int internalCount;
public double[] vertexDifferentialX;
public double[] vertexDifferentialY;
public double[] vertexDifferentialZ;
}
public class MeshLaplacianTransform
{
public int vertexCount;
public int[] constraintIndices;
public double constraintWeight;
public SparseMatrix Ls;
public SparseMatrix Lc;
public SparseMatrix LcT;
public SparseMatrix LcT_Lc;
public SparseCholesky LcT_Lc_chol;
public MeshLaplacianTransform(MeshAdjacency meshAdjacency, int[] constraintIndices)
{
BuildFrom(meshAdjacency, constraintIndices);
}
public void BuildFrom(MeshAdjacency meshAdjacency, int[] constraintIndices)
{
vertexCount = meshAdjacency.vertexCount;
this.constraintIndices = constraintIndices.Clone() as int[];
this.constraintWeight = 1.0;
// count unconstrained laplacian non-zero fields
int nzmax = vertexCount;
for (int i = 0; i != vertexCount; i++)
{
nzmax += meshAdjacency.vertexVertices.lists[i].size;
}
// build Ls
EditorUtilityProxy.DisplayProgressBar("MeshLaplacian", "build Ls", 0.0f);
var Ls_storage = new CoordinateStorage<double>(vertexCount, vertexCount, nzmax);
for (int i = 0; i != vertexCount; i++)// D
{
//TODO proper fix
//Ls_storage.At(i, i, meshAdjacency.vertexVertices.lists[i].size);
Ls_storage.At(i, i, Mathf.Max(1, meshAdjacency.vertexVertices.lists[i].size));
}
for (int i = 0; i != vertexCount; i++)// A
{
foreach (var j in meshAdjacency.vertexVertices[i])
{
Ls_storage.At(i, j, -1.0);
}
}
Ls = Converter.ToCompressedColumnStorage(Ls_storage) as SparseMatrix;
// build Lc
EditorUtilityProxy.DisplayProgressBar("MeshLaplacian", "build Lc", 0.0f);
var Lc_storage = new CoordinateStorage<double>(vertexCount + constraintIndices.Length, vertexCount, nzmax + constraintIndices.Length);
for (int i = 0; i != vertexCount; i++)
{
//TODO proper fix
//Lc_storage.At(i, i, meshAdjacency.vertexVertices.lists[i].size);
Lc_storage.At(i, i, Mathf.Max(1, meshAdjacency.vertexVertices.lists[i].size));
}
for (int i = 0; i != vertexCount; i++)
{
foreach (var j in meshAdjacency.vertexVertices[i])
{
Lc_storage.At(i, j, -1.0);
}
}
for (int i = 0; i != constraintIndices.Length; i++)
{
Lc_storage.At(vertexCount + i, constraintIndices[i], constraintWeight);
}
Lc = Converter.ToCompressedColumnStorage(Lc_storage) as SparseMatrix;
// build LcT
EditorUtilityProxy.DisplayProgressBar("MeshLaplacian", "build LcT", 0.0f);
LcT = Lc.Transpose() as SparseMatrix;
// build LcT_Lc
EditorUtilityProxy.DisplayProgressBar("MeshLaplacian", "build LcT_Lc", 0.0f);
LcT_Lc = LcT.Multiply(Lc) as SparseMatrix;
// build LcT_Lc_chol
EditorUtilityProxy.DisplayProgressBar("MeshLaplacian", "build LcT_Lc_chol", 0.0f);
LcT_Lc_chol = SparseCholesky.Create(LcT_Lc, ColumnOrdering.MinimumDegreeAtPlusA);
// done
EditorUtilityProxy.ClearProgressBar();
}
public void ComputeMeshLaplacian(MeshLaplacian meshLaplacian, MeshBuffers meshBuffers)
{
Debug.Assert(vertexCount == meshBuffers.vertexCount);
// Ls x = diffcoords
unsafe
{
var vertexPositionX = new double[vertexCount];
var vertexPositionY = new double[vertexCount];
var vertexPositionZ = new double[vertexCount];
fixed (Vector3* src = meshBuffers.vertexPositions)
fixed (double* dstX = vertexPositionX)
fixed (double* dstY = vertexPositionY)
fixed (double* dstZ = vertexPositionZ)
{
for (int i = 0; i != vertexCount; i++)
{
dstX[i] = src[i].x;
dstY[i] = src[i].y;
dstZ[i] = src[i].z;
}
}
ArrayUtils.ResizeCheckedIfLessThan(ref meshLaplacian.vertexDifferentialX, vertexCount);
ArrayUtils.ResizeCheckedIfLessThan(ref meshLaplacian.vertexDifferentialY, vertexCount);
ArrayUtils.ResizeCheckedIfLessThan(ref meshLaplacian.vertexDifferentialZ, vertexCount);
Ls.Multiply(vertexPositionX, meshLaplacian.vertexDifferentialX);
Ls.Multiply(vertexPositionY, meshLaplacian.vertexDifferentialY);
Ls.Multiply(vertexPositionZ, meshLaplacian.vertexDifferentialZ);
meshLaplacian.internalCount = vertexCount;
}
}
public void ResolveMeshBuffers(MeshBuffers meshBuffers, MeshLaplacian meshLaplacian)
{
Debug.Assert(vertexCount == meshBuffers.vertexCount);
Debug.Assert(vertexCount == meshLaplacian.internalCount);
int constraintCount = constraintIndices.Length;
// c = 'm' spatial constraints [c0 c1 ... cm]
// Lc = [Ls I|0] where dim(I) = m
// Lc x = [diffcoords c]
// x* = (Lc^T Lc)^-1 Lc^T [diffcoords c]
unsafe
{
var constrainedDifferentialX = new double[vertexCount + constraintCount];
var constrainedDifferentialY = new double[vertexCount + constraintCount];
var constrainedDifferentialZ = new double[vertexCount + constraintCount];
fixed (double* srcX = meshLaplacian.vertexDifferentialX)
fixed (double* srcY = meshLaplacian.vertexDifferentialY)
fixed (double* srcZ = meshLaplacian.vertexDifferentialZ)
fixed (double* dstX = constrainedDifferentialX)
fixed (double* dstY = constrainedDifferentialY)
fixed (double* dstZ = constrainedDifferentialZ)
{
UnsafeUtility.MemCpy(dstX, srcX, sizeof(double) * vertexCount);
UnsafeUtility.MemCpy(dstY, srcY, sizeof(double) * vertexCount);
UnsafeUtility.MemCpy(dstZ, srcZ, sizeof(double) * vertexCount);
for (int k = 0; k != constraintCount; k++)
{
int j = constraintIndices[k];
dstX[vertexCount + k] = constraintWeight * meshBuffers.vertexPositions[j].x;
dstY[vertexCount + k] = constraintWeight * meshBuffers.vertexPositions[j].y;
dstZ[vertexCount + k] = constraintWeight * meshBuffers.vertexPositions[j].z;
}
}
var LcT_constrainedDifferentialX = new double[vertexCount + constraintCount];
var LcT_constrainedDifferentialY = new double[vertexCount + constraintCount];
var LcT_constrainedDifferentialZ = new double[vertexCount + constraintCount];
LcT.Multiply(constrainedDifferentialX, LcT_constrainedDifferentialX);
LcT.Multiply(constrainedDifferentialY, LcT_constrainedDifferentialY);
LcT.Multiply(constrainedDifferentialZ, LcT_constrainedDifferentialZ);
var resultPositionX = new double[vertexCount + constraintCount];
var resultPositionY = new double[vertexCount + constraintCount];
var resultPositionZ = new double[vertexCount + constraintCount];
Profiler.BeginSample("chol-solve");
LcT_Lc_chol.Solve(LcT_constrainedDifferentialX, resultPositionX);
LcT_Lc_chol.Solve(LcT_constrainedDifferentialY, resultPositionY);
LcT_Lc_chol.Solve(LcT_constrainedDifferentialZ, resultPositionZ);
Profiler.EndSample();
fixed (double* srcX = resultPositionX)
fixed (double* srcY = resultPositionY)
fixed (double* srcZ = resultPositionZ)
fixed (float* dstX = &meshBuffers.vertexPositions[0].x)
fixed (float* dstY = &meshBuffers.vertexPositions[0].y)
fixed (float* dstZ = &meshBuffers.vertexPositions[0].z)
{
const int dstStride = 3;// sizeof(Vector3) / sizeof(float)
for (int i = 0; i != vertexCount; i++)
dstX[i * dstStride] = (float)srcX[i];
for (int i = 0; i != vertexCount; i++)
dstY[i * dstStride] = (float)srcY[i];
for (int i = 0; i != vertexCount; i++)
dstZ[i * dstStride] = (float)srcZ[i];
}
}
}
}
public class MeshLaplacianTransformROI
{
public int internalCount;
public int externalCount;
public int[] internalFromExternal;// [0..mesh.vertexCount]
public int[] externalFromInternal;// [0..internalCount]
public int[] constraintIndices;
public double constraintWeight;
public SparseMatrix Ls;
public SparseMatrix Lc;
public SparseMatrix LcT;
public SparseMatrix LcT_Lc;
public SparseCholesky LcT_Lc_chol;
private int InternalValence(MeshAdjacency meshAdjacency, int i)
{
int n = 0;
foreach (var k in meshAdjacency.vertexVertices[externalFromInternal[i]])
{
if (internalFromExternal[k] != -1)
n++;
}
return n;
}
public MeshLaplacianTransformROI(MeshAdjacency meshAdjacency, int[] roiIndices, int roiConstraintBoundary, int[] roiConstraintIndices = null)
{
BuildFrom(meshAdjacency, roiIndices, roiConstraintBoundary, roiConstraintIndices);
}
public void BuildFrom(MeshAdjacency meshAdjacency, int[] roiIndices, int roiBoundaryLevels, int[] roiConstraintIndices = null)
{
unsafe
{
using (var visited = new UnsafeArrayBool(meshAdjacency.vertexCount))
using (var visitedBoundary = new UnsafeArrayBool(meshAdjacency.vertexCount))
using (var visitor = new UnsafeBFS(meshAdjacency.vertexCount))
{
// find boundary
visited.Clear(false);
visitedBoundary.Clear(false);
visitor.Clear();
int visitedCount = 0;
int visitedBoundaryCount = 0;
foreach (int i in roiIndices)
{
visited.val[i] = true;
visitedCount++;
visitor.Ignore(i);
}
foreach (int i in roiIndices)
{
foreach (var j in meshAdjacency.vertexVertices[i])
{
visitor.Insert(j);
}
}
// step boundary
while (visitor.MoveNext())
{
int i = visitor.position;
visited.val[i] = true;
visitedCount++;
visitedBoundary.val[i] = true;
visitedBoundaryCount++;
if (visitor.depth < roiBoundaryLevels)
{
foreach (var j in meshAdjacency.vertexVertices[i])
{
visitor.Insert(j);
}
}
}
// add constraints
if (roiConstraintIndices != null)
{
foreach (int i in roiConstraintIndices)
{
if (visited.val[i])
{
if (visitedBoundary.val[i] == false)
{
visitedBoundary.val[i] = true;
visitedBoundaryCount++;
}
}
else
{
Debug.LogWarning("ignoring user constraint outside ROI: vertex " + i);
}
}
}
// build translations
internalCount = 0;
externalCount = meshAdjacency.vertexCount;
internalFromExternal = new int[externalCount];
externalFromInternal = new int[visitedCount];
for (int i = 0; i != meshAdjacency.vertexCount; i++)
{
if (visited.val[i])
{
int internalIndex = internalCount++;
externalFromInternal[internalIndex] = i;
internalFromExternal[i] = internalIndex;
}
else
{
internalFromExternal[i] = -1;
}
}
// find constraint indices
constraintIndices = new int[visitedBoundaryCount];
constraintWeight = 1.0;
int constraintCount = 0;
for (int i = 0; i != internalCount; i++)
{
if (visitedBoundary.val[externalFromInternal[i]])
{
constraintIndices[constraintCount++] = i;
}
}
// count unconstrained laplacian non-zero fields
int nzmax = internalCount;
for (int i = 0; i != internalCount; i++)
{
nzmax += InternalValence(meshAdjacency, i);
}
// build Ls
EditorUtilityProxy.DisplayProgressBar("MeshLaplacian", "build Ls", 0.0f);
var Ls_storage = new CoordinateStorage<double>(internalCount, internalCount, nzmax);
for (int i = 0; i != internalCount; i++)// D
{
//TODO proper fix
//Ls_storage.At(i, i, InternalValence(meshAdjacency, i));
Ls_storage.At(i, i, Mathf.Max(1, InternalValence(meshAdjacency, i)));
}
for (int i = 0; i != internalCount; i++)// A
{
foreach (var k in meshAdjacency.vertexVertices[externalFromInternal[i]])
{
int j = internalFromExternal[k];
if (j != -1)
{
Ls_storage.At(i, j, -1.0);
}
}
}
Ls = Converter.ToCompressedColumnStorage(Ls_storage) as SparseMatrix;
// build Lc
EditorUtilityProxy.DisplayProgressBar("MeshLaplacian", "build Lc", 0.0f);
var Lc_storage = new CoordinateStorage<double>(internalCount + constraintCount, internalCount, nzmax + constraintCount);
for (int i = 0; i != internalCount; i++)
{
//TODO proper fix
//Lc_storage.At(i, i, InternalValence(meshAdjacency, i));
Lc_storage.At(i, i, Mathf.Max(1, InternalValence(meshAdjacency, i)));
}
for (int i = 0; i != internalCount; i++)
{
foreach (var k in meshAdjacency.vertexVertices[externalFromInternal[i]])
{
int j = internalFromExternal[k];
if (j != -1)
{
Lc_storage.At(i, j, -1.0);
}
}
}
for (int i = 0; i != constraintIndices.Length; i++)
{
Lc_storage.At(internalCount + i, constraintIndices[i], constraintWeight);
}
Lc = Converter.ToCompressedColumnStorage(Lc_storage) as SparseMatrix;
// build LcT
EditorUtilityProxy.DisplayProgressBar("MeshLaplacian", "build LcT", 0.0f);
LcT = Lc.Transpose() as SparseMatrix;
// build LcT_Lc
EditorUtilityProxy.DisplayProgressBar("MeshLaplacian", "build LcT_Lc", 0.0f);
LcT_Lc = LcT.Multiply(Lc) as SparseMatrix;
// build LcT_Lc_chol
EditorUtilityProxy.DisplayProgressBar("MeshLaplacian", "build LcT_Lc_chol", 0.0f);
LcT_Lc_chol = SparseCholesky.Create(LcT_Lc, ColumnOrdering.MinimumDegreeAtPlusA);
// done
EditorUtilityProxy.ClearProgressBar();
}
}
}
public void ComputeMeshLaplacian(MeshLaplacian meshLaplacian, MeshBuffers meshBuffers)
{
Debug.Assert(externalCount == meshBuffers.vertexCount);
// Ls x = diffcoords
unsafe
{
var vertexPositionX = new double[internalCount];
var vertexPositionY = new double[internalCount];
var vertexPositionZ = new double[internalCount];
fixed (Vector3* src = meshBuffers.vertexPositions)
fixed (double* dstX = vertexPositionX)
fixed (double* dstY = vertexPositionY)
fixed (double* dstZ = vertexPositionZ)
{
for (int i = 0; i != internalCount; i++)
{
int k = externalFromInternal[i];
dstX[i] = src[k].x;
dstY[i] = src[k].y;
dstZ[i] = src[k].z;
}
}
ArrayUtils.ResizeCheckedIfLessThan(ref meshLaplacian.vertexDifferentialX, internalCount);
ArrayUtils.ResizeCheckedIfLessThan(ref meshLaplacian.vertexDifferentialY, internalCount);
ArrayUtils.ResizeCheckedIfLessThan(ref meshLaplacian.vertexDifferentialZ, internalCount);
Ls.Multiply(vertexPositionX, meshLaplacian.vertexDifferentialX);
Ls.Multiply(vertexPositionY, meshLaplacian.vertexDifferentialY);
Ls.Multiply(vertexPositionZ, meshLaplacian.vertexDifferentialZ);
meshLaplacian.internalCount = internalCount;
}
}
public void ResolveMeshBuffers(MeshBuffers meshBuffers, MeshLaplacian meshLaplacian)
{
Debug.Assert(externalCount == meshBuffers.vertexCount);
Debug.Assert(internalCount == meshLaplacian.internalCount);
int constraintCount = constraintIndices.Length;
// c = 'm' spatial constraints [c0 c1 ... cm]
// Lc = [Ls I|0] where dim(I) = m
// Lc x = [diffcoords c]
// x* = (Lc^T Lc)^-1 Lc^T [diffcoords c]
unsafe
{
var constrainedDifferentialX = new double[internalCount + constraintCount];
var constrainedDifferentialY = new double[internalCount + constraintCount];
var constrainedDifferentialZ = new double[internalCount + constraintCount];
fixed (double* srcX = meshLaplacian.vertexDifferentialX)
fixed (double* srcY = meshLaplacian.vertexDifferentialY)
fixed (double* srcZ = meshLaplacian.vertexDifferentialZ)
fixed (double* dstX = constrainedDifferentialX)
fixed (double* dstY = constrainedDifferentialY)
fixed (double* dstZ = constrainedDifferentialZ)
{
UnsafeUtility.MemCpy(dstX, srcX, sizeof(double) * internalCount);
UnsafeUtility.MemCpy(dstY, srcY, sizeof(double) * internalCount);
UnsafeUtility.MemCpy(dstZ, srcZ, sizeof(double) * internalCount);
for (int i = 0; i != constraintCount; i++)
{
int k = externalFromInternal[constraintIndices[i]];
dstX[internalCount + i] = constraintWeight * meshBuffers.vertexPositions[k].x;
dstY[internalCount + i] = constraintWeight * meshBuffers.vertexPositions[k].y;
dstZ[internalCount + i] = constraintWeight * meshBuffers.vertexPositions[k].z;
}
}
var LcT_constrainedDifferentialX = new double[internalCount + constraintCount];
var LcT_constrainedDifferentialY = new double[internalCount + constraintCount];
var LcT_constrainedDifferentialZ = new double[internalCount + constraintCount];
LcT.Multiply(constrainedDifferentialX, LcT_constrainedDifferentialX);
LcT.Multiply(constrainedDifferentialY, LcT_constrainedDifferentialY);
LcT.Multiply(constrainedDifferentialZ, LcT_constrainedDifferentialZ);
var resultPositionX = new double[internalCount + constraintCount];
var resultPositionY = new double[internalCount + constraintCount];
var resultPositionZ = new double[internalCount + constraintCount];
Profiler.BeginSample("chol-solve");
LcT_Lc_chol.Solve(LcT_constrainedDifferentialX, resultPositionX);
LcT_Lc_chol.Solve(LcT_constrainedDifferentialY, resultPositionY);
LcT_Lc_chol.Solve(LcT_constrainedDifferentialZ, resultPositionZ);
Profiler.EndSample();
fixed (double* srcX = resultPositionX)
fixed (double* srcY = resultPositionY)
fixed (double* srcZ = resultPositionZ)
fixed (float* dstX = &meshBuffers.vertexPositions[0].x)
fixed (float* dstY = &meshBuffers.vertexPositions[0].y)
fixed (float* dstZ = &meshBuffers.vertexPositions[0].z)
{
const int dstStride = 3;// sizeof(Vector3) / sizeof(float)
for (int i = 0; i != internalCount; i++)
{
int k = externalFromInternal[i];
dstX[k * dstStride] = (float)srcX[i];
dstY[k * dstStride] = (float)srcY[i];
dstZ[k * dstStride] = (float)srcZ[i];
}
}
}
}
}

11
Editor/MeshTools/MeshLaplacian.cs.meta


fileFormatVersion: 2
guid: add2a6de08873c440a7ddb2026a6afed
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

95
Editor/SkinAttachmentEditor.cs


using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
namespace Unity.DemoTeam.DigitalHuman
{
[CustomEditor(typeof(SkinAttachment)), CanEditMultipleObjects]
public class SkinAttachmentEditor : Editor
{
private Editor attachmentTargetEditor;
public override void OnInspectorGUI()
{
if (target == null)
return;
if (targets.Length == 1)
{
var attachment = target as SkinAttachment;
if (attachment == null)
return;
EditorGUILayout.HelpBox(attachment.attached ? "Attached to " + attachment.target : "Detached", MessageType.Info);
DrawGUIAttachDetach(attachment);
EditorGUILayout.Separator();
base.OnInspectorGUI();
var attachmentTarget = (target as SkinAttachment).target;
if (attachmentTarget != null)
{
Editor.CreateCachedEditor(attachmentTarget, null, ref attachmentTargetEditor);
attachmentTargetEditor.DrawHeader();
attachmentTargetEditor.OnInspectorGUI();
}
}
else
{
EditorGUILayout.HelpBox("Multiple attachments selected", MessageType.Warning);
foreach (var target in targets)
{
var attachment = target as SkinAttachment;
if (attachment == null)
continue;
EditorGUILayout.BeginHorizontal();
EditorGUILayout.ObjectField(attachment, typeof(SkinAttachment), false);
DrawGUIAttachDetach(attachment);
EditorGUILayout.EndHorizontal();
}
}
}
public static void DrawGUIAttachDetach(SkinAttachment attachment)
{
EditorGUILayout.BeginVertical();
DrawGUIAttach(attachment);
DrawGUIDetach(attachment);
EditorGUILayout.EndVertical();
}
public static void DrawGUIAttach(SkinAttachment attachment)
{
EditorGUI.BeginDisabledGroup(attachment.attached);
{
if (GUILayout.Button("Attach"))
{
attachment.attached = true;
}
}
EditorGUI.EndDisabledGroup();
}
public static void DrawGUIDetach(SkinAttachment attachment)
{
EditorGUI.BeginDisabledGroup(!attachment.attached);
{
EditorGUILayout.BeginHorizontal();
if (GUILayout.Button("Detach"))
{
attachment.attached = false;
attachment.preserveResolved = false;
}
if (GUILayout.Button("+ Hold", GUILayout.ExpandWidth(false)))
{
attachment.attached = false;
attachment.preserveResolved = true;
}
EditorGUILayout.EndHorizontal();
}
EditorGUI.EndDisabledGroup();
}
}
}

11
Editor/SkinAttachmentEditor.cs.meta


fileFormatVersion: 2
guid: 600abc2b815c99f4f84e0697870c0e72
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

164
Editor/SkinAttachmentTargetEditor.cs


using UnityEngine;
using UnityEditor;
namespace Unity.DemoTeam.DigitalHuman
{
[CustomEditor(typeof(SkinAttachmentTarget))]
public class SkinAttachmentTargetEditor : Editor
{
bool showAttachments;
public override void OnInspectorGUI()
{
if (target == null)
return;
var driver = target as SkinAttachmentTarget;
if (driver == null)
return;
if (driver.attachData == null)
{
EditorGUILayout.HelpBox("Must bind SkinAttachmentData asset before use.", MessageType.Error);
return;
}
EditorGUILayout.HelpBox("Bound to " + driver.attachData, MessageType.Info);
DrawGUIAttachmentData(driver.attachData);
EditorGUILayout.Separator();
base.OnInspectorGUI();
EditorGUILayout.Separator();
GUILayout.Label("Attachments", EditorStyles.boldLabel);
foreach (var attachment in driver.subjects)
{
EditorGUILayout.BeginHorizontal();
EditorGUILayout.ObjectField(attachment, typeof(SkinAttachment), false);
SkinAttachmentEditor.DrawGUIDetach(attachment);
EditorGUILayout.EndHorizontal();
}
}
void DrawGUIAttachmentData(SkinAttachmentData attachData)
{
if (DrawGUIGrowShrink("Poses", ref attachData.pose, attachData.poseCount))
{
attachData.Persist();
}
if (DrawGUIGrowShrink("Items" , ref attachData.item, attachData.itemCount))
{
attachData.Persist();
}
}
bool DrawGUIGrowShrink<T>(string label, ref T[] buffer, int count)
{
var capacity = buffer.Length;
var capacityChanged = false;
EditorGUILayout.BeginHorizontal();
{
GUILayout.Button(string.Empty, GUILayout.ExpandWidth(true));
EditorGUI.ProgressBar(GUILayoutUtility.GetLastRect(), count / (float)capacity, label + ": " + count + " / " + capacity);
if (GUILayout.Button("Grow", GUILayout.ExpandWidth(false)))
{
ArrayUtils.ResizeChecked(ref buffer, buffer.Length * 2);
capacityChanged = true;
}
EditorGUI.BeginDisabledGroup(count > capacity / 2);
if (GUILayout.Button("Shrink", GUILayout.ExpandWidth(false)))
{
ArrayUtils.ResizeChecked(ref buffer, buffer.Length / 2);
capacityChanged = true;
}
EditorGUI.EndDisabledGroup();
}
EditorGUILayout.EndHorizontal();
return capacityChanged;
}
void OnSceneGUI()
{
var driver = target as SkinAttachmentTarget;
if (driver == null)
return;
if (driver.showWireframe)
{
}
if (driver.showMouseOver)
{
DrawSceneGUIMouseOver(driver);
}
}
public static void DrawSceneGUIMouseOver(SkinAttachmentTarget driver)
{
var mouseScreen = Event.current.mousePosition;
var mouseWorldRay = HandleUtility.GUIPointToWorldRay(mouseScreen);
var objectRayPos = driver.transform.InverseTransformPoint(mouseWorldRay.origin);
var objectRayDir = driver.transform.InverseTransformDirection(mouseWorldRay.direction);
var meshInfo = driver.GetCachedMeshInfo();
if (meshInfo.valid == false)
return;
var vertex = meshInfo.meshVertexBSP.RaycastApprox(ref objectRayPos, ref objectRayDir, 10);
if (vertex == -1)
return;
using (var scope = new Handles.DrawingScope(Color.blue, driver.transform.localToWorldMatrix))
{
const int maxDepth = 3;
var triangleColor = Handles.color;
var triangleDepth = 0;
using (var triangleBFS = new UnsafeBFS(meshInfo.meshAdjacency.triangleCount))
{
foreach (var triangle in meshInfo.meshAdjacency.vertexTriangles[vertex])
{
triangleBFS.Insert(triangle);
}
while (triangleBFS.MoveNext() && triangleBFS.depth < maxDepth)
{
if (triangleDepth < triangleBFS.depth)
{
triangleDepth = triangleBFS.depth;
Handles.color = Color.Lerp(triangleColor, Color.clear, Mathf.InverseLerp(0, maxDepth, triangleDepth));
}
var _e = meshInfo.meshAdjacency.triangleVertices[triangleBFS.position].GetEnumerator();
int v0 = _e.ReadNext();
int v1 = _e.ReadNext();
int v2 = _e.ReadNext();
Handles.DrawLine(meshInfo.meshBuffers.vertexPositions[v0], meshInfo.meshBuffers.vertexPositions[v1]);
Handles.DrawLine(meshInfo.meshBuffers.vertexPositions[v1], meshInfo.meshBuffers.vertexPositions[v2]);
Handles.DrawLine(meshInfo.meshBuffers.vertexPositions[v2], meshInfo.meshBuffers.vertexPositions[v0]);
foreach (var triangle in meshInfo.meshAdjacency.triangleTriangles[triangleBFS.position])
{
triangleBFS.Insert(triangle);
}
}
}
//var vertexPosition = meshInfo.meshBuffers.vertexPositions[vertex];
//var vertexNormal = meshInfo.meshBuffers.vertexNormals[vertex];
//Handles.DrawWireDisc(vertexPosition, vertexNormal, 0.005f);
//Handles.DrawLine(vertexPosition, vertexPosition + 0.0025f * vertexNormal);
}
}
}
}

11
Editor/SkinAttachmentTargetEditor.cs.meta


fileFormatVersion: 2
guid: a0ff6bd4ebbed3e48b03eb5c48b15ccd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

752
Editor/SkinDeformationClipEditor.cs


#pragma warning disable 0219
//#define SOLVE_FULL_LAPLACIAN
using System;
using System.IO;
using System.Linq;
using UnityEngine;
using UnityEditor;
namespace Unity.DemoTeam.DigitalHuman
{
[CustomEditor(typeof(SkinDeformationClip)), CanEditMultipleObjects]
public class SkinDeformationClipEditor : Editor
{
static GUIStyle miniLabelAlignLeft;
static GUIStyle miniLabelAlignRight;
static bool framesFoldout = true;
static Vector2 framesScroll = Vector2.zero;
void FittedIndices_SetFromTargetMesh(object userData)
{
var clip = userData as SkinDeformationClip;
var iarr = SkinDeformationFittingImpl.GetBlendShapeIndices(clip.importSettings.transferTarget);
clip.importSettings.fittedIndices = String.Join(",", iarr.Select(i => i.ToString()).ToArray());
}
void FittedIndices_SetPrecomputed(object userData)
{
var clip = userData as SkinDeformationClip;
var iarr = new int[] {
// all indices from snappers head
// 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317
// subtract linearly dependent indices
// 23,106,107,108,109,176,177,178,179,296,297,298,299
// =>
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317
};
clip.importSettings.fittedIndices = String.Join(",", iarr.Select(i => i.ToString()).ToArray());
}
void FittedIndices_SetPrecomputedWrinkles(object userData)
{
var clip = userData as SkinDeformationClip;
var iarr = new int[] {
// all indices from snappers head that contribute to wrinkle maps
// =>
1,14,15,44,48,51,54,59,62,67,72,80,85,87,89,91,93,95,97,110,113,116,118,119,121,123,126,129,132,135,138,141,144,147,150,158,163,181,183,184,187,191,194,197,200,207,209,219,221,227,229,230,231,232,233,235,237,240,241,250,251,252,253,254,255,256,257,258,259,264,265,290,291,292,293,294,295
};
clip.importSettings.fittedIndices = String.Join(",", iarr.Select(i => i.ToString()).ToArray());
}
void FittedIndices_ApplyFormattingAndSortAscending(object userData)
{
var clip = userData as SkinDeformationClip;
var istr = clip.importSettings.fittedIndices;
var iarr = Array.ConvertAll<string, int>(istr.Split(','), int.Parse);
Array.Sort<int>(iarr);
clip.importSettings.fittedIndices = String.Join(",", iarr.Select(i => i.ToString()).ToArray());
}
void FittedIndices_ApplyFilterToEnsureLinearlyIndependent(object userData)
{
var clip = userData as SkinDeformationClip;
var istr = clip.importSettings.fittedIndices;
var iarr = Array.ConvertAll<string, int>(istr.Split(','), int.Parse);
Array.Sort<int>(iarr);
iarr = SkinDeformationFittingImpl.ComputeLinearlyIndependentBlendShapeIndices(clip.importSettings.transferTarget, iarr);
if (iarr == null)
{
Debug.LogError("linearly independent filter did not complete");
return;
}
clip.importSettings.fittedIndices = String.Join(",", iarr.Select(i => i.ToString()).ToArray());
}
void OnDisable()
{
SkinDeformationClipPreview.Disable();
}
public override void OnInspectorGUI()
{
if (miniLabelAlignLeft == null)
{
miniLabelAlignLeft = new GUIStyle(EditorStyles.miniLabel);
miniLabelAlignLeft.alignment = TextAnchor.UpperLeft;
}
if (miniLabelAlignRight == null)
{
miniLabelAlignRight = new GUIStyle(EditorStyles.miniLabel);
miniLabelAlignRight.alignment = TextAnchor.UpperRight;
}
if (targets.Length == 1)
{
SkinDeformationClip clip = (SkinDeformationClip)target;
if (clip.importSettings.solveRegionPreview)
SkinDeformationClipPreview.Enable(clip);
else
SkinDeformationClipPreview.Disable();
EditorGUILayout.HelpBox(GetInfoString(clip), MessageType.Info, true);
if (GUILayout.Button("Import"))
{
ImportClip(clip);
}
EditorGUILayout.Separator();
base.OnInspectorGUI();
EditorGUILayout.Separator();
if (GUILayout.Button("Configure Fitted Indices ..."))
{
GUI.FocusControl(null);
var menu = new GenericMenu();
menu.AddItem(new GUIContent("Set from target mesh"), false, FittedIndices_SetFromTargetMesh, clip);
menu.AddItem(new GUIContent("Set precomputed linearly independent"), false, FittedIndices_SetPrecomputed, clip);
menu.AddItem(new GUIContent("Set precomputed linearly independent (wrinkles only)"), false, FittedIndices_SetPrecomputedWrinkles, clip);
menu.AddItem(new GUIContent("Apply formatting and sort ascending"), false, FittedIndices_ApplyFormattingAndSortAscending, clip);
menu.AddItem(new GUIContent("Apply filter to ensure linearly independent"), false, FittedIndices_ApplyFilterToEnsureLinearlyIndependent, clip);
menu.ShowAsContext();
}
EditorGUILayout.Separator();
framesFoldout = EditorGUILayout.Foldout(framesFoldout, "Frame intervals", EditorStyles.foldout);
if (framesFoldout)
{
framesScroll = EditorGUILayout.BeginScrollView(framesScroll, false, true);
for (int i = 0; i != clip.subframeCount; i++)
{
Rect rectGroup = EditorGUILayout.BeginHorizontal();
{
EditorGUILayout.PrefixLabel("interval " + i, EditorStyles.miniLabel);
{
Rect rectLabel = GUILayoutUtility.GetLastRect();
Rect rectFrame = new Rect(rectLabel);
rectFrame.xMin = rectLabel.xMax;
rectFrame.xMax = rectGroup.xMax;
EditorGUI.DrawRect(rectFrame, Color.black);
rectFrame.xMin += 1.0f;
rectFrame.xMax -= 1.0f;
rectFrame.yMin += 1.0f;
rectFrame.yMax -= 1.0f;
EditorGUI.DrawRect(rectFrame, Color.Lerp(Color.black, Color.green, 0.05f));
float x0 = rectFrame.xMin + rectFrame.width * clip.subframes[i].fractionLo;
float x1 = rectFrame.xMin + rectFrame.width * clip.subframes[i].fractionHi;
float y0 = clip.subframes[i].fractionLo;
float y1 = clip.subframes[i].fractionHi;
rectFrame.xMin = x0;
rectFrame.xMax = x1;
//EditorGUI.DrawRect(rectFrame, Color.Lerp(Color.black, Color.green, 0.4f));
Handles.color = Color.Lerp(Color.black, Color.green, 0.4f);
Handles.DrawAAConvexPolygon(
new Vector3(rectFrame.xMin, rectFrame.yMax, 0.0f),
new Vector3(rectFrame.xMax, rectFrame.yMax, 0.0f),
new Vector3(rectFrame.xMax, rectFrame.yMin + rectFrame.height * y1, 0.0f),
new Vector3(rectFrame.xMin, rectFrame.yMin + rectFrame.height * y0, 0.0f)
);
Handles.color = Color.Lerp(Color.black, Color.magenta, 0.4f);
Handles.DrawAAConvexPolygon(
new Vector3(rectFrame.xMin, rectFrame.yMax - rectFrame.height * (1.0f - y0), 0.0f),
new Vector3(rectFrame.xMax, rectFrame.yMax - rectFrame.height * (1.0f - y1), 0.0f),
new Vector3(rectFrame.xMax, rectFrame.yMin, 0.0f),
new Vector3(rectFrame.xMin, rectFrame.yMin, 0.0f)
);
}
EditorGUILayout.TextField("keyframe " + clip.subframes[i].frameIndexLo, miniLabelAlignLeft);
EditorGUILayout.TextField("keyframe " + clip.subframes[i].frameIndexHi, miniLabelAlignRight);
}
EditorGUILayout.EndHorizontal();
}
EditorGUILayout.EndScrollView();
}
else
{
framesScroll = Vector2.zero;
}
}
else
{
SkinDeformationClipPreview.Disable();
EditorGUILayout.HelpBox("Skin Deformation Clip (multiple)", MessageType.Info, true);
if (GUILayout.Button("Import"))
{
foreach (var target in targets)
{
SkinDeformationClip clip = (SkinDeformationClip)target;
ImportClip(clip);
}
}
EditorGUILayout.Separator();
base.OnInspectorGUI();
}
}
static T[] GetAssetsAtPath<T>(string path, string name) where T : UnityEngine.Object
{
if (Directory.Exists(path) == false)
return new T[0];
var guids = AssetDatabase.FindAssets(name + " t:" + typeof(T).Name, new string[] { path });
var paths = guids.Select(g => AssetDatabase.GUIDToAssetPath(g)).OrderBy(s => s);
var array = paths.Select(p => AssetDatabase.LoadAssetAtPath<T>(p)).ToArray();
return array;
}
static string[] GetFilesAtPath(string path, string pattern)
{
if (Directory.Exists(path) == false)
return new string[0];
var result = Directory.GetFiles(path, pattern);
for (int i = 0; i != result.Length; i++)
{
result[i] = result[i].Replace('\\', '/');
}
Array.Sort(result);
return result;
}
static string GetInfoString(bool flag)
{
if (flag)
return "YES";
else
return "no";
}
static string GetInfoString(SkinDeformationClip clip)
{
string s = string.Empty;
s += "Skin Deformation Clip";
s += "\n -- # frames: " + (clip.subframeCount + 1);
s += "\n -- # keyframes: " + clip.frameCount;
s += "\n -- # vertices: " + clip.frameVertexCount;
s += "\n -- contains deltas: " + GetInfoString(clip.framesContainDeltas);
s += "\n -- contains albedo: " + GetInfoString(clip.framesContainAlbedo);
s += "\n -- contains fitted weights: " + GetInfoString(clip.framesContainFittedWeights);
s += "\n -- (rev " + clip.version + ")";
//s += "\n" + clip.frameDataFilename;
return s;
}
public static int[] ResolveIndexArrayFromVertexSelection(TextAsset vertexSelection, MeshAdjacency weldedAdjacency = null)
{
if (vertexSelection == null)
return new int[0];
var indicesCommaSep = vertexSelection.text.Trim('[', ']');
if (indicesCommaSep.Length > 0)
{
var parsed = Array.ConvertAll<string, int>(indicesCommaSep.Split(','), int.Parse);
if (weldedAdjacency != null)
return parsed.Select(i => weldedAdjacency.vertexResolve[i]).Distinct().ToArray();
else
return parsed;
}
else
{
return new int[0];
}
}
public static int[] ResolveIndexArrayFromVertexSelectionArray(TextAsset[] vertexSelections, MeshAdjacency weldedAdjacency = null)
{
var indices = new int[0];
foreach (var vertexSelection in vertexSelections)
{
indices = indices.Union(ResolveIndexArrayFromVertexSelection(vertexSelection, weldedAdjacency)).ToArray();
}
return indices;
}
static void ImportClip(SkinDeformationClip clip)
{
try
{
var progressTitle = "Importing '" + clip.name + "'";
var progressIndex = 0;
var progressCount = 4.0f;
EditorUtility.DisplayProgressBar(progressTitle, "Loading assets", progressIndex++ / progressCount);
var sourceObjs = null as string[];
var sourceMeshes = null as Mesh[];
var sourceAlbedos = null as Texture2D[];
int frameCount = 0;
int frameVertexCount = 0;
var useExternalLoader = clip.importSettings.externalLoader;
if (useExternalLoader)
{
sourceObjs = GetFilesAtPath(clip.importSettings.externalObjPath, clip.importSettings.externalObjPattern);
Debug.Assert(sourceObjs.Length > 0, ".obj count == 0 (check import settings)");
using (var nativeMesh = NativeMeshObjLoader.Parse(sourceObjs[0]))
{
frameCount = sourceObjs.Length;
frameVertexCount = nativeMesh.vertexCount;
}
}
else
{
sourceMeshes = GetAssetsAtPath<Mesh>(clip.importSettings.meshFolder, clip.importSettings.meshPrefix);
Debug.Assert(sourceMeshes.Length > 0, "mesh count == 0 (check import settings)");
sourceAlbedos = GetAssetsAtPath<Texture2D>(clip.importSettings.albedoFolder, clip.importSettings.albedoPrefix);
if (sourceAlbedos.Length != sourceMeshes.Length)
{
sourceAlbedos = null;
Debug.LogWarning("mesh count != albedo count: skipping albedos");
}
frameCount = sourceMeshes.Length;
frameVertexCount = sourceMeshes[0].vertexCount;
}
int frameFittedWeightsCount = 0;// modified later
var frames = new SkinDeformation[frameCount];
int subframeCount = frameCount - 1;
var subframes = new SkinDeformationClip.Subframe[subframeCount];
MeshBuffers buffersFrame0 = new MeshBuffers(frameVertexCount);
MeshBuffers buffersFrameX = new MeshBuffers(frameVertexCount);
MeshBuffers buffersTarget = buffersFrame0;
if (clip.importSettings.transferTarget != null)
{
buffersTarget = new MeshBuffers(clip.importSettings.transferTarget);
}
MeshAdjacency weldedAdjacency = new MeshAdjacency(buffersTarget, clip.importSettings.solveWelded);
EditorUtility.DisplayProgressBar(progressTitle, "Importing frames", progressIndex++ / progressCount);
{
var sourceRotation = Quaternion.Euler(clip.importSettings.applyRotation);
var sourceScale = clip.importSettings.applyScale;
if (useExternalLoader)
{
using (var nativeMesh = NativeMeshObjLoader.Parse(sourceObjs[0]))
{
buffersFrame0.LoadFrom(nativeMesh);
buffersFrame0.ApplyRotation(sourceRotation);
buffersFrame0.ApplyScale(sourceScale);
}
}
else
{
buffersFrame0.LoadFrom(sourceMeshes[0]);
buffersFrame0.ApplyRotation(sourceRotation);
buffersFrame0.ApplyScale(sourceScale);
}
var denoiseFactor = clip.importSettings.denoiseFactor;
var denoiseIndices = ResolveIndexArrayFromVertexSelectionArray(clip.importSettings.denoiseRegion, weldedAdjacency);
if (denoiseFactor < float.Epsilon)
denoiseIndices = new int[0];
var transplantFactor = clip.importSettings.transplantFactor;
var transplantIndices = ResolveIndexArrayFromVertexSelectionArray(clip.importSettings.transplantRegion, weldedAdjacency);
if (transplantFactor < float.Epsilon || clip.importSettings.transferTarget == null)
transplantIndices = new int[0];
//TODO cleanup
var transferIndices = ResolveIndexArrayFromVertexSelection(clip.importSettings.transferRegion, weldedAdjacency);
#if SOLVE_FULL_LAPLACIAN
var laplacianConstraintCount = frameVertexCount;
var laplacianConstraintIndices = null as int[];
unsafe
{
using (var laplacianFreeVertexMap = new UnsafeArrayBool(frameVertexCount))
{
laplacianFreeVertexMap.Clear(false);
for (int k = 0; k != denoiseIndices.Length; k++)
{
if (laplacianFreeVertexMap.val[denoiseIndices[k]] == false)
{
laplacianFreeVertexMap.val[denoiseIndices[k]] = true;
laplacianConstraintCount--;
}
}
for (int k = 0; k != transplantIndices.Length; k++)
{
if (laplacianFreeVertexMap.val[transplantIndices[k]] == false)
{
laplacianFreeVertexMap.val[transplantIndices[k]] = true;
laplacianConstraintCount--;
}
}
laplacianConstraintIndices = new int[laplacianConstraintCount];
for (int i = 0, k = 0; i != frameVertexCount; i++)
{
if (laplacianFreeVertexMap.val[i] == false)
laplacianConstraintIndices[k++] = i;
}
}
}
#else
var laplacianROIIndices = denoiseIndices.Union(transplantIndices).ToArray();
var laplacianConstraintCount = frameVertexCount - laplacianROIIndices.Length;
#endif
#if SOLVE_FULL_LAPLACIAN
var meshLaplacianTransform = null as MeshLaplacianTransform;
#else
var meshLaplacianTransform = null as MeshLaplacianTransformROI;
#endif
var meshLaplacian = new MeshLaplacian();
var meshLaplacianDenoised = new MeshLaplacian();
var transplantBuffers = new MeshBuffers(frameVertexCount);
var transplantLaplacian = new MeshLaplacian();
var laplacianResolve = (laplacianConstraintCount < frameVertexCount);
if (laplacianResolve)
{
#if SOLVE_FULL_LAPLACIAN
meshLaplacianTransform = new MeshLaplacianTransform(weldedAdjacency, laplacianConstraintIndices);
#else
meshLaplacianTransform = new MeshLaplacianTransformROI(weldedAdjacency, laplacianROIIndices, 0);
{
for (int i = 0; i != denoiseIndices.Length; i++)
denoiseIndices[i] = meshLaplacianTransform.internalFromExternal[denoiseIndices[i]];
for (int i = 0; i != transplantIndices.Length; i++)
transplantIndices[i] = meshLaplacianTransform.internalFromExternal[transplantIndices[i]];
}
#endif
meshLaplacianTransform.ComputeMeshLaplacian(meshLaplacianDenoised, buffersFrame0);
if (transplantIndices.Length > 0 && clip.importSettings.transferTarget != null)
{
transplantBuffers.LoadFrom(clip.importSettings.transferTarget);
meshLaplacianTransform.ComputeMeshLaplacian(transplantLaplacian, transplantBuffers);
}
}
//TODO cleanup
var transferTemp = new MeshBuffers(frameVertexCount);
var transferLaplacianTransform = null as MeshLaplacianTransformROI;
var transferLaplacian = new MeshLaplacian();
var laplacianTransfer = (transferIndices.Length > 0) && (clip.importSettings.transferTarget != null);
if (laplacianTransfer)
{
transferLaplacianTransform = new MeshLaplacianTransformROI(weldedAdjacency, transferIndices, 0);
}
for (int i = 0; i != frameCount; i++)
{
EditorUtility.DisplayProgressBar(progressTitle, "Importing frames", (progressIndex - 1 + ((float)i / frameCount)) / progressCount);
if (useExternalLoader)
{
using (var nativeMesh = NativeMeshObjLoader.Parse(sourceObjs[i]))
{
buffersFrameX.LoadFrom(nativeMesh);
buffersFrameX.ApplyRotation(sourceRotation);
buffersFrameX.ApplyScale(sourceScale);
}
}
else
{
buffersFrameX.LoadFrom(sourceMeshes[i]);
buffersFrameX.ApplyRotation(sourceRotation);
buffersFrameX.ApplyScale(sourceScale);
}
if (laplacianResolve)
{
meshLaplacianTransform.ComputeMeshLaplacian(meshLaplacian, buffersFrameX);
double historyFactor = denoiseFactor;
foreach (int j in denoiseIndices)
{
double dx = denoiseFactor * meshLaplacianDenoised.vertexDifferentialX[j] + (1.0 - denoiseFactor) * meshLaplacian.vertexDifferentialX[j];
double dy = denoiseFactor * meshLaplacianDenoised.vertexDifferentialY[j] + (1.0 - denoiseFactor) * meshLaplacian.vertexDifferentialY[j];
double dz = denoiseFactor * meshLaplacianDenoised.vertexDifferentialZ[j] + (1.0 - denoiseFactor) * meshLaplacian.vertexDifferentialZ[j];
meshLaplacian.vertexDifferentialX[j] = dx;
meshLaplacian.vertexDifferentialY[j] = dy;
meshLaplacian.vertexDifferentialZ[j] = dz;
meshLaplacianDenoised.vertexDifferentialX[j] = dx;
meshLaplacianDenoised.vertexDifferentialY[j] = dy;
meshLaplacianDenoised.vertexDifferentialZ[j] = dz;
}
foreach (int j in transplantIndices)
{
meshLaplacian.vertexDifferentialX[j] = transplantFactor * transplantLaplacian.vertexDifferentialX[j] + (1.0 - transplantFactor) * meshLaplacian.vertexDifferentialX[j];
meshLaplacian.vertexDifferentialY[j] = transplantFactor * transplantLaplacian.vertexDifferentialY[j] + (1.0 - transplantFactor) * meshLaplacian.vertexDifferentialY[j];
meshLaplacian.vertexDifferentialZ[j] = transplantFactor * transplantLaplacian.vertexDifferentialZ[j] + (1.0 - transplantFactor) * meshLaplacian.vertexDifferentialZ[j];
}
meshLaplacianTransform.ResolveMeshBuffers(buffersFrameX, meshLaplacian);
buffersFrameX.RecalculateNormals(weldedAdjacency);
buffersFrameX.ApplyWeldedChanges(weldedAdjacency);
}
//TODO cleanup
if (laplacianTransfer)
{
buffersTarget.CopyTo(transferTemp);
transferLaplacianTransform.ComputeMeshLaplacian(transferLaplacian, buffersFrameX);
transferLaplacianTransform.ResolveMeshBuffers(transferTemp, transferLaplacian);
transferTemp.CopyTo(buffersFrameX);
buffersFrameX.RecalculateNormals(weldedAdjacency);
buffersFrameX.ApplyWeldedChanges(weldedAdjacency);
}
frames[i].SetAlbedo((sourceAlbedos != null) ? sourceAlbedos[i] : null);
//frames[i].SetDeltas(buffersFrame0, buffersFrameX);
//TODO cleanup
if (laplacianTransfer)
frames[i].SetDeltas(buffersTarget, buffersFrameX);
else
frames[i].SetDeltas(buffersFrame0, buffersFrameX);
var targetVertexCount = laplacianTransfer ? buffersTarget.vertexCount : buffersFrame0.vertexCount;
if (targetVertexCount != buffersFrameX.vertexCount)
Debug.LogWarning("frame " + i + " has different vertexCount (" + buffersFrameX.vertexCount + " vs. " + targetVertexCount + " in frame 0)");
}
for (int i = 0; i != subframeCount; i++)
{
subframes[i].frameIndexLo = i;
subframes[i].frameIndexHi = i + 1;
subframes[i].fractionLo = 0.0f;
subframes[i].fractionHi = 1.0f;
}
ImportFrameIntervalsFromCSV(clip.importSettings.keyframesCSV, frameCount - 1, ref subframeCount, ref subframes);
}
EditorUtility.DisplayProgressBar(progressTitle, "Retargeting frames", progressIndex++ / progressCount);
{
switch (clip.importSettings.transferMode)
{
case SkinDeformationClip.TransferMode.PassThrough:
{
// clean copy
}
break;
case SkinDeformationClip.TransferMode.PassThroughWithFirstFrameDelta:
{
buffersFrameX.LoadFrom(clip.importSettings.transferTarget);
Vector3 anchorOrigin = buffersFrame0.CalcMeshCenter();
Vector3 anchorTarget = buffersFrameX.CalcMeshCenter();
Vector3 offsetTarget = anchorOrigin - anchorTarget;
for (int j = 0; j != frameVertexCount; j++)
{
buffersFrameX.vertexPositions[j] += offsetTarget;
}
SkinDeformation firstFrameDelta;
firstFrameDelta = new SkinDeformation();
firstFrameDelta.SetDeltas(buffersFrameX, buffersFrame0);
for (int i = 0; i != frameCount; i++)
{
EditorUtility.DisplayProgressBar(progressTitle, "Retargeting frames", (progressIndex - 1 + ((float)i / frameCount)) / progressCount);
for (int j = 0; j != frameVertexCount; j++)
{
frames[i].deltaPositions[j] += firstFrameDelta.deltaPositions[j];
frames[i].deltaTangents[j] += firstFrameDelta.deltaTangents[j];
frames[i].deltaNormals[j] += firstFrameDelta.deltaNormals[j];
}
}
}
break;
}
}
EditorUtility.DisplayProgressBar(progressTitle, "Fitting frames to blend shapes", progressIndex++ / progressCount);
{
if (clip.importSettings.fitToBlendShapes)
frameFittedWeightsCount = clip.importSettings.transferTarget.blendShapeCount;
else
frameFittedWeightsCount = 0;
for (int i = 0; i != frameCount; i++)
frames[i].fittedWeights = new float[frameFittedWeightsCount];
if (frameFittedWeightsCount > 0)
{
var blendShapeIndicesCommaSep = clip.importSettings.fittedIndices;
var blendShapeIndices = Array.ConvertAll<string, int>(blendShapeIndicesCommaSep.Split(','), int.Parse);
SkinDeformationFittingImpl.FitFramesToBlendShapes(frames, clip.importSettings.transferTarget, blendShapeIndices, clip.importSettings.fittingMethod, clip.importSettings.fittingParam);
}
}
EditorUtility.DisplayProgressBar(progressTitle, "Saving binary", progressIndex++ / progressCount);
{
clip.lastBuild = clip.importSettings.Clone();
clip.frameCount = frameCount;
clip.frameVertexCount = frameVertexCount;
clip.frameFittedWeightsCount = frameFittedWeightsCount;
clip.frames = frames;
clip.framesContainAlbedo = (frames[0].albedo != null);
clip.framesContainDeltas = (frames[0].deltaPositions.Length > 0);
clip.framesContainFittedWeights = (frames[0].fittedWeights.Length > 0);
clip.subframeCount = subframeCount;
clip.subframes = subframes;
clip.version++;
EditorUtility.SetDirty(clip);
clip.SaveFrameData(AssetDatabase.GetAssetPath(clip.GetInstanceID()) + "_frames.bin");
}
}
catch (Exception ex)
{
Debug.LogError(ex);
}
finally
{
EditorUtility.ClearProgressBar();
}
}
static void ImportFrameIntervalsFromCSV(string filename, int maxFrameIndex, ref int subframeCount, ref SkinDeformationClip.Subframe[] subframes)
{
if (!File.Exists(filename))
return;
// skip 1st column of every row
const int SKIP_COL = 1;
const int NO_VALUE = -1;
// rows[0] == comma sep. original frame #
// rows[1] == comma sep. wrap frame #
// rows[2] == comma sep. frame progress 0-100
const int ROW_ORIG = 0;
const int ROW_KEYS = 1;
const int ROW_TIME = 2;
const int NUM_ROWS = 3;
var vals = new int[NUM_ROWS][];
var valCount = NO_VALUE;
using (StreamReader reader = new StreamReader(filename))
{
for (int row = 0; row != NUM_ROWS; row++)
{
if (reader.EndOfStream)
return;// bad input, missing rows
var line = reader.ReadLine();
if (line == null)
return;// bad input, missing rows
var svals = line.Split(',');
var svalCount = svals.Length;
if (svalCount != valCount + SKIP_COL && valCount != NO_VALUE)
return;// bad input, rows not equal length
valCount = svalCount - SKIP_COL;
vals[row] = new int[valCount];
for (int j = 0; j != valCount; j++)
{
if (!int.TryParse(svals[j + SKIP_COL], out vals[row][j]))
vals[row][j] = NO_VALUE;
}
}
}
int keyIndex0 = NO_VALUE;
int keyIndexN = NO_VALUE;
for (int i = 0; i != valCount; i++)
{
int frameIndex = vals[ROW_KEYS][i];
if (frameIndex != NO_VALUE)
{
if (frameIndex > maxFrameIndex)
break;// ignore rest of sequence
keyIndexN = i;
if (keyIndex0 == NO_VALUE)
keyIndex0 = i;
}
}
if (keyIndex0 == keyIndexN)
return;// bad input, need at least two keyframes
subframeCount = keyIndexN - keyIndex0;
subframes = new SkinDeformationClip.Subframe[subframeCount];
int keyIndexLo = keyIndex0;
int keyIndexHi = keyIndex0 + 1;
while (keyIndexLo < keyIndexN)
{
while (vals[ROW_KEYS][keyIndexHi] == NO_VALUE)
keyIndexHi++;
int keyLo = vals[ROW_KEYS][keyIndexLo];
int keyHi = vals[ROW_KEYS][keyIndexHi];
float n = keyIndexHi - keyIndexLo;
for (int i = keyIndexLo; i != keyIndexHi; i++)
{
subframes[i].frameIndexLo = keyLo;
subframes[i].frameIndexHi = keyHi;
subframes[i].fractionLo = (i - keyIndexLo + 0) / (float)n;
subframes[i].fractionHi = (i - keyIndexLo + 1) / (float)n;
}
keyIndexLo = keyIndexHi;
keyIndexHi = keyIndexHi + 1;
}
}
}
}

11
Editor/SkinDeformationClipEditor.cs.meta


fileFormatVersion: 2
guid: 7eb9f80554f4fd1428c57c5878317d08
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

131
Editor/SkinDeformationClipPreview.cs


using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
namespace Unity.DemoTeam.DigitalHuman
{
public static class SkinDeformationClipPreview
{
private static bool active;
private static SkinDeformationClip clip;
private static TextAsset[] activeDenoiseIndices = null;
private static TextAsset[] activeTransplantIndices = null;
private static int[] pairedDenoiseIndices = new int[0];
private static int[] pairedTransplantIndices = new int[0];
static bool CompareTextAssetArrays(TextAsset[] a, TextAsset[] b)
{
if (a == null && b == null)
return true;
if (a != b)
return false;
if (a.Length != b.Length)
return false;
for (int i = 0; i != a.Length; i++)
{
if (a[i] != b[i])
return false;
}
return true;
}
static int[] BuildPairsFromIndices(MeshAdjacency meshAdjacency, int[] indices)
{
var pairs = new List<int>();
foreach (int i in indices)
{
foreach (int j in meshAdjacency.vertexVertices[i])
{
pairs.Add(i);
pairs.Add(j);
}
}
return pairs.ToArray();
}
static void OnSceneGUI(SceneView sceneView)
{
if (Event.current.type != EventType.Repaint)
return;
var mesh = clip.importSettings.transferTarget;
if (mesh == null)
return;
var updateDenoiseIndices = !CompareTextAssetArrays(activeDenoiseIndices, clip.importSettings.denoiseRegion);
var updateTransplantIndices = !CompareTextAssetArrays(activeTransplantIndices, clip.importSettings.transplantRegion);
foreach (var deformationRenderer in SkinDeformationRenderer.enabledInstances)
{
if (deformationRenderer.meshAsset != mesh)
continue;
var target = deformationRenderer.GetComponent<SkinAttachmentTarget>();
if (target == null)
continue;
var targetMeshInfo = target.GetCachedMeshInfo();
if (targetMeshInfo.valid == false)
continue;
if (updateDenoiseIndices)
{
updateDenoiseIndices = false;
activeDenoiseIndices = clip.importSettings.denoiseRegion.Clone() as TextAsset[];
pairedDenoiseIndices = BuildPairsFromIndices(targetMeshInfo.meshAdjacency, SkinDeformationClipEditor.ResolveIndexArrayFromVertexSelectionArray(activeDenoiseIndices));
}
if (updateTransplantIndices)
{
updateTransplantIndices = false;
activeTransplantIndices = clip.importSettings.transplantRegion.Clone() as TextAsset[];
pairedTransplantIndices = BuildPairsFromIndices(targetMeshInfo.meshAdjacency, SkinDeformationClipEditor.ResolveIndexArrayFromVertexSelectionArray(activeTransplantIndices));
}
var meshMatrix = deformationRenderer.transform.localToWorldMatrix;
var meshBuffers = targetMeshInfo.meshBuffers;
using (var scope = new Handles.DrawingScope(Color.Lerp(Color.clear, Color.magenta, 0.5f), meshMatrix))
{
Handles.DrawLines(meshBuffers.vertexPositions, pairedDenoiseIndices);
}
using (var scope = new Handles.DrawingScope(Color.Lerp(Color.clear, Color.green, 0.5f), meshMatrix))
{
Handles.DrawLines(meshBuffers.vertexPositions, pairedTransplantIndices);
}
}
}
public static void Enable(SkinDeformationClip clip)
{
SkinDeformationClipPreview.clip = clip;
if (active == false)
{
active = true;
SceneView.duringSceneGui += OnSceneGUI;
SceneView.RepaintAll();
}
}
public static void Disable()
{
SkinDeformationClipPreview.clip = null;
if (active)
{
active = false;
SceneView.duringSceneGui -= OnSceneGUI;
SceneView.RepaintAll();
}
}
}
}

11
Editor/SkinDeformationClipPreview.cs.meta


fileFormatVersion: 2
guid: 52ecdd1613cae8a43847c0f1cd9ae66c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

397
Editor/SkinDeformationFitting.cs


using System;
using Unity.Jobs;
using Accord.Math;
using Accord.Statistics.Models.Regression.Fitting;
namespace Unity.DemoTeam.DigitalHuman
{
using Param = SkinDeformationFitting.Param;
using Method = SkinDeformationFitting.Method;
public static partial class SkinDeformationFittingImpl
{
private static T[][] MakeJagged<T>(T[,] m)
{
var numRows = m.GetLength(0);
var numCols = m.GetLength(1);
var jaggedM = new T[numRows][];
for (int i = 0; i != numRows; i++)
{
jaggedM[i] = new T[numCols];
for (int j = 0; j != numCols; j++)
{
jaggedM[i][j] = m[i, j];
}
}
return jaggedM;
}
public static int[] GetBlendShapeIndices(UnityEngine.Mesh mesh)
{
var numShapes = mesh.blendShapeCount;
var outShapes = new int[numShapes];
for (int k = 0; k != numShapes; k++)
{
outShapes[k] = k;
}
return outShapes;
}
public static int[] ComputeLinearlyIndependentBlendShapeIndices(UnityEngine.Mesh mesh)
{
return ComputeLinearlyIndependentBlendShapeIndices(mesh, GetBlendShapeIndices(mesh));
}
public static int[] ComputeLinearlyIndependentBlendShapeIndices(UnityEngine.Mesh mesh, int[] blendShapeIndices)
{
var numShapes = blendShapeIndices.Length;
var outShapes = new int[numShapes];
var numVertices = mesh.vertexCount;
var numEquations = 3 * numVertices;
var numVariables = 0;
var tmpPositions = new UnityEngine.Vector3[numVertices];
var tmpTangents = new UnityEngine.Vector3[numVertices];
var tmpNormals = new UnityEngine.Vector3[numVertices];
var A = new double[numEquations, 1];// start with an empty column
var _ = new double[numEquations];
{
for (int j = 0; j != numShapes; j++)
{
int k = blendShapeIndices[j];
if (EditorUtilityProxy.DisplayCancelableProgressBar("Filter linearly independent blend shapes", "Processing shape " + k + " (" + mesh.GetBlendShapeName(k) + ")", j / (float)numShapes))
{
outShapes = null;
break;// user cancelled
}
mesh.GetBlendShapeFrameVertices(k, 0, tmpPositions, tmpNormals, tmpTangents);
for (int i = 0; i != numVertices; i++)
{
_[i * 3 + 0] = tmpPositions[i].x;
_[i * 3 + 1] = tmpPositions[i].y;
_[i * 3 + 2] = tmpPositions[i].z;
}
A.SetColumn(numVariables, _);// write to empty column
var rank = Matrix.Rank(A.TransposeAndDot(A));
if (rank == numVariables + 1)
{
outShapes[numVariables++] = k;
A = A.Concatenate(_);// grow by one column
}
else
{
UnityEngine.Debug.LogWarning("shape " + k + " (" + mesh.GetBlendShapeName(k) + ") did NOT increase rank => skip");
}
}
EditorUtilityProxy.ClearProgressBar();
}
if (outShapes != null)
{
Array.Resize(ref outShapes, numVariables);
}
return outShapes;
}
public static void FitFramesToBlendShapes(SkinDeformation[] frames, UnityEngine.Mesh mesh, int[] blendShapeIndices, Method fittingMethod, Param fittingParam)
{
// Ax = b
// x* = (A^T A)^-1 A^T b
int numShapes = mesh.blendShapeCount;
int numVertices = mesh.vertexCount;
int numEquations = 0;
int numVariables = blendShapeIndices.Length;
var meshBuffers = null as MeshBuffers;
var meshEdges = null as MeshEdges;
switch (fittingParam)
{
case Param.DeltaPosition:
numEquations = 3 * numVertices;
break;
case Param.OutputEdgeLength:
case Param.OutputEdgeCurvature:
meshBuffers = new MeshBuffers(mesh);
meshEdges = new MeshEdges(mesh.triangles);
numEquations = meshEdges.edges.Length;
break;
}
var tmpPositions = new UnityEngine.Vector3[numVertices];
var tmpTangents = new UnityEngine.Vector3[numVertices];
var tmpNormals = new UnityEngine.Vector3[numVertices];
var edgeLengths = null as float[];
var edgeCurvatures = null as float[];
// prepare A
var A = new double[numEquations, numVariables];
var _ = new double[numEquations];
{
for (int j = 0; j != numVariables; j++)
{
int k = blendShapeIndices[j];
EditorUtilityProxy.DisplayProgressBar("Building 'A'", "Processing shape " + k + " (" + mesh.GetBlendShapeName(k) + ")", j / (float)numVariables);
mesh.GetBlendShapeFrameVertices(k, 0, tmpPositions, tmpNormals, tmpTangents);
switch (fittingParam)
{
case Param.DeltaPosition:
for (int i = 0; i != numVertices; i++)
{
_[i * 3 + 0] = tmpPositions[i].x;
_[i * 3 + 1] = tmpPositions[i].y;
_[i * 3 + 2] = tmpPositions[i].z;
}
break;
case Param.OutputEdgeLength:
for (int i = 0; i != numVertices; i++)
{
tmpPositions[i] += meshBuffers.vertexPositions[i];
}
meshEdges.ComputeLengths(ref edgeLengths, tmpPositions);
for (int i = 0; i != numEquations; i++)
{
_[i] = edgeLengths[i];
}
break;
case Param.OutputEdgeCurvature:
for (int i = 0; i != numVertices; i++)
{
tmpPositions[i] += meshBuffers.vertexPositions[i];
tmpNormals[i] += meshBuffers.vertexNormals[i];
tmpNormals[i].Normalize();
}
meshEdges.ComputeCurvatures(ref edgeCurvatures, tmpPositions, tmpNormals);
for (int i = 0; i != numEquations; i++)
{
_[i] = edgeCurvatures[i];
}
break;
}
A.SetColumn(j, _);
}
}
// prepare (A^T A)^-1 A^T for LLS
var At_A_inv_At = null as double[,];
if (fittingMethod == Method.LinearLeastSquares)
{
EditorUtilityProxy.DisplayProgressBar("Computing A^T", "Processing ...", 0.0f);
var At = A.Transpose();
EditorUtilityProxy.DisplayProgressBar("Computing (A^T A)", "Processing ...", 0.25f);
var At_A = At.Dot(A);
EditorUtilityProxy.DisplayProgressBar("Computing (A^T A)^-1", "Processing ...", 0.5f);
var At_A_inv = At_A.Inverse();
EditorUtilityProxy.DisplayProgressBar("Computing (A^T A)^-1 A^T", "Processing ...", 0.75f);
At_A_inv_At = At_A_inv.Dot(At);
}
// prepare A[][] for NNLS
var A_jagged = null as double[][];
if (fittingMethod == Method.NonNegativeLeastSquares)
{
A_jagged = MakeJagged(A);
}
// prepare shared job data
sharedJobData.frames = frames;
sharedJobData.blendShapeIndices = blendShapeIndices;
sharedJobData.meshBuffers = meshBuffers;
sharedJobData.meshEdges = meshEdges;
sharedJobData.numEquations = numEquations;
sharedJobData.numVariables = numVariables;
sharedJobData.numVertices = numVertices;
sharedJobData.fittingMethod = fittingMethod;
sharedJobData.fittingParam = fittingParam;
sharedJobData.At_A_inv_At = At_A_inv_At;
sharedJobData.A_jagged = A_jagged;
// prepare jobs
var jobs = new FrameFittingJob[frames.Length];
var jobHandles = new JobHandle[frames.Length];
for (int k = 0; k != jobs.Length; k++)
jobs[k].frameIndex = k;
// execute jobs
for (int k = 0; k != jobs.Length; k++)
jobHandles[k] = jobs[k].Schedule();
// wait until done
var progressTime0 = DateTime.Now;
var progressNumCompleted = -1;
while (true)
{
int numCompleted = 0;
for (int i = 0; i != jobs.Length; i++)
numCompleted += (jobHandles[i].IsCompleted ? 1 : 0);
if (numCompleted == jobs.Length)
break;
if (numCompleted > progressNumCompleted)
{
var progressVal = numCompleted / (float)frames.Length;
var progressMsg = "Processing frames ... Completed " + numCompleted + " / " + frames.Length;
if (progressVal > 0.0f)
{
var timeElapsed = DateTime.Now - progressTime0;
var timeArrival = TimeSpan.FromMilliseconds(timeElapsed.TotalMilliseconds / progressVal);
var timeRemains = timeArrival - timeElapsed;
progressMsg += " ... Est. time " + string.Format("{0}m{1:D2}s", (int)UnityEngine.Mathf.Floor((float)timeRemains.TotalMinutes), timeRemains.Seconds);
}
switch (sharedJobData.fittingMethod)
{
case Method.LinearLeastSquares:
EditorUtilityProxy.DisplayProgressBar("Computing x* = (A^T A)^-1 A^T b", progressMsg, progressVal);
break;
case Method.NonNegativeLeastSquares:
EditorUtilityProxy.DisplayProgressBar("Computing x* = NonNegativeLeastSquares(A, b)", progressMsg, progressVal);
break;
}
progressNumCompleted = numCompleted;
}
else
{
System.Threading.Thread.Sleep(1);
}
}
}
static SharedJobData sharedJobData;
struct SharedJobData
{
public SkinDeformation[] frames;
public int[] blendShapeIndices;
public MeshBuffers meshBuffers;
public MeshEdges meshEdges;
public int numVariables;
public int numEquations;
public int numVertices;
public Method fittingMethod;
public Param fittingParam;
public double[,] At_A_inv_At;
public double[][] A_jagged;
}
struct FrameFittingJob : IJob
{
public int frameIndex;
public void Execute()
{
int k = frameIndex;
var tmpPositions = new UnityEngine.Vector3[sharedJobData.numVertices];
var tmpTangents = new UnityEngine.Vector3[sharedJobData.numVertices];
var tmpNormals = new UnityEngine.Vector3[sharedJobData.numVertices];
var edgeLengths = null as float[];
var edgeCurvatures = null as float[];
// prepare b
var b = new double[sharedJobData.numEquations];
{
Array.Copy(sharedJobData.frames[k].deltaPositions, tmpPositions, tmpPositions.Length);
Array.Copy(sharedJobData.frames[k].deltaTangents, tmpTangents, tmpTangents.Length);
Array.Copy(sharedJobData.frames[k].deltaNormals, tmpNormals, tmpNormals.Length);
switch (sharedJobData.fittingParam)
{
case Param.DeltaPosition:
for (int i = 0; i != sharedJobData.numVertices; i++)
{
b[i * 3 + 0] = tmpPositions[i].x;
b[i * 3 + 1] = tmpPositions[i].y;
b[i * 3 + 2] = tmpPositions[i].z;
}
break;
case Param.OutputEdgeLength:
for (int i = 0; i != sharedJobData.numVertices; i++)
{
tmpPositions[i] += sharedJobData.meshBuffers.vertexPositions[i];
}
sharedJobData.meshEdges.ComputeLengths(ref edgeLengths, tmpPositions);
for (int i = 0; i != sharedJobData.numEquations; i++)
{
b[i] = edgeLengths[i];
}
break;
case Param.OutputEdgeCurvature:
for (int i = 0; i != sharedJobData.numVertices; i++)
{
tmpPositions[i] += sharedJobData.meshBuffers.vertexPositions[i];
tmpNormals[i] += sharedJobData.meshBuffers.vertexNormals[i];
tmpNormals[i].Normalize();
}
sharedJobData.meshEdges.ComputeCurvatures(ref edgeCurvatures, tmpPositions, tmpNormals);
for (int i = 0; i != sharedJobData.numEquations; i++)
{
b[i] = edgeCurvatures[i];
}
break;
}
}
// compute x*
var x = new double[sharedJobData.numVariables];
{
switch (sharedJobData.fittingMethod)
{
case Method.LinearLeastSquares:
sharedJobData.At_A_inv_At.Dot(b, x);// stores result in x
break;
case Method.NonNegativeLeastSquares:
{
var nnlsSolver = new NonNegativeLeastSquares() { MaxIterations = 200, Tolerance = 0.000000001 };
var nnlsOutput = nnlsSolver.Learn(sharedJobData.A_jagged, b);
Array.Copy(nnlsOutput.Weights, x, x.Length);
}
break;
}
//UnityEngine.Debug.Log("frame " + k + ": x* = " + x);
}
// remap weights to shape indices
for (int j = 0; j != sharedJobData.numVariables; j++)
{
sharedJobData.frames[k].fittedWeights[sharedJobData.blendShapeIndices[j]] = (float)x[j];
}
}
}
}
}

11
Editor/SkinDeformationFitting.cs.meta


fileFormatVersion: 2
guid: bdd51fdf16175b3498e0cd9fae7d194d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

27
Editor/SkinDeformationPlayableAssetEditor.cs


using UnityEditor;
namespace Unity.DemoTeam.DigitalHuman
{
[CustomEditor(typeof(SkinDeformationPlayableAsset))]
public class SkinDeformationPlayableAssetEditor : Editor
{
private Editor clipEditor;
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
if (target != null)
{
var clip = (target as SkinDeformationPlayableAsset).clip;
if (clip != null)
{
Editor.CreateCachedEditor(clip, null, ref clipEditor);
clipEditor.DrawHeader();
clipEditor.OnInspectorGUI();
}
}
}
}
}

11
Editor/SkinDeformationPlayableAssetEditor.cs.meta


fileFormatVersion: 2
guid: 9575e0a7162f85547a356984f9bbbfa0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

51
Editor/SnappersHeadImporterEditor.cs


using UnityEditor;
using UnityEngine;
namespace Unity.DemoTeam.DigitalHuman
{
[CustomEditor(typeof(SnappersHeadImporter)), CanEditMultipleObjects]
public class SnappersHeadImporterEditor : Editor
{
const string ASSETS_STRING = @"The following files will be written:
{0}_SnappersHead.asset
{0}_SnappersHead.cs
{0}_SnappersControllers.cs
{0}_SnappersBlendShapes.cs
(and overwritten if they already exist)";
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
EditorGUILayout.Space();
var singleTarget = (targets.Length == 1);
if (singleTarget)
{
EditorGUILayout.HelpBox(string.Format(ASSETS_STRING, (target as SnappersHeadImporter).csClassPrefix), MessageType.Info);
}
else
{
EditorGUILayout.HelpBox(string.Format(ASSETS_STRING, "[Multiple Prefixes]"), MessageType.Warning);
}
if (GUILayout.Button(singleTarget ? "Generate" : "Generate all selected"))
{
for (int i = 0; i != targets.Length; i++)
{
if (EditorUtility.DisplayCancelableProgressBar("Processing...", target.name, i / (targets.Length)) == false)
{
var generator = (SnappersHeadImporter)target;
if (generator != null)
{
generator.Generate();
}
}
}
EditorUtility.ClearProgressBar();
}
}
}
}

11
Editor/SnappersHeadImporterEditor.cs.meta


fileFormatVersion: 2
guid: a0a721e7c764cd546beaad5264c5d15b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

179
Editor/SnappersHeadRendererEditor.cs


//#define _SNAPPERS_TEXTURE_ARRAYS
using UnityEditor;
using UnityEngine;
namespace Unity.DemoTeam.DigitalHuman
{
[CustomEditor(typeof(SnappersHeadRenderer))]
public class SnappersHeadRendererEditor : Editor
{
void OnSceneGUI()
{
var shr = target as SnappersHeadRenderer;
if (shr == null)
return;
if (shr.headDefinition == null)
return;
var rigControllers = shr.headInstance.rigControllers;
if (rigControllers == null)
return;
var rigTransforms = shr.headInstance.rigTransforms;
if (rigTransforms == null)
return;
for (int i = 0; i != rigTransforms.Length; i++)
{
var t = rigTransforms[i];
if (t == null)
continue;
var caps = rigControllers[i].caps;
var numAxisTranslate = 0;
var numAxisRotate = 0;
var numAxisScale = 0;
numAxisTranslate += (caps & SnappersControllerCaps.translateX) != 0 ? 1 : 0;
numAxisTranslate += (caps & SnappersControllerCaps.translateY) != 0 ? 1 : 0;
numAxisTranslate += (caps & SnappersControllerCaps.translateZ) != 0 ? 1 : 0;
numAxisRotate += (caps & SnappersControllerCaps.rotateX) != 0 ? 1 : 0;
numAxisRotate += (caps & SnappersControllerCaps.rotateY) != 0 ? 1 : 0;
numAxisRotate += (caps & SnappersControllerCaps.rotateZ) != 0 ? 1 : 0;
numAxisScale += (caps & SnappersControllerCaps.scaleX) != 0 ? 1 : 0;
numAxisScale += (caps & SnappersControllerCaps.scaleY) != 0 ? 1 : 0;
numAxisScale += (caps & SnappersControllerCaps.scaleZ) != 0 ? 1 : 0;
var dirX = Vector3.right * -1.0f;// flip
var dirY = Vector3.up;
var dirZ = Vector3.forward;
var hndSize = 0.003f;
var hndSnap = 0.0f;
if (numAxisTranslate > 0)
{
var drawColor = Color.Lerp(Color.blue, Color.white, 0.5f);
var drawMatrix = t.parent.localToWorldMatrix;
using (new Handles.DrawingScope(drawColor, drawMatrix))
{
var pos = t.localPosition;
var rot = t.localRotation;
//switch (numAxisTranslate)
//{
// case 1:
// {
// if (caps == SnappersControllerCaps.translateX)
// pos = Handles.Slider(pos, dirX, hndSize, Handles.SphereHandleCap, hndSnap);
// else if (caps == SnappersControllerCaps.translateY)
// pos = Handles.Slider(pos, dirY, hndSize, Handles.SphereHandleCap, hndSnap);
// else if (caps == SnappersControllerCaps.translateZ)
// pos = Handles.Slider(pos, dirZ, hndSize, Handles.SphereHandleCap, hndSnap);
// }
// break;
// case 2:
// {
// if (caps == (SnappersControllerCaps.translateX | SnappersControllerCaps.translateY))
// pos = Handles.Slider2D(pos, dirZ, dirX, dirY, hndSize, Handles.SphereHandleCap, hndSnap);
// else if (caps == (SnappersControllerCaps.translateY | SnappersControllerCaps.translateZ))
// pos = Handles.Slider2D(pos, -dirX, dirY, dirZ, hndSize, Handles.SphereHandleCap, hndSnap);
// else if (caps == (SnappersControllerCaps.translateX | SnappersControllerCaps.translateZ))
// pos = Handles.Slider2D(pos, dirY, dirX, dirZ, hndSize, Handles.SphereHandleCap, hndSnap);
// }
// break;
// case 3:
// {
// pos = Handles.FreeMoveHandle(pos, Quaternion.identity, hndSize, hndSnap * Vector3.one, Handles.SphereHandleCap);
// }
// break;
//}
pos = Handles.FreeMoveHandle(pos, Quaternion.identity, hndSize, hndSnap * Vector3.one, Handles.SphereHandleCap);
t.localPosition = pos;
t.localRotation = rot;
}
}
}
}
#if _SNAPPERS_TEXTURE_ARRAYS
public override void OnInspectorGUI()
{
var shr = target as SnappersHeadRenderer;
if (shr == null)
return;
if (GUILayout.Button("Create Texture Array Assets"))
{
CreateTextureArrayAssets(shr);
}
base.OnInspectorGUI();
}
static void CreateTextureArrayAssets(SnappersHeadRenderer shr)
{
var inputMask = new Texture2D[] { shr.mask1, shr.mask2, shr.mask3, shr.mask4, shr.mask5, shr.mask6, shr.mask7, shr.mask8, shr.mask9, shr.mask10, shr.mask11, shr.mask12 };
var inputAlbedo = new Texture2D[] { shr.albedo1, shr.albedo2, shr.albedo3, shr.albedo4 };
var inputNormal = new Texture2D[] { shr.normal1, shr.normal2, shr.normal3, shr.normal4 };
var inputCavity = new Texture2D[] { shr.cavity1, shr.cavity2, shr.cavity3, shr.cavity4 };
var assetPath = shr.arrayAssetPath.Trim('/');
var assetPathMask = assetPath + "/_Tex2DArray_Mask.asset";
var assetPathAlbedo = assetPath + "/_Tex2DArray_Albedo.asset";
var assetPathNormal = assetPath + "/_Tex2DArray_Normal.asset";
var assetPathCavity = assetPath + "/_Tex2DArray_Cavity.asset";
shr.arrayMask = CreateTextureArrayAsset(inputMask, linear: true, assetPathMask);
shr.arrayAlbedo = CreateTextureArrayAsset(inputAlbedo, linear: false, assetPathAlbedo);
shr.arrayNormal = CreateTextureArrayAsset(inputNormal, linear: true, assetPathNormal);
shr.arrayCavity = CreateTextureArrayAsset(inputCavity, linear: true, assetPathCavity);
EditorUtility.SetDirty(shr);
AssetDatabase.SaveAssets();
}
static Texture2DArray CreateTextureArrayAsset(Texture2D[] slices, bool linear, string path)
{
var array = new Texture2DArray(slices[0].width, slices[0].height, slices.Length, slices[0].format, true, linear);
var arrayWrapper = CreateInstance<BinaryAsset>();
if (slices.Length > 0 && slices[0] != null)
{
array.wrapMode = slices[0].wrapMode;
array.anisoLevel = slices[0].anisoLevel;
array.filterMode = slices[0].filterMode;
}
for (int i = 0; i != slices.Length; i++)
{
if (slices[i] != null)
{
int mipCount = slices[i].mipmapCount;
for (int mip = 0; mip != mipCount; mip++)
{
Graphics.CopyTexture(slices[i], 0, mip, array, i, mip);
}
}
}
AssetDatabase.CreateAsset(arrayWrapper, path);
AssetDatabase.AddObjectToAsset(array, arrayWrapper);
array.name = arrayWrapper.name;
return array;
}
#endif
}
}

11
Editor/SnappersHeadRendererEditor.cs.meta


fileFormatVersion: 2
guid: 17ea265811c3bec47867f0567afc5689
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

21
Editor/Unity.DemoTeam.DigitalHuman.Editor.asmdef


{
"name": "Unity.DemoTeam.DigitalHuman.Editor",
"references": [
"GUID:7e9d95a3be8cd654ba8a8d2bb2409223",
"GUID:d8b63aba1907145bea998dd612889d6b",
"GUID:78bd2ddd6e276394a9615c203e574844",
"GUID:457756d89b35d2941b3e7b37b4ece6f1",
"GUID:02f771204943f4a40949438e873e3eff"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": false,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

7
Editor/Unity.DemoTeam.DigitalHuman.Editor.asmdef.meta


fileFormatVersion: 2
guid: b17992f34fc1e234492c1fb1aa2c005e
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Runtime/Attributes.meta


fileFormatVersion: 2
guid: 0783a80889dfc5246b2aa5cc47c5c9b9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

109
Runtime/Attributes/CmpFieldAttribute.cs


using System;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Unity.DemoTeam.Attributes
{
public enum CmpOp
{
Eq,
Geq,
Gt,
Leq,
Lt,
Neq,
}
[AttributeUsage(AttributeTargets.Field)]
public abstract class CmpFieldAttribute : PropertyAttribute
{
public readonly string fieldName;
public readonly object cmpValue;
public readonly TypeCode cmpType;
public readonly CmpOp cmpOp;
public CmpFieldAttribute(string fieldName, object cmpValue) : this(fieldName, CmpOp.Eq, cmpValue) { }
public CmpFieldAttribute(string fieldName, CmpOp cmpOp, object cmpValue)
{
this.fieldName = fieldName;
this.cmpValue = cmpValue;
this.cmpType = cmpValue is null ? TypeCode.Empty : Type.GetTypeCode(cmpValue.GetType());
this.cmpOp = cmpOp;
}
}
#if UNITY_EDITOR
public abstract class CmpFieldAttributeDrawer : PropertyDrawer
{
private static bool Compare<T>(CmpOp op, T a, T b) where T : IComparable<T>
{
switch (op)
{
case CmpOp.Eq: return a.CompareTo(b) == 0;
case CmpOp.Geq: return a.CompareTo(b) >= 0;
case CmpOp.Gt: return a.CompareTo(b) > 0;
case CmpOp.Leq: return a.CompareTo(b) <= 0;
case CmpOp.Lt: return a.CompareTo(b) < 0;
case CmpOp.Neq: return a.CompareTo(b) != 0;
default: return false;
}
}
protected bool Compare(SerializedProperty property)
{
var result = false;
var attrib = (CmpFieldAttribute)base.attribute;
if (attrib.fieldName.Length > 0)
{
var serializedPath = property.propertyPath.Substring(0, property.propertyPath.LastIndexOf('.') + 1);
var serializedValue = property.serializedObject.FindProperty(serializedPath + attrib.fieldName);
if (serializedValue != null)
{
switch (attrib.cmpType)
{
case TypeCode.Boolean:
if (serializedValue.propertyType == SerializedPropertyType.ObjectReference)
result = Compare(attrib.cmpOp, serializedValue.objectReferenceValue != null, (bool)attrib.cmpValue);
else
result = Compare(attrib.cmpOp, serializedValue.boolValue, (bool)attrib.cmpValue);
break;
case TypeCode.Byte:
case TypeCode.SByte:
case TypeCode.Int16:
case TypeCode.Int32:
case TypeCode.UInt16:
case TypeCode.UInt32:
result = Compare(attrib.cmpOp, serializedValue.intValue, (int)attrib.cmpValue);
break;
case TypeCode.Int64:
case TypeCode.UInt64:
result = Compare(attrib.cmpOp, serializedValue.longValue, (long)attrib.cmpValue);
break;
case TypeCode.Single:
result = Compare(attrib.cmpOp, serializedValue.floatValue, (float)attrib.cmpValue);
break;
case TypeCode.Double:
result = Compare(attrib.cmpOp, serializedValue.doubleValue, (double)attrib.cmpValue);
break;
case TypeCode.Empty:
result = Compare(attrib.cmpOp, serializedValue.objectReferenceValue != null, true);
break;
default:
//TODO add the remaining
break;
}
}
}
return result;
}
}
#endif
}

11
Runtime/Attributes/CmpFieldAttribute.cs.meta


fileFormatVersion: 2
guid: bc8f60e2e1180b5489264bc8c1f78c35
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

32
Runtime/Attributes/EditableIfAttribute.cs


using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Unity.DemoTeam.Attributes
{
public class EditableIfAttribute : CmpFieldAttribute
{
public EditableIfAttribute(string fieldName, object cmpValue) : base(fieldName, cmpValue) { }
public EditableIfAttribute(string fieldName, CmpOp cmpOp, object cmpValue) : base(fieldName, cmpOp, cmpValue) { }
}
#if UNITY_EDITOR
[CustomPropertyDrawer(typeof(EditableIfAttribute))]
public class EditableIfAttributeDrawer : CmpFieldAttributeDrawer
{
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
return EditorGUI.GetPropertyHeight(property, label, true);
}
public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label)
{
var enabled = GUI.enabled;
GUI.enabled = base.Compare(property);
EditorGUI.PropertyField(rect, property, true);
GUI.enabled = enabled;
}
}
#endif
}

11
Runtime/Attributes/EditableIfAttribute.cs.meta


fileFormatVersion: 2
guid: e7b56857bcbb7ee46b9748f9b1ddad88
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

24
Runtime/Attributes/EnumFlagAttribute.cs


using System;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Unity.DemoTeam.Attributes
{
[AttributeUsage(AttributeTargets.Field)]
public class EnumFlagAttribute : PropertyAttribute { }
#if UNITY_EDITOR
[CustomPropertyDrawer(typeof(EnumFlagAttribute))]
public class EnumFlagDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
Enum targetEnum = (Enum)fieldInfo.GetValue(property.serializedObject.targetObject);
Enum enumValue = EditorGUI.EnumFlagsField(position, label, targetEnum);
property.intValue = (int)Convert.ChangeType(enumValue, targetEnum.GetType());
}
}
#endif
}

11
Runtime/Attributes/EnumFlagAttribute.cs.meta


fileFormatVersion: 2
guid: e0217013c62266448a5bc4bb455106a8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

30
Runtime/Attributes/ReadOnlyAttribute.cs


using System;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Unity.DemoTeam.Attributes
{
[AttributeUsage(AttributeTargets.Field)]
public class ReadOnlyAttribute : PropertyAttribute { }
#if UNITY_EDITOR
[CustomPropertyDrawer(typeof(ReadOnlyAttribute))]
public class ReadOnlyAttributeDrawer : PropertyDrawer
{
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
return EditorGUI.GetPropertyHeight(property, label, true);
}
public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label)
{
var enabled = GUI.enabled;
GUI.enabled = false;
EditorGUI.PropertyField(rect, property, true);
GUI.enabled = enabled;
}
}
#endif
}

11
Runtime/Attributes/ReadOnlyAttribute.cs.meta


fileFormatVersion: 2
guid: 07dc730a150e3b04680c3fef00a83383
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

35
Runtime/Attributes/VisibleIfAttribute.cs


using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace Unity.DemoTeam.Attributes
{
public class VisibleIfAttribute : CmpFieldAttribute
{
public VisibleIfAttribute(string fieldName, object cmpValue) : base(fieldName, cmpValue) { }
public VisibleIfAttribute(string fieldName, CmpOp cmpOp, object cmpValue) : base(fieldName, cmpOp, cmpValue) { }
}
#if UNITY_EDITOR
[CustomPropertyDrawer(typeof(VisibleIfAttribute))]
public class VisibleIfAttributeDrawer : CmpFieldAttributeDrawer
{
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
if (base.Compare(property))
return EditorGUI.GetPropertyHeight(property, label, true);
else
return -EditorGUIUtility.standardVerticalSpacing;
}
public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label)
{
if (rect.height <= 0.0f)
return;
if (base.Compare(property))
EditorGUI.PropertyField(rect, property, true);
}
}
#endif
}

11
Runtime/Attributes/VisibleIfAttribute.cs.meta


fileFormatVersion: 2
guid: b000d0fbd2e463f43a80bcde2ab609ae
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
Runtime/CustomPasses.meta


fileFormatVersion: 2
guid: b30339184c4b80744a99e47b9f8bc48a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

203
Runtime/CustomPasses/NormalBufferBlurPass.cs


using UnityEngine;
using UnityEngine.Profiling;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
using UnityEngine.Experimental.Rendering;
// basic procedure:
//
// 1. allocate temp
// a. custom stencil
// b. custom color (R8)
// c. custom normal (ARGBHalf)
//
// 2. clear
// a. write 0 -> custom stencil
// b. write 1 -> custom color
//
// 3. copy depth
// a. write camera depth -> custom depth
//
// 4. render decals
// a. write 1 -> custom stencil
// b. write 0 -> custom color
//
// 5. enable stencil
//
// 6. render fullscreen
// a. write decoded normal -> custom normal
//
// 7. render fullscreen
// a. write blurred decoded normal -> normal
//
// 8. free temp
public class NormalBufferBlurPass : CustomPass
{
[HideInInspector] public RenderQueueType queue = RenderQueueType.AllOpaque;
[HideInInspector] public LayerMask layerMask = 0;// default to 'None'
static readonly int idInputDepth = Shader.PropertyToID("_InputDepth");
static readonly int rtStencil = Shader.PropertyToID("_NormalBufferBlur_Stencil");
static readonly int rtRegions = Shader.PropertyToID("_NormalBufferBlur_Regions");
static readonly int rtDecoded = Shader.PropertyToID("_NormalBufferBlur_Decoded");
const string NAME_SHADER = "Hidden/DigitalHuman/NormalBufferBlur";
static readonly string[] NAME_PASS_REPLACE = new string[]
{
"Forward",// HDShaderPassNames.s_ForwardStr
"ForwardOnly",// HDShaderPassNames.s_ForwardOnlyStr
"SRPDefaultUnlit", // HDShaderPassNames.s_SRPDefaultUnlitStr
"DBufferMesh_3RT",// HDShaderPassNames.s_MeshDecalsMStr
};
static ShaderTagId[] NAME_PASS_REPLACE_TAG = null;
const int PASS_COPY_DEPTH = 0;
const int PASS_MARK = 1;
const int PASS_DECODE = 2;
const int PASS_BLUR_AND_ENCODE = 3;
Material passMaterial;
static Material CreateMaterial(string shaderName)
{
var material = null as Material;
{
var shader = Shader.Find(shaderName);
if (shader != null)
{
material = new Material(shader);
material.hideFlags = HideFlags.HideAndDontSave;
}
//if (material != null)
// Debug.Log("created material for " + shaderName);
//else
// Debug.LogError("FAILED to create material for " + shaderName);
}
return material;
}
static bool EnsureMaterial(ref Material material, string shaderName)
{
if (material != null && material.shader == null)
material = null;
if (material == null)
material = CreateMaterial(shaderName);
return (material != null);
}
protected override void Setup(ScriptableRenderContext renderContext, CommandBuffer cmd)
{
base.Setup(renderContext, cmd);
EnsureMaterial(ref passMaterial, NAME_SHADER);
if (NAME_PASS_REPLACE_TAG == null)
{
NAME_PASS_REPLACE_TAG = new ShaderTagId[NAME_PASS_REPLACE.Length];
for (int i = 0; i != NAME_PASS_REPLACE_TAG.Length; i++)
{
NAME_PASS_REPLACE_TAG[i] = new ShaderTagId(NAME_PASS_REPLACE[i]);
}
}
}
protected override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResults)
{
Profiler.BeginSample("NormalBufferBlur");
ExecuteNormalBufferBlur(renderContext, cmd, hdCamera, cullingResults);
Profiler.EndSample();
}
void ExecuteNormalBufferBlur(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResults)
{
if (!EnsureMaterial(ref passMaterial, NAME_SHADER))
return;
if (layerMask == 0)
return;
if (!hdCamera.frameSettings.IsEnabled(FrameSettingsField.Decals))
return;
int viewportW = hdCamera.actualWidth;
int viewportH = hdCamera.actualHeight;
//Debug.Log("custom blur pass, w = " + viewportW + ", h = " + viewportH);
RTHandle cameraColor;
RTHandle cameraDepth;
GetCameraBuffers(out cameraColor, out cameraDepth);
// allocate temporary buffers
cmd.GetTemporaryRT(rtStencil, viewportW, viewportH, (int)DepthBits.Depth24, FilterMode.Point, RenderTextureFormat.Depth);
cmd.GetTemporaryRT(rtRegions, viewportW, viewportH, (int)DepthBits.None, FilterMode.Point, RenderTextureFormat.R8, RenderTextureReadWrite.Linear, 1, false);
cmd.GetTemporaryRT(rtDecoded, viewportW, viewportH, (int)DepthBits.None, FilterMode.Point, RenderTextureFormat.ARGBHalf, RenderTextureReadWrite.Linear, 1, false);
// copy depth from camera depth
CoreUtils.SetRenderTarget(cmd,
rtRegions, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store,
rtStencil, RenderBufferLoadAction.Load, RenderBufferStoreAction.DontCare,
ClearFlag.All, Color.white
);
cmd.SetGlobalTexture(idInputDepth, cameraDepth);
cmd.DrawProcedural(Matrix4x4.identity, passMaterial, PASS_COPY_DEPTH, MeshTopology.Triangles, 3, 1);
// render decals to mark blur regions
var renderListDesc = new RendererListDesc(NAME_PASS_REPLACE_TAG, cullingResults, hdCamera.camera)
{
rendererConfiguration = PerObjectData.None,
renderQueueRange = GetRenderQueueRange(queue),
sortingCriteria = SortingCriteria.None,
layerMask = layerMask,
overrideMaterial = passMaterial,
overrideMaterialPassIndex = PASS_MARK,
stateBlock = null,
excludeObjectMotionVectors = false,
};
HDUtils.DrawRendererList(renderContext, cmd, RendererList.Create(renderListDesc));
// decode normal buffer in marked regions
CoreUtils.SetRenderTarget(cmd,
rtDecoded, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store,
rtStencil, RenderBufferLoadAction.Load, RenderBufferStoreAction.DontCare,
ClearFlag.None
);
cmd.SetRandomWriteTarget(1, GetNormalBuffer());
cmd.DrawProcedural(Matrix4x4.identity, passMaterial, PASS_DECODE, MeshTopology.Triangles, 3, 1);
cmd.ClearRandomWriteTargets();
// blur and re-encode normals in marked regions
CoreUtils.SetRenderTarget(cmd,
rtStencil, RenderBufferLoadAction.Load, RenderBufferStoreAction.DontCare,
ClearFlag.None
);
cmd.SetGlobalTexture(rtRegions, rtRegions);
cmd.SetGlobalTexture(rtDecoded, rtDecoded);
cmd.SetRandomWriteTarget(1, GetNormalBuffer());
cmd.DrawProcedural(Matrix4x4.identity, passMaterial, PASS_BLUR_AND_ENCODE, MeshTopology.Triangles, 3, 1);
cmd.ClearRandomWriteTargets();
// free temporary buffers
cmd.ReleaseTemporaryRT(rtStencil);
cmd.ReleaseTemporaryRT(rtRegions);
cmd.ReleaseTemporaryRT(rtDecoded);
}
protected override void Cleanup()
{
base.Cleanup();
}
}

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存