summaryrefslogtreecommitdiffstats
path: root/src/Tracer.h
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-07-31 19:26:33 +0200
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-07-31 19:26:33 +0200
commitd19cde93fa3344f318fb0d4ffbf5bb0397a51a75 (patch)
treeb5ee221d8a8e63c7d3b7868da1db19bf717a6ffd /src/Tracer.h
parentMerge pull request #2400 from cuberite/OffloadBadChunks (diff)
parentUnified the doxy-comment format. (diff)
downloadcuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar
cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.gz
cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.bz2
cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.lz
cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.xz
cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.zst
cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.zip
Diffstat (limited to '')
-rw-r--r--src/Tracer.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/Tracer.h b/src/Tracer.h
index 55c21546b..d8422a7c6 100644
--- a/src/Tracer.h
+++ b/src/Tracer.h
@@ -22,48 +22,48 @@ class cTracer
{
public:
- /// Contains the position of the block that caused the collision
+ /** Contains the position of the block that caused the collision */
Vector3f BlockHitPosition;
- /// Contains which face was hit
+ /** Contains which face was hit */
Vector3f HitNormal;
- /// Contains the exact position where a collision occured. (BlockHitPosition + Offset on block)
+ /** Contains the exact position where a collision occured. (BlockHitPosition + Offset on block) */
Vector3f RealHit;
cTracer(cWorld * a_World);
~cTracer();
- /// Determines if a collision occures along a line. Returns true if a collision occurs.
+ /** Determines if a collision occures along a line. Returns true if a collision occurs. */
bool Trace(const Vector3f & a_Start, const Vector3f & a_Direction, int a_Distance)
{
return Trace(a_Start, a_Direction, a_Distance, false);
}
- /// Determines if a collision occures along a line. Returns true if a collision occurs.
- /// When a_LineOfSight is true, we don't use the standard collision detection rules. Instead we use
- /// the rules for monster vision. E.g. Only water and air do not block vision.
- /// a_Distance is the number of iterations (blocks hits) that are tested.
+ /** Determines if a collision occures along a line. Returns true if a collision occurs.
+ When a_LineOfSight is true, we don't use the standard collision detection rules. Instead we use
+ the rules for monster vision. E.g. Only water and air do not block vision.
+ a_Distance is the number of iterations (blocks hits) that are tested. */
bool Trace(const Vector3f & a_Start, const Vector3f & a_Direction, int a_Distance, bool a_LineOfSight);
private:
- /// Preps Tracer object for call of Trace function. Only used internally.
- void SetValues( const Vector3f & a_Start, const Vector3f & a_Direction);
+ /** Preps Tracer object for call of Trace function. Only used internally. */
+ void SetValues(const Vector3f & a_Start, const Vector3f & a_Direction);
- /// Calculates where on the block a collision occured, if it does occur
- /// Returns 0 if no intersection occured
- /// Returns 1 if an intersection occured at a single point
- /// Returns 2 if the line segment lies in the plane being checked
- int intersect3D_SegmentPlane( const Vector3f & a_Origin, const Vector3f & a_End, const Vector3f & a_PlanePos, const Vector3f & a_PlaneNormal);
+ /** Calculates where on the block a collision occured, if it does occur
+ Returns 0 if no intersection occured
+ Returns 1 if an intersection occured at a single point
+ Returns 2 if the line segment lies in the plane being checked */
+ int intersect3D_SegmentPlane(const Vector3f & a_Origin, const Vector3f & a_End, const Vector3f & a_PlanePos, const Vector3f & a_PlaneNormal);
- /// Determines which face on the block a collision occured, if it does occur
- /// Returns 0 if the block is air, water or no collision occured
- /// Return 1 through 6 for the following block faces, repectively: -x, -z, x, z, y, -y
- int GetHitNormal( const Vector3f & start, const Vector3f & end, const Vector3i & a_BlockPos);
+ /** Determines which face on the block a collision occured, if it does occur
+ Returns 0 if the block is air, water or no collision occured
+ Return 1 through 6 for the following block faces, repectively: -x, -z, x, z, y, -y */
+ int GetHitNormal(const Vector3f & start, const Vector3f & end, const Vector3i & a_BlockPos);
- /// Signum function
+ /** Signum function */
int SigNum(float a_Num);
cWorld * m_World;