コード例 #1
0
//==== Read Fuse Cross Section File ====//
void FuselageXSec::read(xmlNodePtr node)
{
	num_pnts = xmlFindInt( node, "Num_Pnts", num_pnts );
	location = xmlFindDouble( node, "Spine_Location", location() );
	y_offset =  xmlFindDouble( node, "Y_Offset", y_offset() );
	z_offset =  xmlFindDouble( node, "Z_Offset", z_offset() );

	//==== Profile Stuff ====//
	topTanAng    = xmlFindDouble( node, "Top_Tan_Ang",   topTanAng() );
	topTanStr1   = xmlFindDouble( node, "Top_Tan_Str_1", topTanStr1() );
	topTanStr2   = xmlFindDouble( node, "Top_Tan_Str_2", topTanStr2() );

	botTanAng    = xmlFindDouble( node, "Bot_Tan_Ang",   botTanAng() );
	botTanStr1   = xmlFindDouble( node, "Bot_Tan_Str_1", botTanStr1() );
	botTanStr2   = xmlFindDouble( node, "Bot_Tan_Str_2", botTanStr2() );

	leftTanAng    = xmlFindDouble( node, "Left_Tan_Ang",   leftTanAng() );
	leftTanStr1   = xmlFindDouble( node, "Left_Tan_Str_1", leftTanStr1() );
	leftTanStr2   = xmlFindDouble( node, "Left_Tan_Str_2", leftTanStr2() );

	rightTanAng    = xmlFindDouble( node, "Right_Tan_Ang",   rightTanAng() );
	rightTanStr1   = xmlFindDouble( node, "Right_Tan_Str_1", rightTanStr1() );
	rightTanStr2   = xmlFindDouble( node, "Right_Tan_Str_2", rightTanStr2() );

	numSectInterp1  = xmlFindInt( node, "Num_Sect_Interp_1", numSectInterp1 );
	numSectInterp2  = xmlFindInt( node, "Num_Sect_Interp_2", numSectInterp2 );

	topSymFlag  = xmlFindInt( node, "Top_Sym_Flag", topSymFlag );
	sideSymFlag  = xmlFindInt( node, "Side_Sym_Flag", sideSymFlag );

	read_parms( node );
}
コード例 #2
0
//==== Write Fuse Cross Section File ====//
void FuselageXSec::write(xmlNodePtr root)
{
  xmlAddIntNode( root, "Num_Pnts", num_pnts);
  xmlAddDoubleNode( root, "Spine_Location", location() );
  xmlAddDoubleNode( root, "Y_Offset", y_offset());
  xmlAddDoubleNode( root, "Z_Offset", z_offset());

  //==== Profile Stuff ====//
  xmlAddDoubleNode( root, "Top_Tan_Ang",   topTanAng());
  xmlAddDoubleNode( root, "Top_Tan_Str_1", topTanStr1());
  xmlAddDoubleNode( root, "Top_Tan_Str_2", topTanStr2());

  xmlAddDoubleNode( root, "Bot_Tan_Ang",   botTanAng());
  xmlAddDoubleNode( root, "Bot_Tan_Str_1", botTanStr1());
  xmlAddDoubleNode( root, "Bot_Tan_Str_2", botTanStr2());

  xmlAddDoubleNode( root, "Left_Tan_Ang",   leftTanAng());
  xmlAddDoubleNode( root, "Left_Tan_Str_1", leftTanStr1());
  xmlAddDoubleNode( root, "Left_Tan_Str_2", leftTanStr2());

  xmlAddDoubleNode( root, "Right_Tan_Ang",   rightTanAng());
  xmlAddDoubleNode( root, "Right_Tan_Str_1", rightTanStr1());
  xmlAddDoubleNode( root, "Right_Tan_Str_2", rightTanStr2());

  xmlAddIntNode( root, "Num_Sect_Interp_1", numSectInterp1);
  xmlAddIntNode( root, "Num_Sect_Interp_2", numSectInterp2);

  xmlAddIntNode( root, "Top_Sym_Flag",  topSymFlag);
  xmlAddIntNode( root, "Side_Sym_Flag", sideSymFlag);

  write_parms( root );
}
コード例 #3
0
const Options InPlaceReprojection::getDefaultOptions() const
{
    Options options;
    Option in_srs("in_srs", std::string(""),"Input SRS to use to override -- fetched from previous stage if not present");
    Option out_srs("out_srs", std::string(""), "Output SRS to reproject to");
    Option x("x_dim", std::string("X"), "Dimension name to use for 'X' data");
    Option y("y_dim", std::string("Y"), "Dimension name to use for 'Y' data");
    Option z("z_dim", std::string("Z"), "Dimension name to use for 'Z' data");
    Option x_scale("scale_x", 1.0f, "Scale for output X data in the case when 'X' dimension data are to be scaled.  Defaults to '1.0'.  If not set, the Dimensions's scale will be used");
    Option y_scale("scale_y", 1.0f, "Scale for output Y data in the case when 'Y' dimension data are to be scaled.  Defaults to '1.0'.  If not set, the Dimensions's scale will be used");
    Option z_scale("scale_z", 1.0f, "Scale for output Z data in the case when 'Z' dimension data are to be scaled.  Defaults to '1.0'.  If not set, the Dimensions's scale will be used");
    Option x_offset("offset_x", 0.0f, "Offset for output X data in the case when 'X' dimension data are to be scaled.  Defaults to '0.0'.  If not set, the Dimensions's scale will be used");
    Option y_offset("offset_y", 0.0f, "Offset for output Y data in the case when 'Y' dimension data are to be scaled.  Defaults to '0.0'.  If not set, the Dimensions's scale will be used");
    Option z_offset("offset_z", 0.0f, "Offset for output Z data in the case when 'Z' dimension data are to be scaled.  Defaults to '0.0'.  If not set, the Dimensions's scale will be used");
    Option ignore_old_dimensions("ignore_old_dimensions", true, "Mark old, unprojected dimensions as ignored");
    Option do_offset_z("do_offset_z", false, "Should we re-offset Z data");    
    options.add(in_srs);
    options.add(out_srs);
    options.add(x);
    options.add(y);
    options.add(z);
    options.add(x_scale);
    options.add(y_scale);
    options.add(z_scale);
    options.add(x_offset);
    options.add(y_offset);
    options.add(z_offset);
    options.add(ignore_old_dimensions);
    options.add(do_offset_z);

    return options;
}
コード例 #4
0
//==== Set Point On Span Offset by ZOffset  ====//
void FuselageXSec::set_pnt_on_spine(const vec3d& offset)
{
  pnt_on_spine = offset;
  pnt_on_spine.offset_y(y_offset() );
  pnt_on_spine.offset_z(z_offset() );
}