mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Tool specific pointing and blocking pointable type (#13992)
This commit is contained in:
parent
fb461d21a5
commit
5958714309
39 changed files with 676 additions and 67 deletions
|
@ -23,8 +23,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "irr_v3d.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include "pointabilities.h"
|
||||
|
||||
enum PointedThingType : u8
|
||||
enum PointedThingType :u8
|
||||
{
|
||||
POINTEDTHING_NOTHING,
|
||||
POINTEDTHING_NODE,
|
||||
|
@ -90,15 +91,20 @@ struct PointedThing
|
|||
* ray's start point and the intersection point in irrlicht coordinates.
|
||||
*/
|
||||
f32 distanceSq = 0;
|
||||
/*!
|
||||
* How the object or node has been pointed at.
|
||||
*/
|
||||
PointabilityType pointability = PointabilityType::POINTABLE_NOT;
|
||||
|
||||
//! Constructor for POINTEDTHING_NOTHING
|
||||
PointedThing() = default;
|
||||
//! Constructor for POINTEDTHING_NODE
|
||||
PointedThing(const v3s16 &under, const v3s16 &above,
|
||||
const v3s16 &real_under, const v3f &point, const v3f &normal,
|
||||
u16 box_id, f32 distSq);
|
||||
u16 box_id, f32 distSq, PointabilityType pointability);
|
||||
//! Constructor for POINTEDTHING_OBJECT
|
||||
PointedThing(u16 id, const v3f &point, const v3f &normal, const v3f &raw_normal, f32 distSq);
|
||||
PointedThing(u16 id, const v3f &point, const v3f &normal, const v3f &raw_normal, f32 distSq,
|
||||
PointabilityType pointability);
|
||||
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