From a2f05726379d1440f8709eb9b81913e1ca72f771 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Sun, 06 May 2018 16:33:53 +0000
Subject: [PATCH] Added some extra field into wrappers

---
 trisurf/wrapper.py |   37 ++++++++++++++++++++++++++++++++++++-
 1 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/trisurf/wrapper.py b/trisurf/wrapper.py
index 35d0405..2ed7591 100644
--- a/trisurf/wrapper.py
+++ b/trisurf/wrapper.py
@@ -199,7 +199,7 @@
 ts_cluster._fields_=[('nvtx',c_uint),('idx',c_uint),('vtx', POINTER(POINTER(ts_vertex)))]
 
 class ts_cluster_list(Structure):
-	_fields_=[('n',c_uint),('poly',POINTER(POINTER(ts_cluster)))]
+	_fields_=[('n',c_uint),('cluster',POINTER(POINTER(ts_cluster)))]
 
 
 
@@ -247,5 +247,40 @@
 	ts.vesicle_free.argtype=[POINTER(ts_vesicle)]
 	ts.vesicle_free(vesicle)
 
+def vesicle_volume(vesicle):
+	ts.vesicle_volume.argtype=[POINTER(ts_vesicle)]
+	ts.vesicle_volume(vesicle)
 
+def vesicle_area(vesicle):
+	ts.vesicle_area.argtype=[POINTER(ts_vesicle)]
+	ts.vesicle_area(vesicle)
 
+def gyration_eigen(vesicle):
+	ts.gyration_eigen.argtype=[POINTER(ts_vesicle), POINTER(c_double), POINTER(c_double), POINTER(c_double)]
+	l1=c_double(0.0)
+	l2=c_double(0.0)
+	l3=c_double(0.0)
+	ts.gyration_eigen(vesicle , byref(l1), byref(l2), byref(l3))
+	return (l1.value, l2.value, l3.value)
+
+def vesicle_meancurvature(vesicle):
+	ts.vesicle_meancurvature.argtype=[POINTER(ts_vesicle)]
+	ts.vesicle_meancurvature.restype=c_double
+	return ts.vesicle_meancurvature(vesicle)
+
+def init_cluster_list():
+	ts.init_cluster_list.restype=POINTER(ts_cluster_list)
+	ret=ts.init_cluster_list()
+	return ret
+
+def clusterize_vesicle(vesicle, cluster_list):
+	ts.clusterize_vesicle.argtype=[POINTER(ts_vesicle), POINTER(ts_cluster_list)]
+	ts.clusterize_vesicle(vesicle, cluster_list)
+
+def cluster_list_free(cluster_list):
+	"""Free memory of cluster list"""
+	ts.cluster_list_free.argtype=[POINTER(ts_cluster_list)]
+	ts.cluster_list_free(cluster_list)
+
+	
+	

--
Gitblit v1.9.3