Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

This repository is deprecated. The official release version is in the asset store!

Teddy

unity-teddy

Teddy algorithm (converting 2D polygon into 3D model) implementation in Unity.

Usage

// input points for a Polygon2D contor
List<Vector2> points = new List<Vector2>();

// Add Vector2 to points
points.Add(new Vector2(-2.5f, -2.5f));
points.Add(new Vector2(2.5f, -2.5f));
points.Add(new Vector2(4.5f, 2.5f));
points.Add(new Vector2(0.5f, 4.5f));
points.Add(new Vector2(-3.5f, 2.5f));

// construct Teddy 
Teddy teddy = new Teddy(points);

Mesh mesh = teddy.Build(
    MeshSmoothingMethod.HC,  // select mesh smoothing methods : None, Laplacian, HC
    5, // count of smoothing
    0.25f, // alpha value for smoothing 
    0.5f // beta value for smoothing
);
// GetComponent<MeshFilter>().sharedMesh = mesh;

Demo

Demo

Compatibility

tested on Unity 2018.2.6f, windows10 (GTX 1060).

Sources

About

Teddy algorithm implementation in Unity.

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.