HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_IOSTL.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GU_IOSTL.h ( GA Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GU_IOSTL__
12 #define __GU_IOSTL__
13 
14 class GU_Detail;
15 class UT_IStream;
16 #include <iostream>
17 
18 #include "GU_API.h"
19 #include <UT/UT_StringHolder.h>
20 
21 /// Utility classes to load and save .stl files. Note this is not a
22 /// standard IO extension itself.
24 {
25 public:
26  /// Write the gdp to the os as a .stl.
27  /// Note this does NOT apply "strict" shifting of space.
28  /// This also does not apply conversion or convex(3)
29  /// NOTE: This writes with the streams current precision, default
30  /// precision is insufficent so you may need to do:
31  /// os.precision(SYS_FLT_DIG);
32  /// Note: This DOES change the stream to ios::scientific. No,
33  /// I don't know why.
34  int write(const GU_Detail &gdp, const char *name, std::ostream &os, bool binary);
35 
36  /// Read the .stl directly into a gdp.
37  /// If force binary we only try to read binary, otherwise we first
38  /// attempt to see if it is ascii. This uses the "solid" prefix.
39  /// Some binary files start with "solid" to spite us, so attempt
40  /// to reset the stream & re-read if the ascii fails.
41  /// THis does not consolidate the points, the caller should likely do
42  /// so.
43  bool read(GU_Detail &gdp, const char *name, UT_IStream &is, bool forcebinary);
44 protected:
45 };
46 
47 #endif
48 
const GLuint GLenum const void * binary
Definition: glcorearb.h:1924
#define GU_API
Definition: GU_API.h:14
GLuint const GLchar * name
Definition: glcorearb.h:786