mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
make get_center() return a copy so it won't destruct unexpectedly
This commit is contained in:
parent
d7d7963337
commit
ecda56d02b
@ -42,10 +42,10 @@ BoundingSphere(const LPoint3f ¢er, float radius) :
|
|||||||
// Access: Published
|
// Access: Published
|
||||||
// Description:
|
// Description:
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE_MATHUTIL const LPoint3f &BoundingSphere::
|
INLINE_MATHUTIL LPoint3f BoundingSphere::
|
||||||
get_center() const {
|
get_center() const {
|
||||||
nassertr(!is_empty(), _center);
|
nassertr(!is_empty(), LPoint3f::zero());
|
||||||
nassertr(!is_infinite(), _center);
|
nassertr(!is_infinite(), LPoint3f::zero());
|
||||||
return _center;
|
return _center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ public:
|
|||||||
virtual void output(ostream &out) const;
|
virtual void output(ostream &out) const;
|
||||||
|
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
INLINE_MATHUTIL const LPoint3f &get_center() const;
|
INLINE_MATHUTIL LPoint3f get_center() const;
|
||||||
INLINE_MATHUTIL float get_radius() const;
|
INLINE_MATHUTIL float get_radius() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user