summaryrefslogtreecommitdiffhomepage
path: root/Opcode/Ice/IceLSS.h
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-01-30 17:44:05 +0100
committerAki <please@ignore.pl>2022-01-30 17:44:05 +0100
commitc01469dddabe404506ef3a64542e8423f9e11f2c (patch)
tree740f6e0e0811227a6e40aac51ba48057f1166b41 /Opcode/Ice/IceLSS.h
parent51657e10769faa2617d546a06c42e4c62a19bb50 (diff)
downloadstarshatter-c01469dddabe404506ef3a64542e8423f9e11f2c.zip
starshatter-c01469dddabe404506ef3a64542e8423f9e11f2c.tar.gz
starshatter-c01469dddabe404506ef3a64542e8423f9e11f2c.tar.bz2
Converted Opcode and Ice into unix newlines format
Diffstat (limited to 'Opcode/Ice/IceLSS.h')
-rw-r--r--Opcode/Ice/IceLSS.h150
1 files changed, 75 insertions, 75 deletions
diff --git a/Opcode/Ice/IceLSS.h b/Opcode/Ice/IceLSS.h
index 8a26823..e4c9ef8 100644
--- a/Opcode/Ice/IceLSS.h
+++ b/Opcode/Ice/IceLSS.h
@@ -1,75 +1,75 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Contains code for line-swept spheres.
- * \file IceLSS.h
- * \author Pierre Terdiman
- * \date April, 4, 2000
- */
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Include Guard
-#ifndef __ICELSS_H__
-#define __ICELSS_H__
-
- class ICEMATHS_API LSS : public IceSegment
- {
- public:
- //! Constructor
- inline_ LSS() {}
- //! Constructor
- inline_ LSS(const IceSegment& seg, float radius) : IceSegment(seg), mRadius(radius) {}
- //! Destructor
- inline_ ~LSS() {}
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /**
- * Computes an OBB surrounding the LSS.
- * \param box [out] the OBB
- */
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- void ComputeOBB(OBB& box);
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /**
- * Tests if a IcePoint is contained within the LSS.
- * \param pt [in] the IcePoint to test
- * \return true if inside the LSS
- * \warning IcePoint and LSS must be in same space
- */
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- inline_ bool Contains(const IcePoint& pt) const { return SquareDistance(pt) <= mRadius*mRadius; }
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /**
- * Tests if a sphere is contained within the LSS.
- * \param sphere [in] the sphere to test
- * \return true if inside the LSS
- * \warning sphere and LSS must be in same space
- */
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- inline_ bool Contains(const Sphere& sphere)
- {
- float d = mRadius - sphere.mRadius;
- if(d>=0.0f) return SquareDistance(sphere.mCenter) <= d*d;
- else return false;
- }
-
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- /**
- * Tests if an LSS is contained within the LSS.
- * \param lss [in] the LSS to test
- * \return true if inside the LSS
- * \warning both LSS must be in same space
- */
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- inline_ bool Contains(const LSS& lss)
- {
- // We check the LSS contains the two spheres at the start and end of the sweep
- return Contains(Sphere(lss.mP0, lss.mRadius)) && Contains(Sphere(lss.mP0, lss.mRadius));
- }
-
- float mRadius; //!< Sphere radius
- };
-
-#endif // __ICELSS_H__
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Contains code for line-swept spheres.
+ * \file IceLSS.h
+ * \author Pierre Terdiman
+ * \date April, 4, 2000
+ */
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Include Guard
+#ifndef __ICELSS_H__
+#define __ICELSS_H__
+
+ class ICEMATHS_API LSS : public IceSegment
+ {
+ public:
+ //! Constructor
+ inline_ LSS() {}
+ //! Constructor
+ inline_ LSS(const IceSegment& seg, float radius) : IceSegment(seg), mRadius(radius) {}
+ //! Destructor
+ inline_ ~LSS() {}
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * Computes an OBB surrounding the LSS.
+ * \param box [out] the OBB
+ */
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ void ComputeOBB(OBB& box);
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * Tests if a IcePoint is contained within the LSS.
+ * \param pt [in] the IcePoint to test
+ * \return true if inside the LSS
+ * \warning IcePoint and LSS must be in same space
+ */
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ inline_ bool Contains(const IcePoint& pt) const { return SquareDistance(pt) <= mRadius*mRadius; }
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * Tests if a sphere is contained within the LSS.
+ * \param sphere [in] the sphere to test
+ * \return true if inside the LSS
+ * \warning sphere and LSS must be in same space
+ */
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ inline_ bool Contains(const Sphere& sphere)
+ {
+ float d = mRadius - sphere.mRadius;
+ if(d>=0.0f) return SquareDistance(sphere.mCenter) <= d*d;
+ else return false;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * Tests if an LSS is contained within the LSS.
+ * \param lss [in] the LSS to test
+ * \return true if inside the LSS
+ * \warning both LSS must be in same space
+ */
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ inline_ bool Contains(const LSS& lss)
+ {
+ // We check the LSS contains the two spheres at the start and end of the sweep
+ return Contains(Sphere(lss.mP0, lss.mRadius)) && Contains(Sphere(lss.mP0, lss.mRadius));
+ }
+
+ float mRadius; //!< Sphere radius
+ };
+
+#endif // __ICELSS_H__