Skip to content

Commit

Permalink
read me update and white space fix
Browse files Browse the repository at this point in the history
  • Loading branch information
obviousjim committed Jun 25, 2012
1 parent 2fe3347 commit f5835ab
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -5,6 +5,6 @@ Paul Bourke's Delaunay Triangulation implementation.
This is a big refactor from Julapy (Lukasz Karluk) and Pat Long's version (http://code.google.com/p/julapy/source/browse/trunk/openframeworks/ofxDelaunay/?r=708)

Changes:
Now uses ofMesh rather than custom data structure
uses std::vector for internal storage, which removes need for reallocating memory or constructor/destructors
Removed need for setMaxPoints(). No max points enforced
* Now uses ofMesh rather than custom data structure
* uses std::vector for internal storage, which removes need for reallocating memory or constructor/destructors
* Removed need for setMaxPoints(). No max points enforced
10 changes: 6 additions & 4 deletions src/ofxDelaunay.cpp
@@ -1,18 +1,20 @@
/*
* ofxDelaunay.cpp
* openFrameworks
* ofxDelaunay.h
*
* Created by Pat Long on 29/10/09.
* Copyright 2009 Tangible Interaction. All rights reserved.
*
* Some parts based on demo code by Gilles Dumoulin.
* Source: http://local.wasp.uwa.edu.au/~pbourke/papers/triangulate/cpp.zip
*
* Cleaned up by Lukasz Karluk, 19/05/2010
*
* Refactored for 0071 + ofMesh by James George on 21/06/2012
*/

#include "ofxDelaunay.h"

void ofxDelaunay::reset(){

vertices.clear();
triangles.clear();
triangleMesh.clear();
Expand Down Expand Up @@ -48,7 +50,7 @@ int ofxDelaunay::triangulate(){

//allocate space for triangle indices
triangles.resize(3*nv);

int ntri;
qsort( &vertices[0], vertices.size()-3, sizeof( XYZ ), XYZCompare );
Triangulate( nv, &vertices[0], &triangles[0], ntri );
Expand Down
6 changes: 3 additions & 3 deletions src/ofxDelaunay.h
Expand Up @@ -18,8 +18,8 @@
#include "Delaunay.h"

class ofxDelaunay {

public:
public:

void reset();

Expand All @@ -32,7 +32,7 @@ class ofxDelaunay {

ofMesh triangleMesh;

private:
private:
vector<ITRIANGLE> triangles;
vector<XYZ> vertices;

Expand Down

0 comments on commit f5835ab

Please sign in to comment.