summaryrefslogtreecommitdiffstats
path: root/source/Tracer.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-24 00:09:57 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-24 00:09:57 +0200
commitecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26 (patch)
tree898e37fe747f0fdcefeb88f833557fd45db3347c /source/Tracer.h
parentSource files cleanup: ChunkDataSerializer is Protocol-related (diff)
downloadcuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.tar
cuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.tar.gz
cuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.tar.bz2
cuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.tar.lz
cuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.tar.xz
cuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.tar.zst
cuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.zip
Diffstat (limited to 'source/Tracer.h')
-rw-r--r--source/Tracer.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/source/Tracer.h b/source/Tracer.h
new file mode 100644
index 000000000..fa9d3c673
--- /dev/null
+++ b/source/Tracer.h
@@ -0,0 +1,34 @@
+#pragma once
+
+#include "Vector3i.h"
+#include "Vector3f.h"
+
+
+class cWorld;
+class cTracer //tolua_export
+{ //tolua_export
+public: //tolua_export
+ Vector3f DotPos;
+ Vector3f BoxOffset;
+ cTracer( cWorld* a_World); //tolua_export
+ ~cTracer(); //tolua_export
+ int Trace( const Vector3f & a_Start, const Vector3f & a_Direction, int a_Distance ); //tolua_export
+ void SetValues( const Vector3f & a_Start, const Vector3f & a_Direction ); //tolua_export
+ Vector3f BlockHitPosition; //tolua_export
+ Vector3f HitNormal; //tolua_export
+ Vector3f RealHit; //tolua_export
+private:
+ int intersect3D_SegmentPlane( const Vector3f & a_Origin, const Vector3f & a_End, const Vector3f & a_PlanePos, const Vector3f & a_PlaneNormal );
+ int GetHitNormal( const Vector3f & start, const Vector3f & end, const Vector3i & a_BlockPos);
+ float SigNum( float a_Num );
+ cWorld* m_World;
+
+ Vector3f m_NormalTable[6];
+
+ Vector3f dir;
+ Vector3f tDelta;
+ Vector3i pos;
+ Vector3i end1;
+ Vector3i step;
+ Vector3f tMax;
+}; //tolua_export \ No newline at end of file