icedb  version 0.5.1
Snow particle scattering database API
shape.hpp
Go to the documentation of this file.
1 #pragma once
2 //#include <Eigen/Dense>
3 #include <memory>
4 #include <map>
5 #include <string>
6 
7 #include <icedb/shape.hpp>
8 namespace icedb {
9  namespace Examples {
10  namespace Shapes {
11  typedef std::vector<uint64_t> IntData_t;
12  typedef std::vector<uint8_t> Int8Data_t;
13  typedef std::vector<float> FloatData_t;
14  typedef std::vector<std::string> StringData_t;
15 
16  struct ShapeRequiredData {
17  bool NC4_compat = true;
20 
23  std::string particle_id;
25  //void fromShapeObject(const icedb::Shapes::Shape&);
26  };
27 
28  struct ShapeCommonOptionalData {
29  IntData_t particle_scattering_element_number;
30  Int8Data_t particle_constituent_number;
31  FloatData_t particle_scattering_element_radius;
32  StringData_t particle_constituent_name;
33  std::string particle_constituent_single_name;
34 
35  FloatData_t particle_scattering_element_composition_fractional;
36  Int8Data_t particle_scattering_element_composition_whole;
37  float hint_max_scattering_element_dimension = -1;
38  float particle_scattering_element_spacing = -1;
40  //void fromShapeObject(const icedb::Shapes::Shape&);
41  };
42  struct ShapeDataBasic {
43  ShapeRequiredData required;
44  ShapeCommonOptionalData optional;
46  icedb::Shapes::Shape::Shape_Type toShape(const std::string &name, std::shared_ptr<H5::Group>) const;
47  //void fromShape(icedb::Groups::Group::Group_ptr);
48  };
49  }
50  }
51 }
std::vector< uint8_t > Int8Data_t
Definition: shape.hpp:12
uint8_t particle_scattering_element_coordinates_are_integral
Definition: shape.hpp:21
Strucure containing a list of all of the required data needed to create a new shape in the database...
Definition: shape.hpp:12
std::vector< uint64_t > IntData_t
Definition: shape.hpp:11
void apply(icedb::Shapes::NewShapeRequiredProperties &) const
Definition: shapeIOtext.cpp:13
Structure containing a list of all of the common optional data for creating a new shape in the databa...
Definition: shape.hpp:60
std::vector< std::string > StringData_t
Definition: shape.hpp:14
std::unique_ptr< Shape > Shape_Type
The preferred C++ type for referencing a shape.
Definition: shape.hpp:145
std::vector< float > FloatData_t
Definition: shape.hpp:13