Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
komietty committed Jun 4, 2021
0 parents commit 311c170
Show file tree
Hide file tree
Showing 52 changed files with 4,163 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Mm]emoryCaptures/
/[Rr]ecordings/

# Never ignore Asset meta data
!/[Aa]ssets/**/*.meta

# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*

# Autogenerated Jetbrains Rider plugin
[Aa]ssets/Plugins/Editor/JetBrains*

# Visual Studio cache directory
.vs/
.vsconfig

# Gradle cache directory
.gradle/

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db

# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta

# Unity3D generated file on crash reports
sysinfo.txt

# Builds
*.apk
*.unitypackage

# Crashlytics generated file
crashlytics-build.properties
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Assets/Packages/unity-simplex-geometry"]
path = Assets/Packages/unity-simplex-geometry
url = https://github.com/komietty/unity-simplex-geometry.git
8 changes: 8 additions & 0 deletions Assets/AnimatedQuickhull.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions Assets/AnimatedQuickhull/AnimatedQuickhull2D.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Unity.Mathematics;
using static Unity.Mathematics.math;

namespace kmty.geom.d2.animatedquickhull {
using f2 = float2;
using f3 = float3;
using V2 = Vector2;
using SG = Segment;

public class AnimatedQuickhull2D {
public Transform[] bones { get; protected set; }
public Convex convex { get; protected set; }

public AnimatedQuickhull2D(SkinnedMeshRenderer skin) {
this.bones = skin.bones;
Execute();
}

public void Execute() {
convex = new Convex(bones.Select(b => (f2)(V2)b.position));
convex.ExpandLoop();
}
}

}
11 changes: 11 additions & 0 deletions Assets/AnimatedQuickhull/AnimatedQuickhull2D.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Demo.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 311c170

Please sign in to comment.