summary refs log tree commit diff
path: root/src/Quaternions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Quaternions.h')
-rw-r--r--src/Quaternions.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/Quaternions.h b/src/Quaternions.h
index 8cf1eff..ee3e876 100644
--- a/src/Quaternions.h
+++ b/src/Quaternions.h
@@ -1,8 +1,6 @@
 #ifndef BLACKSHADES_QUATERNIONS_H
 #define BLACKSHADES_QUATERNIONS_H
 
-using namespace std;
-
 struct XYZ {
 	float x, y, z;
 };
@@ -38,23 +36,25 @@ constexpr XYZ& operator-=(XYZ& u, const XYZ& v) { return u = u - v; }
 constexpr XYZ& operator*=(XYZ& u, const XYZ& v) { return u = u * v; }
 constexpr XYZ& operator*=(XYZ& u, float k) { return u = u * k; }
 constexpr XYZ& operator/=(XYZ& u, float k) { return u = u / k; }
-
-float LineFacetd(XYZ p1, XYZ p2, XYZ pa, XYZ pb, XYZ pc, XYZ n, XYZ* p);
-float LineFacetd(XYZ* p1, XYZ* p2, XYZ* pa, XYZ* pb, XYZ* pc, XYZ* n, XYZ* p);
 #endif // __cplusplus
 
 #ifdef __cplusplus
 extern "C" {
 #endif // __cplusplus
-	void CrossProduct(XYZ P, XYZ Q, XYZ *V);
-	void Normalise(XYZ *vectory);
-	bool PointInTriangle(XYZ *p, XYZ normal, XYZ *p1, XYZ *p2, XYZ *p3);
-	void ReflectVector(XYZ *vel, XYZ *n);
-	XYZ DoRotation(XYZ thePoint, float xang, float yang, float zang);
-	float findDistance(XYZ point1, XYZ point2);
-	float findLengthfast(XYZ point1);
-	float findDistancefast(XYZ point1, XYZ point2);
-	float dotproduct(XYZ point1, XYZ point2);
+	void CrossProduct(struct XYZ P, struct XYZ Q, struct XYZ *V);
+	void Normalise(struct XYZ *vectory);
+	bool PointInTriangle(struct XYZ *p, struct XYZ normal,
+		struct XYZ *p1, struct XYZ *p2, struct XYZ *p3);
+	float LineFacetd(struct XYZ p1, struct XYZ p2,
+		struct XYZ pa, struct XYZ pb, struct XYZ pc,
+		struct XYZ n, struct XYZ *p);
+	void ReflectVector(struct XYZ *vel, struct XYZ *n);
+	struct XYZ DoRotation(struct XYZ thePoint,
+		float xang, float yang, float zang);
+	float findDistance(struct XYZ point1, struct XYZ point2);
+	float findLengthfast(struct XYZ point1);
+	float findDistancefast(struct XYZ point1, struct XYZ point2);
+	float dotproduct(struct XYZ point1, struct XYZ point2);
 	bool sphere_line_intersection(float x1, float y1, float z1,
 		float x2, float y2, float z2,
 		float x3, float y3, float z3, float r);