Minetest  5.4.0
RaycastState Class Reference

Describes the state of a raycast. More...

#include <raycast.h>

+ Collaboration diagram for RaycastState:

Public Member Functions

 RaycastState (const core::line3d< f32 > &shootline, bool objects_pointable, bool liquids_pointable)
 

Public Attributes

core::line3d< f32 > m_shootline
 Shootline of the raycast. More...
 
voxalgo::VoxelLineIterator m_iterator
 Iterator to store the progress of the raycast. More...
 
v3s16 m_previous_node
 Previous tested node during the raycast. More...
 
std::priority_queue< PointedThing, std::vector< PointedThing >, RaycastSortm_found
 
bool m_objects_pointable
 
bool m_liquids_pointable
 
core::aabbox3d< s16 > m_search_range { 0, 0, 0, 0, 0, 0 }
 The code needs to search these nodes around the center node. More...
 
bool m_initialization_needed = true
 If true, the Environment will initialize this state. More...
 

Detailed Description

Describes the state of a raycast.

Constructor & Destructor Documentation

◆ RaycastState()

RaycastState::RaycastState ( const core::line3d< f32 > &  shootline,
bool  objects_pointable,
bool  liquids_pointable 
)

Creates a raycast.

Parameters
objects_pointableif false, only nodes will be found
liquidspointable if false, liquid nodes won't be found

Member Data Documentation

◆ m_found

std::priority_queue<PointedThing, std::vector<PointedThing>, RaycastSort> RaycastState::m_found

This priority queue stores the found pointed things waiting to be returned.

Referenced by Environment::continueRaycast().

◆ m_initialization_needed

bool RaycastState::m_initialization_needed = true

If true, the Environment will initialize this state.

Referenced by Environment::continueRaycast().

◆ m_iterator

voxalgo::VoxelLineIterator RaycastState::m_iterator

Iterator to store the progress of the raycast.

Referenced by Environment::continueRaycast().

◆ m_liquids_pointable

bool RaycastState::m_liquids_pointable

◆ m_objects_pointable

bool RaycastState::m_objects_pointable

◆ m_previous_node

v3s16 RaycastState::m_previous_node

Previous tested node during the raycast.

Referenced by Environment::continueRaycast().

◆ m_search_range

core::aabbox3d<s16> RaycastState::m_search_range { 0, 0, 0, 0, 0, 0 }

The code needs to search these nodes around the center node.

Referenced by Environment::continueRaycast().

◆ m_shootline

core::line3d<f32> RaycastState::m_shootline

Shootline of the raycast.

Referenced by Environment::continueRaycast().


The documentation for this class was generated from the following files: