-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Darius
committed
Mar 15, 2018
1 parent
b4ea730
commit 3747690
Showing
55 changed files
with
5,746 additions
and
1,438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
/** | ||
* Contains code to compute the minimal bounding sphere. | ||
* \file IceBoundingSphere.h | ||
* \author Pierre Terdiman | ||
* \date January, 29, 2000 | ||
*/ | ||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
// Include Guard | ||
#ifndef __ICEBOUNDINGSPHERE_H__ | ||
#define __ICEBOUNDINGSPHERE_H__ | ||
|
||
class MESHMERIZER_API Sphere | ||
{ | ||
public: | ||
// Constructor/Destructor | ||
Sphere() {} | ||
Sphere(const Point& center, float radius) : mCenter(center), mRadius(radius) {} | ||
Sphere(const udword n, Point* p); | ||
|
||
bool Compute(udword nbverts, Point* verts); | ||
bool FastCompute(udword nbverts, Point* verts); | ||
|
||
// Access methods | ||
__forceinline const Point& GetCenter() const { return mCenter; } | ||
__forceinline float GetRadius() const { return mRadius; } | ||
|
||
__forceinline const Point& Center() const { return mCenter; } | ||
__forceinline float Radius() const { return mRadius; } | ||
|
||
__forceinline Sphere& Set(const Point& center, float radius) { mCenter = center; mRadius = radius; return *this; } | ||
__forceinline Sphere& SetCenter(const Point& center) { mCenter = center; return *this; } | ||
__forceinline Sphere& SetRadius(float radius) { mRadius = radius; return *this; } | ||
|
||
public: | ||
Point mCenter; //!< Sphere center | ||
float mRadius; //!< Sphere radius | ||
}; | ||
|
||
#endif // __ICEBOUNDINGSPHERE_H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.