Set class contents from JSON string.
Parses the provided JSON-formatted string and sets the class data. String should be formatted like the string returned from to_json()
3373 if(!parsed[
"external"].is_null()) {
external = parsed[
"external"].
int_value(); }
3378 if(!parsed[
"pidx"].is_null()) {
pidx = parsed[
"pidx"].
int_value(); }
3385 if(!parsed[
"iemi"].is_null()) {
emi = parsed[
"iemi"].
number_value(); }
3386 if(!parsed[
"iabs"].is_null()) {
abs = parsed[
"iabs"].
number_value(); }
3401 cerr<<
"ERROR: <"<<error<<
">"<<endl;
Vector twist
Contribution of triangle to angular forces.
Definition: jsondef.h:3286
Definition: json11.hpp:79
float perimeter
perimeter
Definition: jsondef.h:3311
int i
Definition: rw_test.cpp:37
float mass
mass in Kg
Definition: jsondef.h:3303
float area
Area.
Definition: jsondef.h:3307
Vector shove
Contribution of triangle to linear forces.
Definition: jsondef.h:3284
float pcell
Solar cell coverage.
Definition: jsondef.h:3315
uint8_t external
External facing sides.
Definition: jsondef.h:3278
void from_json(const string &s)
Set class contents from JSON string.
Definition: vector.h:783
float abs
Absorptivity: 0-1.
Definition: jsondef.h:3297
static Json parse(const std::string &in, std::string &err, JsonParse strategy=JsonParse::STANDARD)
static void dump(NullStruct, string &out)
Definition: json11.cpp:53
vector< vector< uint16_t > > triangleindex
Definition: jsondef.h:3328
float ecellbase
Solar cell base efficiency.
Definition: jsondef.h:3317
float emi
Emissivity: 0-1.
Definition: jsondef.h:3295
Vector com
center of mass
Definition: jsondef.h:3280
Vector normal
outward facing normal
Definition: jsondef.h:3282
uint16_t pidx
Index to parent piece.
Definition: jsondef.h:3288
float heat
Energy content in Joules.
Definition: jsondef.h:3291
float irradiation
Insolation in Watts/sq m.
Definition: jsondef.h:3313
float hcap
Heat Capacity in Joules / (Kg Kelvin)
Definition: jsondef.h:3293
float temp
Temperature in Kelvin.
Definition: jsondef.h:3305
int int_value() const
Definition: json11.cpp:281
float ecellslope
Solar cell efficiency with temp.
Definition: jsondef.h:3319
double number_value() const
Definition: json11.cpp:280