|
HDK
|
#include <GU_IOSTL.h>
Public Member Functions | |
| int | write (const GU_Detail &gdp, const char *name, std::ostream &os, bool binary) |
| bool | read (GU_Detail &gdp, const char *name, UT_IStream &is, bool forcebinary) |
Utility classes to load and save .stl files. Note this is not a standard IO extension itself.
Definition at line 23 of file GU_IOSTL.h.
| bool GU_IOSTLUtil::read | ( | GU_Detail & | gdp, |
| const char * | name, | ||
| UT_IStream & | is, | ||
| bool | forcebinary | ||
| ) |
Read the .stl directly into a gdp. If force binary we only try to read binary, otherwise we first attempt to see if it is ascii. This uses the "solid" prefix. Some binary files start with "solid" to spite us, so attempt to reset the stream & re-read if the ascii fails. THis does not consolidate the points, the caller should likely do so.
| int GU_IOSTLUtil::write | ( | const GU_Detail & | gdp, |
| const char * | name, | ||
| std::ostream & | os, | ||
| bool | binary | ||
| ) |
Write the gdp to the os as a .stl. Note this does NOT apply "strict" shifting of space. This also does not apply conversion or convex(3) NOTE: This writes with the streams current precision, default precision is insufficent so you may need to do: os.precision(SYS_FLT_DIG); Note: This DOES change the stream to ios::scientific. No, I don't know why.