From a08d432edd52ddd28c5afd806b59cf28aee63ef9 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 20 Apr 2021 17:08:43 +0530 Subject: Wrap ellipsoid functions. * scm/nsmc/wrap.scm (make-ellipsoid-params, make-ellipsoid-oracle, ellipsoid-true-volume): New functions. --- scm/nsmc/wrap.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'scm') diff --git a/scm/nsmc/wrap.scm b/scm/nsmc/wrap.scm index 5e4c8be..9226483 100644 --- a/scm/nsmc/wrap.scm +++ b/scm/nsmc/wrap.scm @@ -315,6 +315,17 @@ ((true-volume-procedure "spheroid_true_volume") dimension (make-spheroid-params eccentricity))) +(define (make-ellipsoid-params axes) + (make-c-struct (list '*) (list axes))) + +(define-public (make-ellipsoid-oracle axes) + (make-extent-oracle (dynamic-func "ellipsoid_extent_oracle" lib-nsmc) + (make-ellipsoid-params axes))) + +(define-public (ellipsoid-true-volume axes) + ((true-volume-procedure "ellipsoid_true_volume") + (vector-size axes) (make-ellipsoid-params axes))) + ;; integrands (define (make-integrand integrand params) -- cgit v1.2.3