mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Allow rotating entity selectionboxes (#12379)
This commit is contained in:
parent
b829231992
commit
077627181e
18 changed files with 271 additions and 58 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue