From 6b8814f9c9d341d2a43f4f25f44481c136650846 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 16 Dec 2018 21:03:43 +0100 Subject: [PATCH] mathutil: add some properties for bounding volumes --- panda/src/mathutil/boundingSphere.h | 2 ++ panda/src/mathutil/finiteBoundingVolume.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/panda/src/mathutil/boundingSphere.h b/panda/src/mathutil/boundingSphere.h index 8c105daa01..2e63fb3396 100644 --- a/panda/src/mathutil/boundingSphere.h +++ b/panda/src/mathutil/boundingSphere.h @@ -47,6 +47,8 @@ PUBLISHED: INLINE_MATHUTIL void set_center(const LPoint3 ¢er); INLINE_MATHUTIL void set_radius(PN_stdfloat radius); + MAKE_PROPERTY(center, get_center, set_center); + MAKE_PROPERTY(radius, get_radius, set_radius); public: virtual const BoundingSphere *as_bounding_sphere() const; diff --git a/panda/src/mathutil/finiteBoundingVolume.h b/panda/src/mathutil/finiteBoundingVolume.h index e344151685..e527faa88b 100644 --- a/panda/src/mathutil/finiteBoundingVolume.h +++ b/panda/src/mathutil/finiteBoundingVolume.h @@ -30,6 +30,10 @@ PUBLISHED: virtual LPoint3 get_max() const=0; virtual PN_stdfloat get_volume() const; + MAKE_PROPERTY(min, get_min); + MAKE_PROPERTY(max, get_max); + MAKE_PROPERTY(volume, get_volume); + public: virtual const FiniteBoundingVolume *as_finite_bounding_volume() const;