A class to manipulate the simgear 3d object format. More...
#include <sg_binobj.hxx>
Public Member Functions | |
bool | read_bin (const string &file) |
Read a binary file object and populate the provided structures. | |
bool | write_bin (const string &base, const string &name, const SGBucket &b) |
Write out the structures to a binary file. | |
bool | write_ascii (const string &base, const string &name, const SGBucket &b) |
Write out the structures to an ASCII file. | |
Related Functions | |
(Note that these are not member functions.) | |
Point3D | sgCalcCenter (point_list &wgs84_nodes) |
double | sgCalcBoundingRadius (Point3D center, point_list &wgs84_nodes) |
A class to manipulate the simgear 3d object format.
This class provides functionality to both read and write the binary format.
Here is a really quick overview of the file syntax:
Definition at line 90 of file sg_binobj.hxx.
bool SGBinObject::read_bin | ( | const string & | file | ) |
Read a binary file object and populate the provided structures.
file | input file name |
Definition at line 284 of file sg_binobj.cxx.
bool SGBinObject::write_ascii | ( | const string & | base, | |
const string & | name, | |||
const SGBucket & | b | |||
) |
Write out the structures to an ASCII file.
We assume that the groups come to us sorted by material property. If not, things don't break, but the result won't be as optimal.
base | name of output path | |
name | name of output file | |
b | bucket for object location |
Definition at line 1048 of file sg_binobj.cxx.
bool SGBinObject::write_bin | ( | const string & | base, | |
const string & | name, | |||
const SGBucket & | b | |||
) |
Write out the structures to a binary file.
We assume that the groups come to us sorted by material property. If not, things don't break, but the result won't be as optimal.
base | name of output path | |
name | name of output file | |
b | bucket for object location |
Definition at line 626 of file sg_binobj.cxx.
double sgCalcBoundingRadius | ( | Point3D | center, | |
point_list & | wgs84_nodes | |||
) | [related] |
Calculate the bounding sphere of a set of nodes. Center is the center of the tile and zero elevation.
center | center of our bounding radius | |
wgs84_nodes | list of points in wgs84 coordinates |
Definition at line 147 of file sg_binobj.cxx.
Point3D sgCalcCenter | ( | point_list & | wgs84_nodes | ) | [related] |
Calculate the center of a list of points, by taking the halfway point between the min and max points.
wgs84_nodes | list of points in wgs84 coordinates |
Definition at line 121 of file sg_binobj.cxx.