Generalizing slice operation. Using templates to specialize data returned.

This commit is contained in:
Patrick Shriwise 2019-03-11 10:14:17 -05:00
parent 6720375e72
commit 1d78df26eb
2 changed files with 117 additions and 66 deletions

View file

@ -53,6 +53,7 @@ struct RGBColor {
typedef xt::xtensor<RGBColor, 2> ImageData;
typedef xt::xtensor<int32_t, 3> IdData;
typedef xt::xtensor<double, 3> PropertyData;
enum class PlotType {
slice = 1,
@ -73,8 +74,17 @@ enum class PlotColorBy {
//===============================================================================
// Plot class
//===============================================================================
struct PlotBase {
class PlotBase {
public:
IdData get_id_map() const;
PropertyData get_property_map() const;
private:
template<class D, typename setter>
D generate_data() const;
// Members
public:
Position origin_; //!< Plot origin in geometry
Position width_; //!< Plot width in geometry
PlotBasis basis_; //!< Plot basis (XY/XZ/YZ)