Emergency 20 Dokumentation  4.2.0
em5::RayMapQueryResponse Struct Reference

#include <RayMapQuery.h>

Public Types

enum  Flag {
  ASYNCHRONOUS_RESPONSE = 1<<1, POSITION_RESPONSE = 1<<2, FOR_SELECTION = 1<<3, EXCLUDE_TERRAIN = 1<<4,
  EXCLUDE_OGRE_ENTITIES = 1<<5
}
 
typedef qsf::BitFlagSet< uint8, FlagFlags
 
typedef boost::function< void(const RayMapQueryResponse &)> Callback
 Query response callback; called in case of asynchronous processing from the main thread. More...
 

Public Member Functions

 RayMapQueryResponse ()
 
 RayMapQueryResponse (uint8 _flags)
 

Public Attributes

Flags flags
 Hint which query response data is required (used for skipping expensive work, inexpensive not required data might still be written) More...
 
bool success
 Set if query was successful, i.e. the ray hit anything at all. More...
 
qsf::WeakPtr< qsf::Entityentity
 Receives on success the entity the rest of the response data comes from, on failure the content is not touched. More...
 
glm::vec3 position
 Receives on success the found world space position, on failure the content is not touched. More...
 
Callback callback
 Query response callback; called in case of asynchronous processing from the main thread. More...
 

Member Typedef Documentation

typedef boost::function<void(const RayMapQueryResponse&)> em5::RayMapQueryResponse::Callback

Query response callback; called in case of asynchronous processing from the main thread.

Member Enumeration Documentation

Enumerator
ASYNCHRONOUS_RESPONSE 

Asynchronous response; flag will only be used if there's a response callback provided - TODO(co) Reserved for future use, not implemented yet.

POSITION_RESPONSE 

World space position query response data required.

FOR_SELECTION 

Indicates if only selectable entities should be returned.

EXCLUDE_TERRAIN 

Exclude the terrain for the check.

EXCLUDE_OGRE_ENTITIES 

Exclude the OGRE entities for the check.

Constructor & Destructor Documentation

em5::RayMapQueryResponse::RayMapQueryResponse ( )
inline
em5::RayMapQueryResponse::RayMapQueryResponse ( uint8  _flags)
inlineexplicit

Member Data Documentation

Callback em5::RayMapQueryResponse::callback

Query response callback; called in case of asynchronous processing from the main thread.

qsf::WeakPtr<qsf::Entity> em5::RayMapQueryResponse::entity

Receives on success the entity the rest of the response data comes from, on failure the content is not touched.

Flags em5::RayMapQueryResponse::flags

Hint which query response data is required (used for skipping expensive work, inexpensive not required data might still be written)

glm::vec3 em5::RayMapQueryResponse::position

Receives on success the found world space position, on failure the content is not touched.

bool em5::RayMapQueryResponse::success

Set if query was successful, i.e. the ray hit anything at all.


The documentation for this struct was generated from the following file: