aether::protocol::base Namespace Reference

Typedefs

using net_position_2d = aether::vec2f
 
using net_position_3d = aether::vec3f
 

Enumerations

enum  entity_flags : uint32_t { is_owned = (1 << 0), is_dropped = (1 << 1), is_dead = (1 << 2) }
 
enum  aether_event_type_t { EVENT_CURSOR_MOVE = 0, EVENT_MOUSE_CLICK = 1, EVENT_DEL_AGENT = 2 }
 
enum  aether_button_action_t { BUTTON_PRESSED = 0, BUTTON_RELEASED = 1 }
 

Functions

 HADEAN_PACK (struct net_tree_cell{uint64_t code;uint64_t level;machine_id machine_id;uint8_t dimension;net_tree_cell()=default;template< typename MortonCode > net_tree_cell(const aether::morton::tree_cell< MortonCode > &cell):code(cell.code), level(cell.level), dimension(MortonCode::dimension){}})
 
 HADEAN_PACK (struct net_point_2d{net_position_2d net_encoded_position;uint32_t net_encoded_color;uint64_t id;uint32_t owner_id;uint32_t flags=0;})
 
static uint64_t get_entity_id (const net_point_2d &entity)
 
static aether::optional< uint64_t > get_owner_id (const net_point_2d &entity)
 
static aether::vec2f get_position (const net_point_2d &entity)
 
static void synthesize_dead_entity (const uint64_t id, struct net_point_2d &entity)
 
static bool is_entity_dead (const struct net_point_2d &entity)
 
static void synthesize_drop_entity (struct net_point_2d &entity)
 
static bool is_entity_dropped (const struct net_point_2d &entity)
 
 HADEAN_PACK (struct net_quat{float x, y, z, w;})
 
 HADEAN_PACK (struct net_point_3d{net_position_3d net_encoded_position;net_quat net_encoded_orientation;uint32_t net_encoded_color;uint64_t id;uint32_t owner_id;float size;uint32_t flags=0;})
 
static uint64_t get_entity_id (const net_point_3d &entity)
 
static aether::optional< uint64_t > get_owner_id (const net_point_3d &entity)
 
static aether::vec3f get_position (const net_point_3d &entity)
 
static void synthesize_dead_entity (const uint64_t id, struct net_point_3d &entity)
 
static bool is_entity_dead (const struct net_point_3d &entity)
 
static void synthesize_drop_entity (struct net_point_3d &entity)
 
static bool is_entity_dropped (const struct net_point_3d &entity)
 
 HADEAN_PACK (struct client_stats{uint64_t num_agents;uint64_t num_agents_ghost;})
 
 HADEAN_PACK (struct client_message{net_tree_cell cell;bool cell_dying;client_stats stats;})
 
static net_position_2d net_encode_position_2f (const aether::vec2f &v, const net_tree_cell &cell)
 
static net_position_3d net_encode_position_3f (aether::vec3f v, const net_tree_cell &cell)
 
static aether::vec2f net_decode_position_2f (const net_position_2d &p)
 
static aether::vec3f net_decode_position_3f (const net_position_3d &p)
 
 HADEAN_PACK (struct aether_screen_pos_t{float x;float y;})
 
 HADEAN_PACK (struct aether_mouse_click_t{uint8_t button;uint8_t action;aether_screen_pos_t position;})
 
 HADEAN_PACK (struct aether_cursor_move_t{aether_screen_pos_t position;})
 
 HADEAN_PACK (struct aether_del_agent_t{uint32_t id;})
 
 HADEAN_PACK (struct aether_event_t{aether_event_type_t type;union{aether_mouse_click_t mouse_click;aether_cursor_move_t cursor_move;aether_del_agent_t del_agent;};})
 

Typedef Documentation

using aether::protocol::base::net_position_2d = typedef aether::vec2f
using aether::protocol::base::net_position_3d = typedef aether::vec3f

Enumeration Type Documentation

