File indexing completed on 2026-01-07 10:14:29
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include <memory>
0010 #include <nlohmann/json.hpp>
0011
0012 #include "orange/transform/VariantTransform.hh"
0013
0014 #include "CsgTypes.hh"
0015
0016 namespace celeritas
0017 {
0018 namespace orangeinp
0019 {
0020
0021 class ObjectInterface;
0022
0023 template<OperatorToken Op>
0024 class JoinObjects;
0025 class NegatedObject;
0026 class PolyCone;
0027 class PolyPrism;
0028 class RevolvedPolygon;
0029 class ShapeBase;
0030 class SolidBase;
0031 class StackedExtrudedPolygon;
0032 class Transformed;
0033 class Truncated;
0034
0035 class PolySegments;
0036 class EnclosedAzi;
0037 class EnclosedPolar;
0038
0039 class IntersectRegionInterface;
0040 class Box;
0041 class Cone;
0042 class Cylinder;
0043 class Ellipsoid;
0044 class EllipticalCone;
0045 class EllipticalCylinder;
0046 class ExtrudedPolygon;
0047 class GenPrism;
0048 class InfPlane;
0049 class InfAziWedge;
0050 class InfPolarWedge;
0051 class Involute;
0052 class Paraboloid;
0053 class Parallelepiped;
0054 class Prism;
0055 class Sphere;
0056
0057
0058
0059
0060 std::string to_string(ObjectInterface const&);
0061
0062
0063 template<OperatorToken Op>
0064 void to_json(nlohmann::json& j, JoinObjects<Op> const&);
0065 void to_json(nlohmann::json& j, NegatedObject const&);
0066 void to_json(nlohmann::json& j, PolyCone const&);
0067 void to_json(nlohmann::json& j, PolyPrism const&);
0068 void to_json(nlohmann::json& j, RevolvedPolygon const&);
0069 void to_json(nlohmann::json& j, ShapeBase const&);
0070 void to_json(nlohmann::json& j, SolidBase const&);
0071 void to_json(nlohmann::json& j, StackedExtrudedPolygon const&);
0072 void to_json(nlohmann::json& j, Transformed const&);
0073 void to_json(nlohmann::json& j, Truncated const& tr);
0074
0075
0076 void to_json(nlohmann::json& j, PolySegments const&);
0077 void to_json(nlohmann::json& j, EnclosedAzi const&);
0078 void to_json(nlohmann::json& j, EnclosedPolar const&);
0079
0080
0081 void to_json(nlohmann::json& j, IntersectRegionInterface const& cr);
0082 void to_json(nlohmann::json& j, Box const& cr);
0083 void to_json(nlohmann::json& j, Cone const& cr);
0084 void to_json(nlohmann::json& j, Cylinder const& cr);
0085 void to_json(nlohmann::json& j, Ellipsoid const& cr);
0086 void to_json(nlohmann::json& j, EllipticalCone const& cr);
0087 void to_json(nlohmann::json& j, EllipticalCylinder const& cr);
0088 void to_json(nlohmann::json& j, ExtrudedPolygon const& cr);
0089 void to_json(nlohmann::json& j, GenPrism const& cr);
0090 void to_json(nlohmann::json& j, InfPlane const& pa);
0091 void to_json(nlohmann::json& j, InfAziWedge const& cr);
0092 void to_json(nlohmann::json& j, InfPolarWedge const& cr);
0093 void to_json(nlohmann::json& j, Involute const& cr);
0094 void to_json(nlohmann::json& j, Paraboloid const& cr);
0095 void to_json(nlohmann::json& j, Parallelepiped const& cr);
0096 void to_json(nlohmann::json& j, Prism const& cr);
0097 void to_json(nlohmann::json& j, Sphere const& cr);
0098
0099
0100 }
0101 }
0102
0103 namespace nlohmann
0104 {
0105
0106
0107 using CelerSPObjConst
0108 = std::shared_ptr<celeritas::orangeinp::ObjectInterface const>;
0109 using CelerVarTransform = celeritas::VariantTransform;
0110
0111 template<>
0112 struct adl_serializer<CelerSPObjConst>
0113 {
0114 static void to_json(json& j, CelerSPObjConst const& oi);
0115 };
0116
0117 template<>
0118 struct adl_serializer<CelerVarTransform>
0119 {
0120 static void to_json(json& j, CelerVarTransform const& vt);
0121 };
0122
0123
0124 }