SGBinObject Class Reference

A class to manipulate the simgear 3d object format. More...

#include <sg_binobj.hxx>

List of all members.

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)

Detailed Description

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.


Member Function Documentation

bool SGBinObject::read_bin ( const string &  file  ) 

Read a binary file object and populate the provided structures.

Parameters:
file input file name
Returns:
result of read

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.

Parameters:
base name of output path
name name of output file
b bucket for object location
Returns:
result of write

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.

Parameters:
base name of output path
name name of output file
b bucket for object location
Returns:
result of write

Definition at line 626 of file sg_binobj.cxx.


Friends And Related Function Documentation

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.

Parameters:
center center of our bounding radius
wgs84_nodes list of points in wgs84 coordinates
Returns:
radius

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.

Parameters:
wgs84_nodes list of points in wgs84 coordinates
Returns:
center point

Definition at line 121 of file sg_binobj.cxx.


The documentation for this class was generated from the following files:

Generated on 23 Feb 2010 for SimGear by  doxygen 1.6.1