Enumerator
BUTTON_PRESSED 
BUTTON_RELEASED 
Enumerator
EVENT_CURSOR_MOVE 
EVENT_MOUSE_CLICK 
EVENT_DEL_AGENT 
Enumerator
is_owned 
is_dropped 
is_dead 

Function Documentation

static uint64_t aether::protocol::base::get_entity_id ( const net_point_2d &  entity)
static
static uint64_t aether::protocol::base::get_entity_id ( const net_point_3d &  entity)
static
static aether::optional<uint64_t> aether::protocol::base::get_owner_id ( const net_point_2d &  entity)
static
static aether::optional<uint64_t> aether::protocol::base::get_owner_id ( const net_point_3d &  entity)
static
static aether::vec2f aether::protocol::base::get_position ( const net_point_2d &  entity)
static
static aether::vec3f aether::protocol::base::get_position ( const net_point_3d &  entity)
static
aether::protocol::base::HADEAN_PACK ( struct net_tree_cell{uint64_t code;uint64_t level;machine_id machine_id;uint8_t dimension;net_tree_cell()=default;template< typename MortonCode > net_tree_cell(const aether::morton::tree_cell< MortonCode > &cell):code(cell.code), level(cell.level), dimension(MortonCode::dimension){}}  )
aether::protocol::base::HADEAN_PACK ( struct net_point_2d{net_position_2d net_encoded_position;uint32_t net_encoded_color;uint64_t id;uint32_t owner_id;uint32_t flags=0;}  )
aether::protocol::base::HADEAN_PACK ( struct net_quat{float x, y, z, w;}  )
aether::protocol::base::HADEAN_PACK ( struct net_point_3d{net_position_3d net_encoded_position;net_quat net_encoded_orientation;uint32_t net_encoded_color;uint64_t id;uint32_t owner_id;float size;uint32_t flags=0;}  )
aether::protocol::base::HADEAN_PACK ( struct client_stats{uint64_t num_agents;uint64_t num_agents_ghost;}  )
aether::protocol::base::HADEAN_PACK ( struct client_message{net_tree_cell cell;bool cell_dying;client_stats stats;}  )
aether::protocol::base::HADEAN_PACK ( struct aether_screen_pos_t{float x;float y;}  )
aether::protocol::base::HADEAN_PACK ( struct aether_mouse_click_t{uint8_t button;uint8_t action;aether_screen_pos_t position;}  )
aether::protocol::base::HADEAN_PACK ( struct aether_cursor_move_t{aether_screen_pos_t position;}  )
aether::protocol::base::HADEAN_PACK ( struct aether_del_agent_t{uint32_t id;}  )
aether::protocol::base::HADEAN_PACK ( struct aether_event_t{aether_event_type_t type;union{aether_mouse_click_t mouse_click;aether_cursor_move_t cursor_move;aether_del_agent_t del_agent;};}  )
static bool aether::protocol::base::is_entity_dead ( const struct net_point_2d &  entity)
static
static bool aether::protocol::base::is_entity_dead ( const struct net_point_3d &  entity)
static
static bool aether::protocol::base::is_entity_dropped ( const struct net_point_2d &  entity)
static
static bool aether::protocol::base::is_entity_dropped ( const struct net_point_3d &  entity)
static
static aether::vec2f aether::protocol::base::net_decode_position_2f ( const net_position_2d p)
static
static aether::vec3f aether::protocol::base::net_decode_position_3f ( const net_position_3d p)
static
static net_position_2d aether::protocol::base::net_encode_position_2f ( const aether::vec2f &  v,
const net_tree_cell &  cell 
)
static
static net_position_3d aether::protocol::base::net_encode_position_3f ( aether::vec3f  v,
const net_tree_cell &  cell 
)
static
static void aether::protocol::base::synthesize_dead_entity ( const uint64_t  id,
struct net_point_2d &  entity 
)
static
static void aether::protocol::base::synthesize_dead_entity ( const uint64_t  id,
struct net_point_3d &  entity 
)
static
static void aether::protocol::base::synthesize_drop_entity ( struct net_point_2d &  entity)
static
static void aether::protocol::base::synthesize_drop_entity ( struct net_point_3d &  entity)
static