- inline point_list get_wgs84_nodes() const { return wgs84_nodes; }
- inline void set_wgs84_nodes( point_list n ) { wgs84_nodes = n; }
-
- inline point_list get_colors() const { return colors; }
- inline void set_colors( point_list c ) { colors = c; }
-
- inline point_list get_normals() const { return normals; }
- inline void set_normals( point_list n ) { normals = n; }
-
- inline point_list get_texcoords() const { return texcoords; }
- inline void set_texcoords( point_list t ) { texcoords = t; }
-
- inline group_list get_pts_v() const { return pts_v; }
- inline void set_pts_v( group_list g ) { pts_v = g; }
- inline string_list get_pt_materials() const { return pt_materials; }
- inline void set_pt_materials( string_list s ) { pt_materials = s; }
-
- inline group_list get_tris_v() const { return tris_v; }
- inline void set_tris_v( group_list g ) { tris_v = g; }
- inline group_list get_tris_tc() const { return tris_tc; }
- inline void set_tris_tc( group_list g ) { tris_tc = g; }
- inline string_list get_tri_materials() const { return tri_materials; }
- inline void set_tri_materials( string_list s ) { tri_materials = s; }
+ inline const std::vector<SGVec3d>& get_wgs84_nodes() const
+ { return wgs84_nodes; }
+ inline void set_wgs84_nodes( const std::vector<SGVec3d>& n )
+ { wgs84_nodes = n; }
+ inline void set_wgs84_nodes( const point_list& n )
+ {
+ wgs84_nodes.resize(n.size());
+ for (unsigned i = 0; i < wgs84_nodes.size(); ++i)
+ wgs84_nodes[i] = n[i].toSGVec3d();
+ }
+
+ inline const std::vector<SGVec4f>& get_colors() const { return colors; }
+ inline void set_colors( const std::vector<SGVec4f>& c ) { colors = c; }
+ inline void set_colors( const point_list& c )
+ {
+ colors.resize(c.size());
+ for (unsigned i = 0; i < colors.size(); ++i)
+ colors[i] = SGVec4f(c[i].toSGVec3f(), 1);
+ }
+
+ inline const std::vector<SGVec3f>& get_normals() const { return normals; }
+ inline void set_normals( const std::vector<SGVec3f>& n ) { normals = n; }
+ inline void set_normals( const point_list& n )
+ {
+ normals.resize(n.size());
+ for (unsigned i = 0; i < normals.size(); ++i)
+ normals[i] = n[i].toSGVec3f();
+ }
+
+ inline const std::vector<SGVec2f>& get_texcoords() const { return texcoords; }
+ inline void set_texcoords( const std::vector<SGVec2f>& t ) { texcoords = t; }
+ inline void set_texcoords( const point_list& t )
+ {
+ texcoords.resize(t.size());
+ for (unsigned i = 0; i < texcoords.size(); ++i)
+ texcoords[i] = t[i].toSGVec2f();
+ }
+
+ inline const group_list& get_pts_v() const { return pts_v; }
+ inline void set_pts_v( const group_list& g ) { pts_v = g; }
+ inline const group_list& get_pts_n() const { return pts_n; }
+ inline void set_pts_n( const group_list& g ) { pts_n = g; }
+ inline const group_list& get_pts_c() const { return pts_c; }
+ inline void set_pts_c( const group_list& g ) { pts_c = g; }
+ inline const group_list& get_pts_tc() const { return pts_tc; }
+ inline void set_pts_tc( const group_list& g ) { pts_tc = g; }
+ inline const string_list& get_pt_materials() const { return pt_materials; }
+ inline void set_pt_materials( const string_list& s ) { pt_materials = s; }
+
+ inline const group_list& get_tris_v() const { return tris_v; }
+ inline void set_tris_v( const group_list& g ) { tris_v = g; }
+ inline const group_list& get_tris_n() const { return tris_n; }
+ inline void set_tris_n( const group_list& g ) { tris_n = g; }
+ inline const group_list& get_tris_c() const { return tris_c; }
+ inline void set_tris_c( const group_list& g ) { tris_c = g; }
+ inline const group_list& get_tris_tc() const { return tris_tc; }
+ inline void set_tris_tc( const group_list& g ) { tris_tc = g; }
+ inline const string_list& get_tri_materials() const { return tri_materials; }
+ inline void set_tri_materials( const string_list& s ) { tri_materials = s; }