38 #ifndef MESH_CLIENT_H_ 39 #define MESH_CLIENT_H_ 48 #include <jsoncpp/json/json.h> 59 MeshClient(
const std::string& srv_url,
const std::string& server_username,
const std::string& server_password,
60 const std::string& mesh_layer);
65 void setBoundingBox(
float min_x,
float min_y,
float min_z,
const float max_x,
const float max_y,
const float max_z);
66 void addFilter(std::string channel,
float min_value,
float max_value);
75 std::string
buildJson(
const std::string& attribute_name);
181 size_t writeFunction(
void* ptr,
size_t size,
size_t nmemb, std::string* data)
183 data->append((
char*)ptr, size * nmemb);
189 #endif // MESH_CLIENT_H_ std::string buildJson(const std::string &attribute_name)
Builds a JSON string containing the set bounding box and the attribute name and the attribute group...
std::string server_username_
std::array< float, 6 > bounding_box_
lvr2::FloatChannelOptional getVertices()
Persistence layer interface, Accesses the vertices of the mesh in the persistence layer...
bool addChannel(const std::string group, const std::string name, const lvr2::FloatChannel &channel)
addChannel Writes a float attribute channel from the given group with the given name ...
std::map< std::string, lvr2::FloatChannel > float_channels
UCharChannel::Optional UCharChannelOptional
bool getChannel(const std::string group, const std::string name, lvr2::FloatChannelOptional &channel)
getChannel Reads a float attribute channel in the given group with the given name ...
std::map< std::string, std::pair< float, float > > mesh_filters_
std::map< std::string, lvr2::IndexChannel > index_channels
size_t writeFunction(void *ptr, size_t size, size_t nmemb, std::string *data)
void addFilter(std::string channel, float min_value, float max_value)
void setBoundingBox(float min_x, float min_y, float min_z, const float max_x, const float max_y, const float max_z)
sets the Bounding box for the query which is send to the server
MeshClient(const std::string &srv_url, const std::string &server_username, const std::string &server_password, const std::string &mesh_layer)
Constructs a mesh client which receaves.
FloatChannel::Optional FloatChannelOptional
IndexChannel::Optional IndexChannelOptional
bool addVertices(const lvr2::FloatChannel &channel_ptr)
Persistence layer interface, Writes the vertices of the mesh to the persistence layer.
std::string server_password_
lvr2::IndexChannelOptional getIndices()
Persistence layer interface, Accesses the face indices of the mesh in the persistence layer...
std::unique_ptr< std::string > requestChannel(std::string channel)
bool addIndices(const lvr2::IndexChannel &channel_ptr)
Persistence layer interface, Writes the face indices of the mesh to the persistence layer...
Type
Defines the data type of the transferred channel to decode the byte buffer.
std::map< std::string, lvr2::UCharChannel > uchar_channels