aboutsummaryrefslogtreecommitdiff
path: root/src/util/pointedthing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/pointedthing.h')
-rw-r--r--src/util/pointedthing.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/util/pointedthing.h b/src/util/pointedthing.h
index 68b183195..e4f2eb20c 100644
--- a/src/util/pointedthing.h
+++ b/src/util/pointedthing.h
@@ -74,7 +74,12 @@ struct PointedThing
* This is perpendicular to the face the ray hits,
* points outside of the box and it's length is 1.
*/
- v3s16 intersection_normal;
+ v3f intersection_normal;
+ /*!
+ * Only valid if type is POINTEDTHING_OBJECT.
+ * Raw normal vector of the intersection before applying rotation.
+ */
+ v3f raw_intersection_normal;
/*!
* Only valid if type isn't POINTEDTHING_NONE.
* Indicates which selection box is selected, if there are more of them.
@@ -90,10 +95,10 @@ struct PointedThing
PointedThing() = default;
//! Constructor for POINTEDTHING_NODE
PointedThing(const v3s16 &under, const v3s16 &above,
- const v3s16 &real_under, const v3f &point, const v3s16 &normal,
+ const v3s16 &real_under, const v3f &point, const v3f &normal,
u16 box_id, f32 distSq);
//! Constructor for POINTEDTHING_OBJECT
- PointedThing(u16 id, const v3f &point, const v3s16 &normal, f32 distSq);
+ PointedThing(u16 id, const v3f &point, const v3f &normal, const v3f &raw_normal, f32 distSq);
std::string dump() const;
void serialize(std::ostream &os) const;
void deSerialize(std::istream &is);