From cb3716ffb584fe0f593b6f1669a8efdba1305104 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Tue, 29 Mar 2016 02:16:55 +1000 Subject: Added my version of libg3d and friends. --- .../mimesh/libg3d-0.0.8/doc/api/html/ch01.html | 55 + .../mimesh/libg3d-0.0.8/doc/api/html/ch02.html | 58 + .../mimesh/libg3d-0.0.8/doc/api/html/home.png | Bin 0 -> 654 bytes .../mimesh/libg3d-0.0.8/doc/api/html/index.html | 85 ++ .../mimesh/libg3d-0.0.8/doc/api/html/index.sgml | 242 +++ .../mimesh/libg3d-0.0.8/doc/api/html/left.png | Bin 0 -> 459 bytes .../libg3d-0.0.8/doc/api/html/libg3d-context.html | 531 +++++++ .../libg3d-0.0.8/doc/api/html/libg3d-face.html | 255 ++++ .../libg3d-0.0.8/doc/api/html/libg3d-iff.html | 872 +++++++++++ .../libg3d-0.0.8/doc/api/html/libg3d-material.html | 174 +++ .../libg3d-0.0.8/doc/api/html/libg3d-matrix.html | 450 ++++++ .../libg3d-0.0.8/doc/api/html/libg3d-model.html | 438 ++++++ .../libg3d-0.0.8/doc/api/html/libg3d-object.html | 466 ++++++ .../libg3d-0.0.8/doc/api/html/libg3d-plugins.html | 727 +++++++++ .../doc/api/html/libg3d-primitive.html | 508 +++++++ .../libg3d-0.0.8/doc/api/html/libg3d-quat.html | 346 +++++ .../libg3d-0.0.8/doc/api/html/libg3d-read.html | 373 +++++ .../libg3d-0.0.8/doc/api/html/libg3d-stream.html | 1535 ++++++++++++++++++++ .../libg3d-0.0.8/doc/api/html/libg3d-texture.html | 455 ++++++ .../libg3d-0.0.8/doc/api/html/libg3d-types.html | 109 ++ .../libg3d-0.0.8/doc/api/html/libg3d-vector.html | 266 ++++ .../libg3d-0.0.8/doc/api/html/libg3d.devhelp | 204 +++ .../libg3d-0.0.8/doc/api/html/libg3d.devhelp2 | 204 +++ .../mimesh/libg3d-0.0.8/doc/api/html/right.png | Bin 0 -> 472 bytes .../mimesh/libg3d-0.0.8/doc/api/html/style.css | 160 ++ src/others/mimesh/libg3d-0.0.8/doc/api/html/up.png | Bin 0 -> 406 bytes 26 files changed, 8513 insertions(+) create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/ch01.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/ch02.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/home.png create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/index.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/index.sgml create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/left.png create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-context.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-face.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-iff.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-material.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-matrix.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-model.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-object.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-plugins.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-primitive.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-quat.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-read.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-stream.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-texture.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-types.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-vector.html create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d.devhelp create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d.devhelp2 create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/right.png create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/style.css create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/html/up.png (limited to 'src/others/mimesh/libg3d-0.0.8/doc/api/html') diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/ch01.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/ch01.html new file mode 100644 index 0000000..4df5d39 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/ch01.html @@ -0,0 +1,55 @@ + + + + +Application interface + + + + + + + + + + + + + + + + + + +
+

+Application interface

+
+
+types — Basic types +
+
+context — Libg3d initialization and configuration +
+
+model — Model manipulation functions +
+
+object — Object manipulation +
+
+face — Face manipulation +
+
+material — Material generation and manipulation +
+
+texture — Texture loading and manipulation +
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/ch02.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/ch02.html new file mode 100644 index 0000000..2a8bc7d --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/ch02.html @@ -0,0 +1,58 @@ + + + + +Plugin interface + + + + + + + + + + + + + + + + + + +
+

+Plugin interface

+
+
+plugins — G3DPlugin interface +
+
+stream — I/O abstraction layer for plugins +
+
+iff — IFF file helper functions +
+
+read — file reading abstraction (deprecated) +
+
+primitive — 3D primitive generation functions +
+
+matrix — Matrix manipulation and calculation +
+
+vector — Vector manipulation and calculation +
+
+quat — quaternion helpers +
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/home.png b/src/others/mimesh/libg3d-0.0.8/doc/api/html/home.png new file mode 100644 index 0000000..1700361 Binary files /dev/null and b/src/others/mimesh/libg3d-0.0.8/doc/api/html/home.png differ diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/index.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/index.html new file mode 100644 index 0000000..b368808 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/index.html @@ -0,0 +1,85 @@ + + + + +libg3d Reference Manual + + + + + + + + + +
+
+
+
+

+ for libg3d 0.0.7 + The latest version of this documentation can be found on-line at + http://automagically.de/libg3d/. +

+
+
+
+
+
Application interface
+
+
+types — Basic types +
+
+context — Libg3d initialization and configuration +
+
+model — Model manipulation functions +
+
+object — Object manipulation +
+
+face — Face manipulation +
+
+material — Material generation and manipulation +
+
+texture — Texture loading and manipulation +
+
+
Plugin interface
+
+
+plugins — G3DPlugin interface +
+
+stream — I/O abstraction layer for plugins +
+
+iff — IFF file helper functions +
+
+read — file reading abstraction (deprecated) +
+
+primitive — 3D primitive generation functions +
+
+matrix — Matrix manipulation and calculation +
+
+vector — Vector manipulation and calculation +
+
+quat — quaternion helpers +
+
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/index.sgml b/src/others/mimesh/libg3d-0.0.8/doc/api/html/index.sgml new file mode 100644 index 0000000..a233041 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/index.sgml @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/left.png b/src/others/mimesh/libg3d-0.0.8/doc/api/html/left.png new file mode 100644 index 0000000..2d05b3d Binary files /dev/null and b/src/others/mimesh/libg3d-0.0.8/doc/api/html/left.png differ diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-context.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-context.html new file mode 100644 index 0000000..2a5c229 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-context.html @@ -0,0 +1,531 @@ + + + + +context + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

context

+

context — Libg3d initialization and configuration

+
+ +
+

Description

+

+All state information is saved in the context. It also serves as an +interface to the application.

+

+ +

+
+
+

Details

+
+

G3DContext

+
typedef struct {
+} G3DContext;
+
+

+Internal stuff for libg3d.

+

+ +

+
+
+
+

g3d_context_new ()

+
G3DContext*         g3d_context_new                     (void);
+

+Create a new context. This initializes the library (and also the +plugin system so this has not to be done seperately).

+

+ +

+
++ + + + +

Returns :

a valid context, or NULL on failure. +
+
+
+
+

g3d_context_free ()

+
void                g3d_context_free                    (G3DContext *context);
+

+Cleans up the context and the plugin system and frees all reserved +memory.

+

+ +

+
++ + + + +

context :

the context to free +
+
+
+
+

G3DSetBgColorFunc ()

+
gboolean            (*G3DSetBgColorFunc)                (G3DFloat r,
+                                                         G3DFloat g,
+                                                         G3DFloat b,
+                                                         G3DFloat a,
+                                                         gpointer user_data);
+

+Background color setting callback.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

r :

red component +

g :

green component +

b :

blue component +

a :

alpha component +

user_data :

opaque data as given to g3d_context_set_set_bgcolor_func() +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

G3DUpdateInterfaceFunc ()

+
gboolean            (*G3DUpdateInterfaceFunc)           (gpointer user_data);
+

+Interface updating callback.

+

+ +

+
++ + + + + + + + + + +

user_data :

opaque data as given to g3d_context_set_update_interface_func() +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

G3DUpdateProgressBarFunc ()

+
gboolean            (*G3DUpdateProgressBarFunc)         (G3DFloat percentage,
+                                                         gboolean show,
+                                                         gpointer user_data);
+

+Progress updating callback.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

percentage :

progress of plugin operation +

show :

TRUE if the progress bar should be visible, FALSE else +

user_data :

opaque data as given to +g3d_context_set_update_progress_bar_func() +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

g3d_context_update_interface ()

+
gboolean            g3d_context_update_interface        (G3DContext *context);
+

+Try to update the interface. This will call a function registered with +g3d_context_set_update_interface_func.

+

+ +

+
++ + + + + + + + + + +

context :

a valid context +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_context_set_update_interface_func ()

+
void                g3d_context_set_update_interface_func
+                                                        (G3DContext *context,
+                                                         G3DUpdateInterfaceFunc func,
+                                                         gpointer user_data);
+

+Registers a callback function for updating the interface.

+

+ +

+
++ + + + + + + + + + + + + + +

context :

a valid context +

func :

the callback function +

user_data :

user-defined opaque pointer +
+
+
+
+

g3d_context_update_progress_bar ()

+
gboolean            g3d_context_update_progress_bar     (G3DContext *context,
+                                                         G3DFloat percentage,
+                                                         gboolean visibility);
+

+Try to update the progress bar.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

context :

a valid context +

percentage :

the percentage to set on the progress bar +

visibility :

show or hide the progress bar +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_context_set_update_progress_bar_func ()

+
void                g3d_context_set_update_progress_bar_func
+                                                        (G3DContext *context,
+                                                         G3DUpdateProgressBarFunc func,
+                                                         gpointer user_data);
+

+Registers a callback function for updating the progress bar.

+

+ +

+
++ + + + + + + + + + + + + + +

context :

a valid context +

func :

the callback function +

user_data :

user-defined opaque pointer +
+
+
+
+

g3d_context_set_bgcolor ()

+
gboolean            g3d_context_set_bgcolor             (G3DContext *context,
+                                                         G3DFloat r,
+                                                         G3DFloat g,
+                                                         G3DFloat b,
+                                                         G3DFloat a);
+

+Try to set the background color. This will call a function registered +with g3d_context_set_set_bgcolor_func.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

context :

a valid context +

r :

red component (range: 0.0 .. 1.0) +

g :

green component (range: 0.0 .. 1.0) +

b :

green component (range: 0.0 .. 1.0) +

a :

alpha component +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_context_set_set_bgcolor_func ()

+
void                g3d_context_set_set_bgcolor_func    (G3DContext *context,
+                                                         G3DSetBgColorFunc func,
+                                                         gpointer user_data);
+

+Registers a callback function for setting the background color.

+

+ +

+
++ + + + + + + + + + + + + + +

context :

a valid context +

func :

the callback function +

user_data :

user-defined opaque pointer +
+
+
+
+

See Also

+G3DContext +
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-face.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-face.html new file mode 100644 index 0000000..5ae49f3 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-face.html @@ -0,0 +1,255 @@ + + + + +face + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

face

+

face — Face manipulation

+
+
+

Synopsis

+
+
+#include <g3d/face.h>
+
+#define             G3D_FLAG_MAT_TWOSIDE
+#define             G3D_FLAG_FAC_NORMALS
+#define             G3D_FLAG_FAC_TEXMAP
+                    G3DFace;
+gboolean            g3d_face_get_normal                 (G3DFace *face,
+                                                         G3DObject *object,
+                                                         G3DFloat *nx,
+                                                         G3DFloat *ny,
+                                                         G3DFloat *nz);
+void                g3d_face_free                       (G3DFace *face);
+
+
+
+

Description

+

+A face is plane bordered by at least 3 vertices.

+

+ +

+
+
+

Details

+
+

G3D_FLAG_MAT_TWOSIDE

+
#define G3D_FLAG_MAT_TWOSIDE    (1L << 0)
+
+

+Faces using this material should be rendered two-sided as the direction +is unknown.

+

+ +

+
+
+
+

G3D_FLAG_FAC_NORMALS

+
#define G3D_FLAG_FAC_NORMALS    (1L << 0)
+
+

+The face has custom normals.

+

+ +

+
+
+
+

G3D_FLAG_FAC_TEXMAP

+
#define G3D_FLAG_FAC_TEXMAP     (1L << 1)
+
+

+The face has a texture map and texture coordinates.

+

+ +

+
+
+
+

G3DFace

+
typedef struct {
+	guint32 vertex_count;
+	guint32 *vertex_indices;
+
+	G3DMaterial *material;
+
+	guint32 flags;
+
+	G3DVector *normals;
+
+	G3DImage *tex_image;
+	guint32 tex_vertex_count;
+	G3DVector *tex_vertex_data;
+} G3DFace;
+
+

+An object representing a surface.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

guint32 vertex_count;

number of vertices +

guint32 *vertex_indices;

indices of vertices in G3DObject +

G3DMaterial *material;

material to use for surface +

guint32 flags;

flags +

G3DVector *normals;

optional normal array (one vector - 3 G3DVector values - for each + vertex) +

G3DImage *tex_image;

optional texture image +

guint32 tex_vertex_count;

number of texture vertices, should be 0 or match + vertex_count +

G3DVector *tex_vertex_data;

array of texture vertices +
+
+
+
+

g3d_face_get_normal ()

+
gboolean            g3d_face_get_normal                 (G3DFace *face,
+                                                         G3DObject *object,
+                                                         G3DFloat *nx,
+                                                         G3DFloat *ny,
+                                                         G3DFloat *nz);
+

+calculates the normal of a face.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

face :

face to calculate normal of +

object :

object containing vertices of face +

nx :

x component of resulting normal +

ny :

y component of resulting normal +

nz :

z component of resulting normal +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_face_free ()

+
void                g3d_face_free                       (G3DFace *face);
+

+Frees all memory allocated for this face.

+

+ +

+
++ + + + +

face :

the face to free +
+
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-iff.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-iff.html new file mode 100644 index 0000000..69e560e --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-iff.html @@ -0,0 +1,872 @@ + + + + +iff + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

iff

+

iff — IFF file helper functions

+
+
+

Synopsis

+
+
+#include <g3d/iff.h>
+
+#define             G3D_IFF_PAD1
+#define             G3D_IFF_PAD2
+#define             G3D_IFF_PAD4
+#define             G3D_IFF_PAD8
+#define             G3D_IFF_LE
+#define             G3D_IFF_LEN16
+#define             G3D_IFF_SUBCHUNK_LEN16
+#define             G3D_IFF_MKID                        (a,b,c,d)
+gboolean            g3d_iff_check                       (G3DStream *stream,
+                                                         guint32 *id,
+                                                         gsize *len);
+gsize               g3d_iff_read_chunk                  (G3DStream *stream,
+                                                         guint32 *id,
+                                                         gsize *len,
+                                                         guint32 flags);
+gpointer            g3d_iff_handle_chunk                (G3DIffGlobal *global,
+                                                         G3DIffLocal *plocal,
+                                                         G3DIffChunkInfo *chunks,
+                                                         guint32 flags);
+gboolean            g3d_iff_chunk_matches               (guint32 id,
+                                                         gchar *tid);
+gboolean            g3d_iff_read_ctnr                   (G3DIffGlobal *global,
+                                                         G3DIffLocal *local,
+                                                         G3DIffChunkInfo *chunks,
+                                                         guint32 flags);
+gchar*              g3d_iff_id_to_text                  (guint32 id);
+FILE*               g3d_iff_open                        (const gchar *filename,
+                                                         guint32 *id,
+                                                         guint32 *len);
+int                 g3d_iff_readchunk                   (FILE *f,
+                                                         guint32 *id,
+                                                         guint32 *len,
+                                                         guint32 flags);
+gboolean            (*G3DIffChunkCallback)              (G3DIffGlobal *global,
+                                                         G3DIffLocal *local);
+#define             g3d_iff_chunk_callback
+                    G3DIffChunkInfo;
+#define             g3d_iff_chunk_info
+                    G3DIffGlobal;
+#define             g3d_iff_gdata
+                    G3DIffLocal;
+#define             g3d_iff_ldata
+
+
+
+

Description

+

+These are helper functions to read data from the Interchange File Format +(IFF).

+

+ +

+
+
+

Details

+
+

G3D_IFF_PAD1

+
#define G3D_IFF_PAD1   0x01
+
+

+No padding is done after chunks.

+

+ +

+
+
+
+

G3D_IFF_PAD2

+
#define G3D_IFF_PAD2   0x02
+
+

+Chunks are 2-byte aligned

+

+ +

+
+
+
+

G3D_IFF_PAD4

+
#define G3D_IFF_PAD4   0x04
+
+

+Chunks are 4-byte aligned

+

+ +

+
+
+
+

G3D_IFF_PAD8

+
#define G3D_IFF_PAD8   0x08
+
+

+Chunks are 8-byte aligned

+

+ +

+
+
+
+

G3D_IFF_LE

+
#define G3D_IFF_LE               0x40 /* little endian */
+
+

+The file has little-endian data.

+

+ +

+
+
+
+

G3D_IFF_LEN16

+
#define G3D_IFF_LEN16            0x20
+
+

+All chunks have 16-bit sizes.

+

+ +

+
+
+
+

G3D_IFF_SUBCHUNK_LEN16

+
#define G3D_IFF_SUBCHUNK_LEN16   0x10
+
+

+All chunks except the toplevel ones have 16-bit sizes.

+

+ +

+
+
+
+

G3D_IFF_MKID()

+
#define             G3D_IFF_MKID(a,b,c,d)
+

+Generate an IFF chunk identifier from character representation, e.g. +G3D_IFF_MKID('F','O','R','M').

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

a :

first byte +

b :

second byte +

c :

third byte +

d :

fourth byte +
+
+
+
+

g3d_iff_check ()

+
gboolean            g3d_iff_check                       (G3DStream *stream,
+                                                         guint32 *id,
+                                                         gsize *len);
+

+Checks a stream for a valid IFF signature and reads the top level container.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

stream :

stream containing IFF file to check +

id :

top level ID (out) +

len :

length of top level container (out) +

Returns :

TRUE on success (valid IFF), FALSE else +
+
+
+
+

g3d_iff_read_chunk ()

+
gsize               g3d_iff_read_chunk                  (G3DStream *stream,
+                                                         guint32 *id,
+                                                         gsize *len,
+                                                         guint32 flags);
+

+Reads one chunk header from an IFF file.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

stream :

stream to read from +

id :

ID of chunk (out) +

len :

length of chunk (excluding header) (out) +

flags :

flags +

Returns :

real length of chunk including header and possible padding byte +
+
+
+
+

g3d_iff_handle_chunk ()

+
gpointer            g3d_iff_handle_chunk                (G3DIffGlobal *global,
+                                                         G3DIffLocal *plocal,
+                                                         G3DIffChunkInfo *chunks,
+                                                         guint32 flags);
+

+Handle an IFF chunk based on chunk description.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

global :

global data +

plocal :

local data of parent chunk, must not be NULL +

chunks :

chunk description list +

flags :

IFF flags +

Returns :

level object for siblings, may be NULL. +
+
+
+
+

g3d_iff_chunk_matches ()

+
gboolean            g3d_iff_chunk_matches               (guint32 id,
+                                                         gchar *tid);
+

+Check whether id and tid match.

+

+ +

+
++ + + + + + + + + + + + + + +

id :

IFF identifier +

tid :

textual representation of identifier +

Returns :

TRUE on match, FALSE else. +
+
+
+
+

g3d_iff_read_ctnr ()

+
gboolean            g3d_iff_read_ctnr                   (G3DIffGlobal *global,
+                                                         G3DIffLocal *local,
+                                                         G3DIffChunkInfo *chunks,
+                                                         guint32 flags);
+

+Read subchunks in current chunk and handle them appropriately.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

global :

global data +

local :

local data of current chunk, must not be NULL +

chunks :

chunk description list +

flags :

IFF flags +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

g3d_iff_id_to_text ()

+
gchar*              g3d_iff_id_to_text                  (guint32 id);
+

+Get the text representation of an IFF chunk identifier.

+

+ +

+
++ + + + + + + + + + +

id :

an IFF identifier +

Returns :

a newly allocated string containing the text identifier. +
+
+
+
+

g3d_iff_open ()

+
FILE*               g3d_iff_open                        (const gchar *filename,
+                                                         guint32 *id,
+                                                         guint32 *len);
+

+Opens an IFF file, checks it and reads its top level container.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

filename :

file name of IFF file +

id :

top level ID (out) +

len :

length of top level container (out) +

Returns :

the file pointer of open file or NULL in case of an error +
+
+
+
+

g3d_iff_readchunk ()

+
int                 g3d_iff_readchunk                   (FILE *f,
+                                                         guint32 *id,
+                                                         guint32 *len,
+                                                         guint32 flags);
+

+Reads one chunk header from an IFF file.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

f :

the open IFF file pointer +

id :

ID of chunk (out) +

len :

length of chunk (excluding header) (out) +

flags :

flags +

Returns :

real length of chunk including header and possible padding byte +
+
+
+
+

G3DIffChunkCallback ()

+
gboolean            (*G3DIffChunkCallback)              (G3DIffGlobal *global,
+                                                         G3DIffLocal *local);
+

+IFF callback function prototype.

+

+ +

+
++ + + + + + + + + + + + + + +

global :

the global data +

local :

the local data +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

g3d_iff_chunk_callback

+
#define g3d_iff_chunk_callback G3DIffChunkCallback
+
+

+IFF chunk callback (deprecated).

+

+ +

+
+
+
+

G3DIffChunkInfo

+
typedef struct {
+	gchar *id;
+	gchar *description;
+	gboolean container;
+	G3DIffChunkCallback callback;
+} G3DIffChunkInfo;
+
+

+A chunk type description.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

gchar *id;

identifier of chunk +

gchar *description;

human-readable description of chunk type +

gboolean container;

TRUE if this chunk contains sub-chunks +

G3DIffChunkCallback callback;

function to be called if such a chunk is found +
+
+
+
+

g3d_iff_chunk_info

+
#define g3d_iff_chunk_info G3DIffChunkInfo
+
+

+IFF chunk description (deprecated).

+

+ +

+
+
+
+

G3DIffGlobal

+
typedef struct {
+	G3DContext *context;
+	G3DModel *model;
+	G3DStream *stream;
+	guint32 flags;
+	gpointer user_data;
+	FILE *f;
+	long int max_fpos;
+} G3DIffGlobal;
+
+

+The plugin-global data to be given to IFF callback functions.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

G3DContext *context;

a valid context +

G3DModel *model;

a model +

G3DStream *stream;

the stream to read model from +

guint32 flags;

IFF flags +

gpointer user_data;

to be used by plugin +

FILE *f;

file to read model from (DEPRECATED) +

long int max_fpos;

maximum file position (DEPRECATED) +
+
+
+
+

g3d_iff_gdata

+
#define g3d_iff_gdata G3DIffGlobal
+
+

+IFF global data (deprecated).

+

+ +

+
+
+
+

G3DIffLocal

+
typedef struct {
+	guint32 id;
+	guint32 parent_id;
+	gpointer object;
+	gint32 level;
+	gpointer level_object;
+	gint32 nb;
+	gboolean finalize;
+} G3DIffLocal;
+
+

+The function-local data for IFF callback functions.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

guint32 id;

chunk identifier +

guint32 parent_id;

parent chunk identifier +

gpointer object;

an object set by parent callbacks, may be NULL +

gint32 level;

level of chunk +

gpointer level_object;

object shared by callbacks on the same level, may be NULL +

gint32 nb;

number of bytes remaining in chunk, has to be decremented after +correctly after reading from stream +

gboolean finalize;

for container chunks the callback function is called before +and after processing possible sub-chunks, the second time finalize is set +to TRUE +
+
+
+
+

g3d_iff_ldata

+
#define g3d_iff_ldata G3DIffLocal
+
+

+IFF local data (deprecated).

+

+ +

+
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-material.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-material.html new file mode 100644 index 0000000..e4afa07 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-material.html @@ -0,0 +1,174 @@ + + + + +material + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

material

+

material — Material generation and manipulation

+
+
+

Synopsis

+
+
+#include <g3d/material.h>
+
+                    G3DMaterial;
+G3DMaterial*        g3d_material_new                    (void);
+void                g3d_material_free                   (G3DMaterial *material);
+
+
+
+

Description

+

+A material contains all color, shading and texture information for a +G3DFace.

+

+ +

+
+
+

Details

+
+

G3DMaterial

+
typedef struct {
+	gchar *name;
+	G3DFloat r, g, b, a;
+	G3DFloat shininess;
+	G3DFloat specular[4];
+	guint32 flags;
+
+	G3DImage *tex_image;
+} G3DMaterial;
+
+

+A material object.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

gchar *name;

name of material +

G3DFloat r;

red component of color +

G3DFloat g;

green component of color +

G3DFloat b;

blue component of color +

G3DFloat a;

alpha component of color +

G3DFloat shininess;

shiny color +

G3DFloat specular[4];

specular color +

guint32 flags;

flags +

G3DImage *tex_image;

texture image (optional, may be NULL) +
+
+
+
+

g3d_material_new ()

+
G3DMaterial*        g3d_material_new                    (void);
+

+Generates a new material with a default color.

+

+ +

+
++ + + + +

Returns :

the new material or NULL on error +
+
+
+
+

g3d_material_free ()

+
void                g3d_material_free                   (G3DMaterial *material);
+

+Frees all memory allocated for that material.

+

+ +

+
++ + + + +

material :

the material to free +
+
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-matrix.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-matrix.html new file mode 100644 index 0000000..2ffe686 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-matrix.html @@ -0,0 +1,450 @@ + + + + +matrix + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

matrix

+

matrix — Matrix manipulation and calculation

+
+ +
+

Description

+

+Matrices in libg3d have the following layout: +

+

+G3DMatrix matrix[16]: +

+

+matrix[col * 4 + row] = f;

+

+ +

+
+
+

Details

+
+

G3DMatrix

+
typedef G3DFloat G3DMatrix;
+
+

+Matrix element type.

+

+ +

+
+
+
+

g3d_matrix_identity ()

+
gboolean            g3d_matrix_identity                 (G3DMatrix *matrix);
+

+Sets the given matrix to the identity matrix.

+

+ +

+
++ + + + + + + + + + +

matrix :

4x4 matrix (float[16]) +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_matrix_multiply ()

+
gboolean            g3d_matrix_multiply                 (G3DMatrix *m1,
+                                                         G3DMatrix *m2,
+                                                         G3DMatrix *rm);
+

+Multiplies the matrixes.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

m1 :

first matrix +

m2 :

second matrix +

rm :

resulting matrix +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_matrix_translate ()

+
gboolean            g3d_matrix_translate                (G3DFloat x,
+                                                         G3DFloat y,
+                                                         G3DFloat z,
+                                                         G3DMatrix *rm);
+

+Adds a translation to the the matrix.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

x :

x translation +

y :

y translation +

z :

z translation +

rm :

resulting matrix +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_matrix_rotate ()

+
gboolean            g3d_matrix_rotate                   (G3DFloat angle,
+                                                         G3DFloat ax,
+                                                         G3DFloat ay,
+                                                         G3DFloat az,
+                                                         G3DMatrix *rm);
+

+Adds a rotation to the matrix.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

angle :

rotation angle +

ax :

x component of rotation axis +

ay :

y component of rotation axis +

az :

z component of rotation axis +

rm :

resulting matrix +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_matrix_rotate_xyz ()

+
gboolean            g3d_matrix_rotate_xyz               (G3DFloat rx,
+                                                         G3DFloat ry,
+                                                         G3DFloat rz,
+                                                         G3DMatrix *rm);
+

+Adds a rotation around the 3 coordinate system axes to the matrix.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

rx :

rotation around x axis +

ry :

rotation around y axis +

rz :

rotation around z axis +

rm :

resulting matrix +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_matrix_scale ()

+
gboolean            g3d_matrix_scale                    (G3DFloat x,
+                                                         G3DFloat y,
+                                                         G3DFloat z,
+                                                         G3DMatrix *rm);
+

+Adds a scaling to the matrix.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

x :

x factor +

y :

y factor +

z :

z factor +

rm :

resulting matrix +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_matrix_transpose ()

+
gboolean            g3d_matrix_transpose                (G3DMatrix *matrix);
+

+Transposes the matrix.

+

+ +

+
++ + + + + + + + + + +

matrix :

the matrix +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_matrix_determinant ()

+
G3DFloat            g3d_matrix_determinant              (G3DMatrix *matrix);
+

+Calculate the determinant of the matrix (FIXME: not verified).

+

+ +

+
++ + + + + + + + + + +

matrix :

the matrix +

Returns :

the determinant. +
+
+
+
+

g3d_matrix_dump ()

+
gboolean            g3d_matrix_dump                     (G3DMatrix *matrix);
+

+If debugging is enabled, this function dump the matrix to stderr.

+

+ +

+
++ + + + + + + + + + +

matrix :

the matrix +

Returns :

TRUE if matrix is dumped, FALSE else +
+
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-model.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-model.html new file mode 100644 index 0000000..3c28b34 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-model.html @@ -0,0 +1,438 @@ + + + + +model + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

model

+

model — Model manipulation functions

+
+
+

Synopsis

+
+
+#include <g3d/g3d.h>
+
+#define             G3D_MODEL_CENTER
+#define             G3D_MODEL_NOCHECK
+#define             G3D_MODEL_OPTIMIZE
+#define             G3D_MODEL_SCALE
+                    G3DModel;
+G3DModel*           g3d_model_new                       (void);
+G3DModel*           g3d_model_load                      (G3DContext *context,
+                                                         const gchar *filename);
+G3DModel*           g3d_model_load_full                 (G3DContext *context,
+                                                         const gchar *filename,
+                                                         guint32 flags);
+gboolean            g3d_model_check                     (G3DModel *model);
+gboolean            g3d_model_center                    (G3DModel *model);
+gboolean            g3d_model_transform                 (G3DModel *model,
+                                                         G3DMatrix *matrix);
+void                g3d_model_clear                     (G3DModel *model);
+void                g3d_model_free                      (G3DModel *model);
+G3DObject*          g3d_model_get_object_by_name        (G3DModel *model,
+                                                         const gchar *name);
+
+
+
+

Description

+

+A model is a group of objects. All information loaded from a file by libg3d +is found in this model.

+

+ +

+
+
+

Details

+
+

G3D_MODEL_CENTER

+
#define G3D_MODEL_CENTER          (1 << 1)
+
+

+The model should be centered around the (0,0,0).

+

+ +

+
+
+
+

G3D_MODEL_NOCHECK

+
#define G3D_MODEL_NOCHECK         (1 << 3)
+
+

+The common checks should be disabled. The checks include: +

+
    +
  • faces have at least 3 indices
  • +
  • face indices are <= number of vertices
  • +
  • material of faces is not NULL
  • +
+

+ +

+
+
+
+

G3D_MODEL_OPTIMIZE

+
#define G3D_MODEL_OPTIMIZE        (1 << 2)
+
+

+The model material/object/face lists should be serialized to some private +arrays (deprecated).

+

+ +

+
+
+
+

G3D_MODEL_SCALE

+
#define G3D_MODEL_SCALE           (1 << 0)
+
+

+The model should be scaled to a maximum extension of +/- 10.0.

+

+ +

+
+
+
+

G3DModel

+
typedef struct {
+	gchar *filename;
+	GSList *materials;
+	GSList *objects;
+} G3DModel;
+
+

+A 3D model.

+

+ +

+
++ + + + + + + + + + + + + + +

gchar *filename;

file name or URI of loaded model, may be set by application +

GSList *materials;

list of materials (G3DMaterial) +

GSList *objects;

list of objects (G3DObject) +
+
+
+
+

g3d_model_new ()

+
G3DModel*           g3d_model_new                       (void);
+

+This functions allocates and initializes a new G3DModel.

+

+ +

+
++ + + + +

Returns :

a newly allocated G3DModel +
+
+
+
+

g3d_model_load ()

+
G3DModel*           g3d_model_load                      (G3DContext *context,
+                                                         const gchar *filename);
+

+Loads a model from a file. The model is checked, centered, resized, +optimized.

+

+ +

+
++ + + + + + + + + + + + + + +

context :

a valid context +

filename :

the file name of the model to load +

Returns :

the loaded model or NULL in case of an error +
+
+
+
+

g3d_model_load_full ()

+
G3DModel*           g3d_model_load_full                 (G3DContext *context,
+                                                         const gchar *filename,
+                                                         guint32 flags);
+

+Loads a model from a file. Depending on flags the model is checked, +centered, resized, optimized.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

context :

a valid context +

filename :

the file name of the model to load +

flags :

object manipulation flags +

Returns :

the loaded model or NULL in case of an error. +
+
+
+
+

g3d_model_check ()

+
gboolean            g3d_model_check                     (G3DModel *model);
+

+Checks whether a model returned by plugin is valid.

+

+ +

+
++ + + + + + + + + + +

model :

the model to check +

Returns :

TRUE on success, FALSE on error +
+
+
+
+

g3d_model_center ()

+
gboolean            g3d_model_center                    (G3DModel *model);
+

+Translates all object coordinates that the object center is at (0, 0, 0)

+

+ +

+
++ + + + + + + + + + +

model :

the model to center +

Returns :

TRUE on success, FALSE on error +
+
+
+
+

g3d_model_transform ()

+
gboolean            g3d_model_transform                 (G3DModel *model,
+                                                         G3DMatrix *matrix);
+

+Transform all toplevel objects in model with matrix.

+

+ +

+
++ + + + + + + + + + + + + + +

model :

the model +

matrix :

transformation matrix +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_model_clear ()

+
void                g3d_model_clear                     (G3DModel *model);
+

+Removes all objects from a model.

+

+ +

+
++ + + + +

model :

the model to clear +
+
+
+
+

g3d_model_free ()

+
void                g3d_model_free                      (G3DModel *model);
+

+Frees all memory allocated for the model including all objects, materials +and textures.

+

+ +

+
++ + + + +

model :

the model to free +
+
+
+
+

g3d_model_get_object_by_name ()

+
G3DObject*          g3d_model_get_object_by_name        (G3DModel *model,
+                                                         const gchar *name);
+

+Searches the object tree for an object with the given name.

+

+ +

+
++ + + + + + + + + + + + + + +

model :

the model containing all objects +

name :

the name of the requested object +

Returns :

the requested object or NULL if non was found +
+
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-object.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-object.html new file mode 100644 index 0000000..c06bc24 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-object.html @@ -0,0 +1,466 @@ + + + + +object + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

object

+

object — Object manipulation

+
+ +
+

Description

+

+Objects are parts of a model. In most file formats vertices and faces are +grouped in some way into objects. Objects can be hierarchical, so what a +model contains is basically an object tree.

+

+ +

+
+
+

Details

+
+

G3DObject

+
typedef struct {
+	gchar *name;
+
+	GSList *materials;
+	GSList *faces;
+	GSList *objects;
+
+	/* transformation, may be NULL */
+	G3DTransformation *transformation;
+
+	/* don't render this object */
+	gboolean hide;
+
+	/* vertices */
+	guint32 vertex_count;
+	G3DVector *vertex_data;
+} G3DObject;
+
+

+A three-dimensional object.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

gchar *name;

name of object +

GSList *materials;

list of materials +

GSList *faces;

list of faces +

GSList *objects;

list of sub-objects +

G3DTransformation *transformation;

optional transformation +

gboolean hide;

flag to disable object rendering +

guint32 vertex_count;

number of vertices +

G3DVector *vertex_data;

vertex vector data +
+
+
+
+

G3DTransformation

+
typedef struct {
+	G3DMatrix matrix[16];
+	guint32 flags;
+} G3DTransformation;
+
+

+A three-dimensional matrix transformation object.

+

+ +

+
++ + + + + + + + + + +

G3DMatrix matrix[16];

the transformation matrix +

guint32 flags;

flags +
+
+
+
+

g3d_object_free ()

+
void                g3d_object_free                     (G3DObject *object);
+

+Frees all memory allocated for that object.

+

+ +

+
++ + + + +

object :

the object to free +
+
+
+
+

g3d_object_radius ()

+
gdouble             g3d_object_radius                   (G3DObject *object);
+

+Calculates the radius of the object. This is the maximum from the +center to a vertex.

+

+ +

+
++ + + + + + + + + + +

object :

the object to measure +

Returns :

the radius of the given object +
+
+
+
+

g3d_object_scale ()

+
gboolean            g3d_object_scale                    (G3DObject *object,
+                                                         G3DFloat scale);
+

+Resizes the object by the factor scale.

+

+ +

+
++ + + + + + + + + + + + + + +

object :

the object to scale +

scale :

scale factor +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_object_transform ()

+
gboolean            g3d_object_transform                (G3DObject *object,
+                                                         G3DMatrix *matrix);
+

+Multiplies all vertices of the object with the transformation matrix.

+

+ +

+
++ + + + + + + + + + + + + + +

object :

the object to transform +

matrix :

the transformation matrix +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_object_transform_normals ()

+
gboolean            g3d_object_transform_normals        (G3DObject *object,
+                                                         G3DMatrix *matrix);
+

+Multiplies all normals of the object with the transformation matrix.

+

+ +

+
++ + + + + + + + + + + + + + +

object :

the object to transform +

matrix :

the transformation matrix +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_object_duplicate ()

+
G3DObject*          g3d_object_duplicate                (G3DObject *object);
+

+Duplicates an object with all vertices, faces and materials.

+

+ +

+
++ + + + + + + + + + +

object :

the object to duplicate +

Returns :

the new clone object +
+
+
+
+

g3d_object_optimize ()

+
gboolean            g3d_object_optimize                 (G3DObject *object);
+

+Puts all vertex and face information into special arrays for faster +rendering. It is deprecated and should not be used.

+

+ +

+
++ + + + + + + + + + +

object :

the object to optimize +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_object_smooth ()

+
gboolean            g3d_object_smooth                   (G3DObject *object);
+

+FIXME: unimplemented.

+

+ +

+
++ + + + + + + + + + +

object :

the object to smooth +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_object_merge ()

+
gboolean            g3d_object_merge                    (G3DObject *o1,
+                                                         G3DObject *o2);
+

+Merges both objects into o1. +FIXME: needs cleanup

+

+ +

+
++ + + + + + + + + + + + + + +

o1 :

first and target object +

o2 :

second object +

Returns :

TRUE on success, FALSE else +
+
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-plugins.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-plugins.html new file mode 100644 index 0000000..d7efa02 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-plugins.html @@ -0,0 +1,727 @@ + + + + +plugins + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

plugins

+

plugins — G3DPlugin interface

+
+
+

Synopsis

+
+
+#include <g3d/plugins.h>
+
+enum                G3DPluginType;
+gpointer            (*G3DPluginInitFunc)                (G3DContext *context);
+void                (*G3DPluginCleanupFunc)             (gpointer user_data);
+gboolean            (*G3DPluginLoadModelFunc)           (G3DContext *context,
+                                                         const gchar *filename,
+                                                         G3DModel *model,
+                                                         gpointer user_data);
+gboolean            (*G3DPluginLoadModelFromStreamFunc) (G3DContext *context,
+                                                         G3DStream *stream,
+                                                         G3DModel *model,
+                                                         gpointer user_data);
+gboolean            (*G3DPluginLoadImageFunc)           (G3DContext *context,
+                                                         const gchar *filename,
+                                                         G3DImage *image,
+                                                         gpointer user_data);
+gboolean            (*G3DPluginLoadImageStreamFunc)     (G3DContext *context,
+                                                         G3DStream *stream,
+                                                         G3DImage *image,
+                                                         gpointer user_data);
+gchar*              (*G3DPluginGetDescFunc)             (G3DContext *context);
+gchar**             (*G3DPluginGetExtFunc)              (G3DContext *context);
+                    G3DPlugin;
+gboolean            g3d_plugins_init                    (G3DContext *context);
+void                g3d_plugins_cleanup                 (G3DContext *context);
+gboolean            g3d_plugins_load_model              (G3DContext *context,
+                                                         const gchar *filename,
+                                                         G3DModel *model);
+gboolean            g3d_plugins_load_model_from_stream  (G3DContext *context,
+                                                         G3DStream *stream,
+                                                         G3DModel *model);
+gboolean            g3d_plugins_load_image              (G3DContext *context,
+                                                         const gchar *filename,
+                                                         G3DImage *image);
+gboolean            g3d_plugins_load_image_from_stream  (G3DContext *context,
+                                                         G3DStream *stream,
+                                                         G3DImage *image);
+gchar**             g3d_plugins_get_image_extensions    (G3DContext *context);
+
+
+
+

Description

+

+Direct interaction with the plugin system is normally not needed when using +libg3d. It may be required when writing a plugin which should load a +G3DImage or a G3DModel with another plugin.

+

+ +

+
+
+

Details

+
+

enum G3DPluginType

+
typedef enum {
+	G3D_PLUGIN_UNKNOWN = 0x00,
+	G3D_PLUGIN_IMPORT,
+	G3D_PLUGIN_IMAGE
+} G3DPluginType;
+
+

+Type of plugin.

+

+ +

+
++ + + + + + + + + + + + + + +

G3D_PLUGIN_UNKNOWN

unknown plugin type +

G3D_PLUGIN_IMPORT

model import plugin +

G3D_PLUGIN_IMAGE

image loading plugin +
+
+
+
+

G3DPluginInitFunc ()

+
gpointer            (*G3DPluginInitFunc)                (G3DContext *context);
+

+Prototype for plugin_init().

+

+ +

+
++ + + + + + + + + + +

context :

the context +

Returns :

opaque plugin data. +
+
+
+
+

G3DPluginCleanupFunc ()

+
void                (*G3DPluginCleanupFunc)             (gpointer user_data);
+

+Prototype for plugin_cleanup().

+

+ +

+
++ + + + +

user_data :

opaque plugin data +
+
+
+
+

G3DPluginLoadModelFunc ()

+
gboolean            (*G3DPluginLoadModelFunc)           (G3DContext *context,
+                                                         const gchar *filename,
+                                                         G3DModel *model,
+                                                         gpointer user_data);
+

+Prototype for plugin_load_model().

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

context :

the context +

filename :

file name of model +

model :

the model structure to fill +

user_data :

opaque plugin data +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

G3DPluginLoadModelFromStreamFunc ()

+
gboolean            (*G3DPluginLoadModelFromStreamFunc) (G3DContext *context,
+                                                         G3DStream *stream,
+                                                         G3DModel *model,
+                                                         gpointer user_data);
+

+Prototype for plugin_load_model_from_stream().

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

context :

the context +

stream :

the stream to load from +

model :

the model structure to fill +

user_data :

opaque plugin data +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

G3DPluginLoadImageFunc ()

+
gboolean            (*G3DPluginLoadImageFunc)           (G3DContext *context,
+                                                         const gchar *filename,
+                                                         G3DImage *image,
+                                                         gpointer user_data);
+

+Prototype for plugin_load_image().

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

context :

the context +

filename :

file name of image +

image :

image structure to fill +

user_data :

opaque plugin data +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

G3DPluginLoadImageStreamFunc ()

+
gboolean            (*G3DPluginLoadImageStreamFunc)     (G3DContext *context,
+                                                         G3DStream *stream,
+                                                         G3DImage *image,
+                                                         gpointer user_data);
+

+Prototype for plugin_load_image_from_stream().

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

context :

the context +

stream :

the stream to load from +

image :

image structure to fill +

user_data :

opaque plugin data +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

G3DPluginGetDescFunc ()

+
gchar*              (*G3DPluginGetDescFunc)             (G3DContext *context);
+

+Prototype for plugin_description().

+

+ +

+
++ + + + + + + + + + +

context :

the context +

Returns :

a newly-allocated string containing the description of the plugin. +
+
+
+
+

G3DPluginGetExtFunc ()

+
gchar**             (*G3DPluginGetExtFunc)              (G3DContext *context);
+

+Prototype for plugin_extensions().

+

+ +

+
++ + + + + + + + + + +

context :

the context +

Returns :

NULL-terminated list of file extensions supported by this plugin. +Free with g_strfreev(). +
+
+
+
+

G3DPlugin

+
typedef struct {
+} G3DPlugin;
+
+

+A libg3d plugin.

+

+ +

+
+
+
+

g3d_plugins_init ()

+
gboolean            g3d_plugins_init                    (G3DContext *context);
+

+Initializes the plugin system. This is implicitly done when using +g3d_context_new().

+

+ +

+
++ + + + + + + + + + +

context :

a valid G3DContext +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

g3d_plugins_cleanup ()

+
void                g3d_plugins_cleanup                 (G3DContext *context);
+

+Clean up the plugin system. Usually done by g3d_context_free().

+

+ +

+
++ + + + +

context :

a valid context +
+
+
+
+

g3d_plugins_load_model ()

+
gboolean            g3d_plugins_load_model              (G3DContext *context,
+                                                         const gchar *filename,
+                                                         G3DModel *model);
+

+Try to load a model from file using import plugins.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

context :

a valid context +

filename :

file name of model to load +

model :

model structure to fill +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

g3d_plugins_load_model_from_stream ()

+
gboolean            g3d_plugins_load_model_from_stream  (G3DContext *context,
+                                                         G3DStream *stream,
+                                                         G3DModel *model);
+

+Try to load a model from stream using import plugins.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

context :

a valid context +

stream :

stream to load model from +

model :

model structure to fill +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

g3d_plugins_load_image ()

+
gboolean            g3d_plugins_load_image              (G3DContext *context,
+                                                         const gchar *filename,
+                                                         G3DImage *image);
+

+Try to load an image from file using import plugins.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

context :

a valid context +

filename :

file name of image to load +

image :

image structure to fill +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

g3d_plugins_load_image_from_stream ()

+
gboolean            g3d_plugins_load_image_from_stream  (G3DContext *context,
+                                                         G3DStream *stream,
+                                                         G3DImage *image);
+

+Try to load an image from stream using import plugins.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

context :

a valid context +

stream :

stream to load image from +

image :

image structure to fill +

Returns :

TRUE on success, FALSE else. +
+
+
+
+

g3d_plugins_get_image_extensions ()

+
gchar**             g3d_plugins_get_image_extensions    (G3DContext *context);
+

+Get the supported image type extensions.

+

+ +

+
++ + + + + + + + + + +

context :

a valid context +

Returns :

NULL-terminated list of image file extensions supported by this +plugin. Free with g_strfreev(). +
+
+
+
+

See Also

+G3DPlugin +
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-primitive.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-primitive.html new file mode 100644 index 0000000..cf7facc --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-primitive.html @@ -0,0 +1,508 @@ + + + + +primitive + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

primitive

+

primitive — 3D primitive generation functions

+
+
+

Synopsis

+
+
+#include <g3d/primitive.h>
+
+G3DObject*          g3d_primitive_cube                  (G3DFloat width,
+                                                         G3DFloat height,
+                                                         G3DFloat depth,
+                                                         G3DMaterial *material);
+G3DObject*          g3d_primitive_box                   (G3DFloat width,
+                                                         G3DFloat height,
+                                                         G3DFloat depth,
+                                                         G3DMaterial *material);
+G3DObject*          g3d_primitive_box_strip_2d          (guint32 vcnt,
+                                                         gdouble *vdata,
+                                                         gdouble height,
+                                                         gdouble width,
+                                                         G3DMaterial *material);
+G3DObject*          g3d_primitive_mesh                  (guint32 m,
+                                                         guint32 n,
+                                                         gboolean wrap_m,
+                                                         gboolean wrap_n,
+                                                         G3DMaterial *material);
+G3DObject*          g3d_primitive_cylinder              (G3DFloat radius,
+                                                         G3DFloat height,
+                                                         guint32 sides,
+                                                         gboolean top,
+                                                         gboolean bottom,
+                                                         G3DMaterial *material);
+G3DObject*          g3d_primitive_tube                  (G3DFloat r_in,
+                                                         G3DFloat r_out,
+                                                         G3DFloat height,
+                                                         guint32 sides,
+                                                         gboolean top,
+                                                         gboolean bottom,
+                                                         G3DMaterial *material);
+G3DObject*          g3d_primitive_sphere                (G3DFloat radius,
+                                                         guint32 vseg,
+                                                         guint32 hseg,
+                                                         G3DMaterial *material);
+
+
+
+

Description

+

+Primitives are objects containing basic 3D geometrical structures. A +variety of them can be created using these functions.

+

+ +

+
+
+

Details

+
+

g3d_primitive_cube ()

+
G3DObject*          g3d_primitive_cube                  (G3DFloat width,
+                                                         G3DFloat height,
+                                                         G3DFloat depth,
+                                                         G3DMaterial *material);
+

+Generates an object containing a box. It is deprecated and now a wrapper for +g3d_primitive_box().

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

width :

the width of the box +

height :

the height of the box +

depth :

the depth of the box +

material :

the material to use for all faces +

Returns :

the box object +
+
+
+
+

g3d_primitive_box ()

+
G3DObject*          g3d_primitive_box                   (G3DFloat width,
+                                                         G3DFloat height,
+                                                         G3DFloat depth,
+                                                         G3DMaterial *material);
+

+Generates an object containing a box.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

width :

the width of the box +

height :

the height of the box +

depth :

the depth of the box +

material :

the material to use for all faces +

Returns :

the box object +
+
+
+
+

g3d_primitive_box_strip_2d ()

+
G3DObject*          g3d_primitive_box_strip_2d          (guint32 vcnt,
+                                                         gdouble *vdata,
+                                                         gdouble height,
+                                                         gdouble width,
+                                                         G3DMaterial *material);
+

+Generates a strip of box segments defined by corner center points +using two-dimensional data (x/z plane).

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

vcnt :

number of control points +

vdata :

2-dimensional control point data (2 * vcnt * gdouble) +

height :

height of resulting strip (y component) +

width :

width of strip (corner diameter) +

material :

material to use for faces +

Returns :

strip object +
+
+
+
+

g3d_primitive_mesh ()

+
G3DObject*          g3d_primitive_mesh                  (guint32 m,
+                                                         guint32 n,
+                                                         gboolean wrap_m,
+                                                         gboolean wrap_n,
+                                                         G3DMaterial *material);
+

+Generate a mesh consisting of m * n vertices. The vertex data is +initialized with (0.0, 0.0, 0.0) and has to be set to something +useful.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + +

m :

number of vertices in m direction +

n :

number of vertices in n direction +

wrap_m :

wrap around in m direction +

wrap_n :

wrap around in n direction +

material :

material to use for faces +

Returns :

mesh object +
+
+
+
+

g3d_primitive_cylinder ()

+
G3DObject*          g3d_primitive_cylinder              (G3DFloat radius,
+                                                         G3DFloat height,
+                                                         guint32 sides,
+                                                         gboolean top,
+                                                         gboolean bottom,
+                                                         G3DMaterial *material);
+

+Generates an object containing a cylinder.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

radius :

the radius of the cylinder +

height :

the height of the side faces +

sides :

number of side faces (number of circle segments) +

top :

add top faces +

bottom :

add bottom faces +

material :

material to use for faces +

Returns :

cylinder object +
+
+
+
+

g3d_primitive_tube ()

+
G3DObject*          g3d_primitive_tube                  (G3DFloat r_in,
+                                                         G3DFloat r_out,
+                                                         G3DFloat height,
+                                                         guint32 sides,
+                                                         gboolean top,
+                                                         gboolean bottom,
+                                                         G3DMaterial *material);
+

+Generates an object containing a tube (a cylinder with a hole).

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

r_in :

inner radius +

r_out :

outer radius +

height :

the height of the side faces +

sides :

number of side faces (number of circle segments) +

top :

add top faces +

bottom :

add bottom faces +

material :

material to use for faces +

Returns :

tube object +
+
+
+
+

g3d_primitive_sphere ()

+
G3DObject*          g3d_primitive_sphere                (G3DFloat radius,
+                                                         guint32 vseg,
+                                                         guint32 hseg,
+                                                         G3DMaterial *material);
+

+Generates an object containing a sphere.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

radius :

radius +

vseg :

number of vertical segments +

hseg :

number of horizontal segments +

material :

material to use for faces +

Returns :

sphere object +
+
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-quat.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-quat.html new file mode 100644 index 0000000..af4e6aa --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-quat.html @@ -0,0 +1,346 @@ + + + + +quat + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

quat

+

quat — quaternion helpers

+
+
+

Synopsis

+
+
+#include <g3d/quat.h>
+
+typedef             G3DQuat;
+gboolean            g3d_quat_add                        (G3DQuat *qr,
+                                                         G3DQuat *q1,
+                                                         G3DQuat *q2);
+gboolean            g3d_quat_normalize                  (G3DQuat *q);
+gboolean            g3d_quat_rotate                     (G3DQuat *q,
+                                                         G3DVector *axis,
+                                                         G3DFloat angle);
+gboolean            g3d_quat_to_matrix                  (G3DQuat *q,
+                                                         G3DMatrix *matrix);
+gboolean            g3d_quat_to_rotation_xyz            (G3DQuat *q,
+                                                         G3DFloat *rx,
+                                                         G3DFloat *ry,
+                                                         G3DFloat *rz);
+gboolean            g3d_quat_trackball                  (G3DQuat *q,
+                                                         G3DFloat x1,
+                                                         G3DFloat y1,
+                                                         G3DFloat x2,
+                                                         G3DFloat y2,
+                                                         G3DFloat r);
+
+
+
+

Description

+

+

+

+ +

+
+
+

Details

+
+

G3DQuat

+
typedef G3DFloat G3DQuat;
+
+

+Quaternion element type.

+

+ +

+
+
+
+

g3d_quat_add ()

+
gboolean            g3d_quat_add                        (G3DQuat *qr,
+                                                         G3DQuat *q1,
+                                                         G3DQuat *q2);
+

+Add two quats.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

qr :

result quat +

q1 :

first quat +

q2 :

second quat +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_quat_normalize ()

+
gboolean            g3d_quat_normalize                  (G3DQuat *q);
+

+normalize the quaternion to a length of 1.0.

+

+ +

+
++ + + + + + + + + + +

q :

a quaternion +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_quat_rotate ()

+
gboolean            g3d_quat_rotate                     (G3DQuat *q,
+                                                         G3DVector *axis,
+                                                         G3DFloat angle);
+

+Encode a rotation around an axis into quaternion.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

q :

resulting quat +

axis :

rotation axis +

angle :

rotation angle +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_quat_to_matrix ()

+
gboolean            g3d_quat_to_matrix                  (G3DQuat *q,
+                                                         G3DMatrix *matrix);
+

+Convert a quaternion to a transformation matrix.

+

+ +

+
++ + + + + + + + + + + + + + +

q :

source quat +

matrix :

resulting matrix +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_quat_to_rotation_xyz ()

+
gboolean            g3d_quat_to_rotation_xyz            (G3DQuat *q,
+                                                         G3DFloat *rx,
+                                                         G3DFloat *ry,
+                                                         G3DFloat *rz);
+

+Calculate the rotation around the three coordinate axes from a given +quaternion.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

q :

a quaternion +

rx :

rotation around x axis +

ry :

rotation around y axis +

rz :

rotation around z axis +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_quat_trackball ()

+
gboolean            g3d_quat_trackball                  (G3DQuat *q,
+                                                         G3DFloat x1,
+                                                         G3DFloat y1,
+                                                         G3DFloat x2,
+                                                         G3DFloat y2,
+                                                         G3DFloat r);
+

+Emulate a virtual trackball movement and return rotation as quaternion. +The x and y values of the starting and end point of the movement have +to be in the range -1.0 .. 1.0.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

q :

resulting quaternion +

x1 :

x value of first point +

y1 :

y value of first point +

x2 :

x value of second point +

y2 :

y value of second point +

r :

radius of virtual trackball, usually 0.8 +

Returns :

TRUE on success, FALSE else +
+
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-read.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-read.html new file mode 100644 index 0000000..b731d3c --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-read.html @@ -0,0 +1,373 @@ + + + + +read + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

read

+

read — file reading abstraction (deprecated)

+
+
+

Synopsis

+
+
+#include <g3d/read.h>
+
+gint32              g3d_read_int8                       (FILE *f);
+gint32              g3d_read_int16_be                   (FILE *f);
+gint32              g3d_read_int16_le                   (FILE *f);
+gint32              g3d_read_int32_be                   (FILE *f);
+gint32              g3d_read_int32_le                   (FILE *f);
+G3DFloat            g3d_read_float_be                   (FILE *f);
+G3DFloat            g3d_read_float_le                   (FILE *f);
+G3DDouble           g3d_read_double_be                  (FILE *f);
+G3DDouble           g3d_read_double_le                  (FILE *f);
+gint32              g3d_read_cstr                       (FILE *f,
+                                                         gchar *buffer,
+                                                         gint32 max_len);
+
+
+
+

Description

+

+The g3d_read_* family of functions is deprecated in favour of the G3DStream +interface.

+

+ +

+
+
+

Details

+
+

g3d_read_int8 ()

+
gint32              g3d_read_int8                       (FILE *f);
+

+Read a 1 byte signed integer from file.

+

+ +

+
++ + + + + + + + + + +

f :

the file to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_read_int16_be ()

+
gint32              g3d_read_int16_be                   (FILE *f);
+

+Read a 2 byte big-endian signed integer from file.

+

+ +

+
++ + + + + + + + + + +

f :

the file to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_read_int16_le ()

+
gint32              g3d_read_int16_le                   (FILE *f);
+

+Read a 2 byte little-endian signed integer from file.

+

+ +

+
++ + + + + + + + + + +

f :

the file to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_read_int32_be ()

+
gint32              g3d_read_int32_be                   (FILE *f);
+

+Read a 4 byte big-endian signed integer from file.

+

+ +

+
++ + + + + + + + + + +

f :

the file to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_read_int32_le ()

+
gint32              g3d_read_int32_le                   (FILE *f);
+

+Read a 4 byte little-endian signed integer from file.

+

+ +

+
++ + + + + + + + + + +

f :

the file to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_read_float_be ()

+
G3DFloat            g3d_read_float_be                   (FILE *f);
+

+Read a 4 byte big-endian floating point number from file.

+

+ +

+
++ + + + + + + + + + +

f :

the file to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_read_float_le ()

+
G3DFloat            g3d_read_float_le                   (FILE *f);
+

+Read a 4 byte little-endian floating point number from file.

+

+ +

+
++ + + + + + + + + + +

f :

the file to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_read_double_be ()

+
G3DDouble           g3d_read_double_be                  (FILE *f);
+

+Read a 8 byte big-endian double-precision floating point number from file.

+

+ +

+
++ + + + + + + + + + +

f :

the file to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_read_double_le ()

+
G3DDouble           g3d_read_double_le                  (FILE *f);
+

+Read a 8 byte little-endian double-precision floating point number from +file.

+

+ +

+
++ + + + + + + + + + +

f :

the file to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_read_cstr ()

+
gint32              g3d_read_cstr                       (FILE *f,
+                                                         gchar *buffer,
+                                                         gint32 max_len);
+

+Read a zero-terminated string from file.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

f :

the file to read from +

buffer :

the buffer to store line in +

max_len :

maximum length of string including termination character +

Returns :

number of bytes read from file. +
+
+
+
+

See Also

+g3d_stream_open_file +
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-stream.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-stream.html new file mode 100644 index 0000000..a03c89f --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-stream.html @@ -0,0 +1,1535 @@ + + + + +stream + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

stream

+

stream — I/O abstraction layer for plugins

+
+
+

Synopsis

+
+
+#include <g3d/stream.h>
+
+                    G3DStream;
+G3DStream*          g3d_stream_open_file                (const gchar *filename,
+                                                         const gchar *mode);
+G3DStream*          g3d_stream_open_structured_file     (const gchar *filename,
+                                                         const gchar *subfile);
+G3DStream*          g3d_stream_open_structured_file_from_stream
+                                                        (G3DStream *stream,
+                                                         const gchar *subfile);
+G3DStream*          g3d_stream_open_zip                 (const gchar *filename,
+                                                         const gchar *subfile);
+G3DStream*          g3d_stream_open_zip_from_stream     (G3DStream *stream,
+                                                         const gchar *subfile);
+G3DStream*          g3d_stream_open_gzip_from_stream    (G3DStream *stream);
+G3DStream*          g3d_stream_from_buffer              (guint8 *buffer,
+                                                         gsize size,
+                                                         const gchar *title,
+                                                         gboolean free_buffer);
+G3DStream*          g3d_stream_zlib_inflate_stream      (G3DStream *stream,
+                                                         gsize cmp_size);
+G3DStream*          g3d_stream_new_custom               (guint32 flags,
+                                                         const gchar *uri,
+                                                         G3DStreamReadFunc readfunc,
+                                                         G3DStreamReadLineFunc readlinefunc,
+                                                         G3DStreamSeekFunc seekfunc,
+                                                         G3DStreamTellFunc tellfunc,
+                                                         G3DStreamSizeFunc sizefunc,
+                                                         G3DStreamEofFunc eoffunc,
+                                                         G3DStreamCloseFunc closefunc,
+                                                         gpointer data);
+gint                g3d_stream_close                    (G3DStream *stream);
+gint                g3d_stream_skip                     (G3DStream *stream,
+                                                         goffset offset);
+gint                g3d_stream_seek                     (G3DStream *stream,
+                                                         goffset offset,
+                                                         GSeekType whence);
+goffset             g3d_stream_tell                     (G3DStream *stream);
+goffset             g3d_stream_size                     (G3DStream *stream);
+gboolean            g3d_stream_eof                      (G3DStream *stream);
+gboolean            g3d_stream_is_seekable              (G3DStream *stream);
+gchar*              g3d_stream_get_uri                  (G3DStream *stream);
+guint32             g3d_stream_line                     (G3DStream *stream);
+gsize               g3d_stream_read                     (G3DStream *stream,
+                                                         gpointer ptr,
+                                                         gsize size);
+gchar*              g3d_stream_read_line                (G3DStream *stream,
+                                                         gchar *buf,
+                                                         gsize size);
+gint32              g3d_stream_read_int8                (G3DStream *stream);
+gint32              g3d_stream_read_int16_be            (G3DStream *stream);
+gint32              g3d_stream_read_int16_le            (G3DStream *stream);
+gint32              g3d_stream_read_int32_be            (G3DStream *stream);
+gint32              g3d_stream_read_int32_le            (G3DStream *stream);
+G3DFloat            g3d_stream_read_float_be            (G3DStream *stream);
+G3DFloat            g3d_stream_read_float_le            (G3DStream *stream);
+G3DDouble           g3d_stream_read_double_be           (G3DStream *stream);
+G3DDouble           g3d_stream_read_double_le           (G3DStream *stream);
+gint32              g3d_stream_read_cstr                (G3DStream *stream,
+                                                         gchar *buffer,
+                                                         gint32 max_len);
+gint                (*G3DStreamCloseFunc)               (gpointer data);
+gboolean            (*G3DStreamEofFunc)                 (gpointer data);
+gsize               (*G3DStreamReadFunc)                (gpointer ptr,
+                                                         gsize size,
+                                                         gpointer data);
+gchar*              (*G3DStreamReadLineFunc)            (gchar *buf,
+                                                         gsize size,
+                                                         gpointer data);
+gint                (*G3DStreamSeekFunc)                (gpointer data,
+                                                         goffset offset,
+                                                         GSeekType whence);
+goffset             (*G3DStreamSizeFunc)                (gpointer data);
+goffset             (*G3DStreamTellFunc)                (gpointer data);
+
+
+
+

Description

+

+A stream is an abstraction for data input. It enables plugins to read +data from a file, a memory buffer, a container file or some other medium.

+

+ +

+
+
+

Details

+
+

G3DStream

+
typedef struct {
+} G3DStream;
+
+

+An abstraction of input handling.

+

+ +

+
+
+
+

g3d_stream_open_file ()

+
G3DStream*          g3d_stream_open_file                (const gchar *filename,
+                                                         const gchar *mode);
+

+Opens a file with the C stdio routines.

+

+ +

+
++ + + + + + + + + + + + + + +

filename :

the name of the file to open +

mode :

the mode to open the file, as given to fopen() +

Returns :

a newly allocated G3DStream or NULL in case of an error. +
+
+
+
+

g3d_stream_open_structured_file ()

+
G3DStream*          g3d_stream_open_structured_file     (const gchar *filename,
+                                                         const gchar *subfile);
+

+Open a file within a Structured File as G3DStream.

+

+ +

+
++ + + + + + + + + + + + + + +

filename :

name of container file +

subfile :

name of (contained) sub-file +

Returns :

a newly allocated G3DStream or NULL in case of an error. +
+
+
+
+

g3d_stream_open_structured_file_from_stream ()

+
G3DStream*          g3d_stream_open_structured_file_from_stream
+                                                        (G3DStream *stream,
+                                                         const gchar *subfile);
+

+Open a file within a Structured File which is opened as a stream. At the +moment this only works for streams opened by g3d_stream_open_file() as +the file is directly opened again.

+

+ +

+
++ + + + + + + + + + + + + + +

stream :

stream of container file +

subfile :

name of (contained) sub-file +

Returns :

a newly allocated G3DStream or NULL in case of an error. +
+
+
+
+

g3d_stream_open_zip ()

+
G3DStream*          g3d_stream_open_zip                 (const gchar *filename,
+                                                         const gchar *subfile);
+

+Open a file within a Zip archive.

+

+ +

+
++ + + + + + + + + + + + + + +

filename :

name of container file +

subfile :

name of (contained) sub-file +

Returns :

a newly allocated G3DStream or NULL in case of an error. +
+
+
+
+

g3d_stream_open_zip_from_stream ()

+
G3DStream*          g3d_stream_open_zip_from_stream     (G3DStream *stream,
+                                                         const gchar *subfile);
+

+Open a file within a Zip archive which is opened as a stream. At the +moment this only works for streams opened by g3d_stream_open_file() as +the file is directly opened again.

+

+ +

+
++ + + + + + + + + + + + + + +

stream :

stream of container file +

subfile :

name of (contained) sub-file +

Returns :

a newly allocated G3DStream or NULL in case of an error. +
+
+
+
+

g3d_stream_open_gzip_from_stream ()

+
G3DStream*          g3d_stream_open_gzip_from_stream    (G3DStream *stream);
+

+Reads data from a gzip-compressed stream.

+

+ +

+
++ + + + + + + + + + +

stream :

stream to read from +

Returns :

a newly allocated G3DStream or NULL in case of an error. +
+
+
+
+

g3d_stream_from_buffer ()

+
G3DStream*          g3d_stream_from_buffer              (guint8 *buffer,
+                                                         gsize size,
+                                                         const gchar *title,
+                                                         gboolean free_buffer);
+

+Use a buffer in memory as G3DStream.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

buffer :

memory buffer to use +

size :

size of buffer +

title :

optional title of stream, may be NULL +

free_buffer :

whether to free the memory with g_free() on g3d_stream_close() +

Returns :

a newly allocated G3DStream or NULL in case of an error. +
+
+
+
+

g3d_stream_zlib_inflate_stream ()

+
G3DStream*          g3d_stream_zlib_inflate_stream      (G3DStream *stream,
+                                                         gsize cmp_size);
+

+Opens a new stream to decompress zlib-deflated parts of a stream.

+

+ +

+
++ + + + + + + + + + + + + + +

stream :

a parent stream +

cmp_size :

the compressed size of the deflated part +

Returns :

a newly allocated G3DStream or NULL in case of an error +
+
+
+
+

g3d_stream_new_custom ()

+
G3DStream*          g3d_stream_new_custom               (guint32 flags,
+                                                         const gchar *uri,
+                                                         G3DStreamReadFunc readfunc,
+                                                         G3DStreamReadLineFunc readlinefunc,
+                                                         G3DStreamSeekFunc seekfunc,
+                                                         G3DStreamTellFunc tellfunc,
+                                                         G3DStreamSizeFunc sizefunc,
+                                                         G3DStreamEofFunc eoffunc,
+                                                         G3DStreamCloseFunc closefunc,
+                                                         gpointer data);
+

+Creates a new G3DStream with custom callback functions.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

flags :

stream capability flags +

uri :

URI of new stream, must not be NULL +

readfunc :

read callback function +

readlinefunc :

read line callback function, may be NULL in which case +line reading is emulated with g3d_stream_read() +

seekfunc :

seek callback function +

tellfunc :

tell callback function +

sizefunc :

size callback function +

eoffunc :

end-of-file callback function +

closefunc :

close callback function +

data :

opaque data for all callback functions +

Returns :

a newly allocated G3DStream or NULL in case of an error. +
+
+
+
+

g3d_stream_close ()

+
gint                g3d_stream_close                    (G3DStream *stream);
+

+Closes an open stream.

+

+ +

+
++ + + + + + + + + + +

stream :

the stream +

Returns :

0 on success. +
+
+
+
+

g3d_stream_skip ()

+
gint                g3d_stream_skip                     (G3DStream *stream,
+                                                         goffset offset);
+

+Skip a number of bytes (>= 0) in stream even if it does not support +seeking.

+

+ +

+
++ + + + + + + + + + + + + + +

stream :

stream to skip bytes from +

offset :

number of bytes to skip +

Returns :

0 on success, -1 else +
+
+
+
+

g3d_stream_seek ()

+
gint                g3d_stream_seek                     (G3DStream *stream,
+                                                         goffset offset,
+                                                         GSeekType whence);
+

+Moves around the current position in the stream.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

stream :

stream to seek in +

offset :

number of bytes to seek +

whence :

seek type +

Returns :

0 on success, -1 else +
+
+
+
+

g3d_stream_tell ()

+
goffset             g3d_stream_tell                     (G3DStream *stream);
+

+Tells the current position in the stream.

+

+ +

+
++ + + + + + + + + + +

stream :

stream to get position from +

Returns :

current stream position +
+
+
+
+

g3d_stream_size ()

+
goffset             g3d_stream_size                     (G3DStream *stream);
+

+Get the size in bytes of a stream.

+

+ +

+
++ + + + + + + + + + +

stream :

stream to get size from +

Returns :

size of stream in bytes +
+
+
+
+

g3d_stream_eof ()

+
gboolean            g3d_stream_eof                      (G3DStream *stream);
+

+Checks whether the stream has reached its end.

+

+ +

+
++ + + + + + + + + + +

stream :

the stream +

Returns :

TRUE if no more data can be read, FALSE else. +
+
+
+
+

g3d_stream_is_seekable ()

+
gboolean            g3d_stream_is_seekable              (G3DStream *stream);
+

+Get information whether it is possible to seek in a stream.

+

+ +

+
++ + + + + + + + + + +

stream :

the stream +

Returns :

TRUE if seekable, FALSE else +
+
+
+
+

g3d_stream_get_uri ()

+
gchar*              g3d_stream_get_uri                  (G3DStream *stream);
+

+Get the URI of a stream

+

+ +

+
++ + + + + + + + + + +

stream :

the stream +

Returns :

a non-NULL, zero-terminated string containing the URI of the +string. This return value should not be freed. +
+
+
+
+

g3d_stream_line ()

+
guint32             g3d_stream_line                     (G3DStream *stream);
+

+Get the current line number from stream. This only works if line are +consequently read with g3d_stream_read_line(), so it's only applicable +for text streams.

+

+ +

+
++ + + + + + + + + + +

stream :

stream to get line from +

Returns :

current line number, may be 0 +
+
+
+
+

g3d_stream_read ()

+
gsize               g3d_stream_read                     (G3DStream *stream,
+                                                         gpointer ptr,
+                                                         gsize size);
+

+Reads a number of bytes from the stream.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

stream :

the stream to read from +

ptr :

pointer to memory storage +

size :

number of bytes to read +

Returns :

number of bytes successfully read. +
+
+
+
+

g3d_stream_read_line ()

+
gchar*              g3d_stream_read_line                (G3DStream *stream,
+                                                         gchar *buf,
+                                                         gsize size);
+

+Read a line (terminated by a newline character or end of file) from a +stream.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

stream :

stream to read a line from +

buf :

an allocated buffer to be filled +

size :

maximum length of line including terminating zero +

Returns :

the read line or NULL in case of an error. +
+
+
+
+

g3d_stream_read_int8 ()

+
gint32              g3d_stream_read_int8                (G3DStream *stream);
+

+Read a 1 byte signed integer from file.

+

+ +

+
++ + + + + + + + + + +

stream :

the stream to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_stream_read_int16_be ()

+
gint32              g3d_stream_read_int16_be            (G3DStream *stream);
+

+Read a 2 byte big-endian signed integer from file.

+

+ +

+
++ + + + + + + + + + +

stream :

the stream to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_stream_read_int16_le ()

+
gint32              g3d_stream_read_int16_le            (G3DStream *stream);
+

+Read a 2 byte little-endian signed integer from file.

+

+ +

+
++ + + + + + + + + + +

stream :

the stream to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_stream_read_int32_be ()

+
gint32              g3d_stream_read_int32_be            (G3DStream *stream);
+

+Read a 4 byte big-endian signed integer from file.

+

+ +

+
++ + + + + + + + + + +

stream :

the stream to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_stream_read_int32_le ()

+
gint32              g3d_stream_read_int32_le            (G3DStream *stream);
+

+Read a 4 byte little-endian signed integer from file.

+

+ +

+
++ + + + + + + + + + +

stream :

the stream to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_stream_read_float_be ()

+
G3DFloat            g3d_stream_read_float_be            (G3DStream *stream);
+

+Read a 4 byte big-endian floating point number from file.

+

+ +

+
++ + + + + + + + + + +

stream :

the stream to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_stream_read_float_le ()

+
G3DFloat            g3d_stream_read_float_le            (G3DStream *stream);
+

+Read a 4 byte little-endian floating point number from file.

+

+ +

+
++ + + + + + + + + + +

stream :

the stream to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_stream_read_double_be ()

+
G3DDouble           g3d_stream_read_double_be           (G3DStream *stream);
+

+Read a 8 byte big-endian double-precision floating point number from file.

+

+ +

+
++ + + + + + + + + + +

stream :

the stream to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_stream_read_double_le ()

+
G3DDouble           g3d_stream_read_double_le           (G3DStream *stream);
+

+Read a 8 byte little-endian double-precision floating point number from +file.

+

+ +

+
++ + + + + + + + + + +

stream :

the stream to read from +

Returns :

The read value, 0 in case of error +
+
+
+
+

g3d_stream_read_cstr ()

+
gint32              g3d_stream_read_cstr                (G3DStream *stream,
+                                                         gchar *buffer,
+                                                         gint32 max_len);
+

+Read a string (terminated by '\0') from stream

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

stream :

the stream to read from +

buffer :

the buffer to fill +

max_len :

maximum number to read from stream +

Returns :

number of bytes read from stream +
+
+
+
+

G3DStreamCloseFunc ()

+
gint                (*G3DStreamCloseFunc)               (gpointer data);
+

+Callback function for g3d_stream_close().

+

+ +

+
++ + + + + + + + + + +

data :

opaque stream data +

Returns :

0 on success, -1 else. +
+
+
+
+

G3DStreamEofFunc ()

+
gboolean            (*G3DStreamEofFunc)                 (gpointer data);
+

+Callback function for g3d_stream_eof().

+

+ +

+
++ + + + + + + + + + +

data :

opaque stream data +

Returns :

TRUE on stream end-of-file, FALSE else. +
+
+
+
+

G3DStreamReadFunc ()

+
gsize               (*G3DStreamReadFunc)                (gpointer ptr,
+                                                         gsize size,
+                                                         gpointer data);
+

+Callback function for g3d_stream_read().

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

ptr :

buffer to read bytes into +

size :

number of bytes to read +

data :

opaque stream data +

Returns :

number of bytes actually read. +
+
+
+
+

G3DStreamReadLineFunc ()

+
gchar*              (*G3DStreamReadLineFunc)            (gchar *buf,
+                                                         gsize size,
+                                                         gpointer data);
+

+Callback function for g3d_stream_read_line().

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

buf :

buffer to read bytes into +

size :

maximum size of buffer +

data :

opaque stream data +

Returns :

The line buffer or NULL in case of an error. +
+
+
+
+

G3DStreamSeekFunc ()

+
gint                (*G3DStreamSeekFunc)                (gpointer data,
+                                                         goffset offset,
+                                                         GSeekType whence);
+

+Callback function for g3d_stream_seek().

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

data :

opaque stream data +

offset :

seek offset +

whence :

seek type +

Returns :

0 on success, -1 else. +
+
+
+
+

G3DStreamSizeFunc ()

+
goffset             (*G3DStreamSizeFunc)                (gpointer data);
+

+Callback function for g3d_stream_size().

+

+ +

+
++ + + + + + + + + + +

data :

opaque stream data +

Returns :

size of stream. +
+
+
+
+

G3DStreamTellFunc ()

+
goffset             (*G3DStreamTellFunc)                (gpointer data);
+

+Callback function for g3d_stream_tell().

+

+ +

+
++ + + + + + + + + + +

data :

opaque stream data +

Returns :

current stream position. +
+
+
+
+

See Also

+G3DStream +
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-texture.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-texture.html new file mode 100644 index 0000000..9caa7da --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-texture.html @@ -0,0 +1,455 @@ + + + + +texture + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

texture

+

texture — Texture loading and manipulation

+
+
+

Synopsis

+
+
+#include <g3d/texture.h>
+
+#define             G3D_FLAG_IMG_GREYSCALE
+enum                G3DTexEnv;
+                    G3DImage;
+G3DImage*           g3d_texture_load_cached             (G3DContext *context,
+                                                         G3DModel *model,
+                                                         const gchar *filename);
+G3DImage*           g3d_texture_load_from_stream        (G3DContext *context,
+                                                         G3DModel *model,
+                                                         G3DStream *stream);
+G3DImage*           g3d_texture_load                    (G3DContext *context,
+                                                         const gchar *filename);
+void                g3d_texture_free                    (G3DImage *texture);
+gboolean            g3d_texture_prepare                 (G3DImage *texture);
+gboolean            g3d_texture_flip_y                  (G3DImage *texture);
+G3DImage*           g3d_texture_merge_alpha             (G3DImage *image,
+                                                         G3DImage *aimage);
+
+
+
+

Description

+

+A texture is an image used in materials. Here are some helper functions, +mostly for cached loading of a G3DImage.

+

+ +

+
+
+

Details

+
+

G3D_FLAG_IMG_GREYSCALE

+
#define G3D_FLAG_IMG_GREYSCALE       (1L << 1)
+
+

+The image just uses the red channel for grey value

+

+ +

+
+
+
+

enum G3DTexEnv

+
typedef enum {
+	G3D_TEXENV_UNSPECIFIED = 0,
+	G3D_TEXENV_BLEND,
+	G3D_TEXENV_DECAL,
+	G3D_TEXENV_MODULATE,
+	G3D_TEXENV_REPLACE
+} G3DTexEnv;
+
+

+Specify how the texture should interact with other material properties.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

G3D_TEXENV_UNSPECIFIED

unspecified, application decides +

G3D_TEXENV_BLEND

use blending +

G3D_TEXENV_DECAL

use as decal +

G3D_TEXENV_MODULATE

use modulate +

G3D_TEXENV_REPLACE

replace color +
+
+
+
+

G3DImage

+
typedef struct {
+	gchar *name;
+	guint32 width;
+	guint32 height;
+	guint8 depth;
+	guint32 flags;
+	guint8 *pixeldata;
+
+	guint32 tex_id;
+	G3DTexEnv tex_env;
+	G3DFloat tex_scale_u;
+	G3DFloat tex_scale_v;
+} G3DImage;
+
+

+Object containing a two-dimensional pixel image.

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

gchar *name;

name of image +

guint32 width;

width of image in pixels +

guint32 height;

height of image in pixels +

guint8 depth;

depth of image in bits +

guint32 flags;

flags +

guint8 *pixeldata;

the binary image data +

guint32 tex_id;

the OpenGL texture id, should be unique model-wide +

G3DTexEnv tex_env;

texture environment flags +

G3DFloat tex_scale_u;

factor scaling texture width, should be 1.0 for most cases +

G3DFloat tex_scale_v;

factor scaling texture height, should be 1.0 for most cases +
+
+
+
+

g3d_texture_load_cached ()

+
G3DImage*           g3d_texture_load_cached             (G3DContext *context,
+                                                         G3DModel *model,
+                                                         const gchar *filename);
+

+Loads a texture image from file and attaches it to a hash table in the +model. On a second try to load this texture it is returned from cache.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

context :

a valid context +

model :

a valid model +

filename :

the file name of the texture to load +

Returns :

the texture image +
+
+
+
+

g3d_texture_load_from_stream ()

+
G3DImage*           g3d_texture_load_from_stream        (G3DContext *context,
+                                                         G3DModel *model,
+                                                         G3DStream *stream);
+

+Load a texture image from a stream. The file type is determined by the +extension of the stream URI, so it should be valid. If model is not NULL +the texture image is cached (or retrieved from cache if available).

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

context :

a valid context +

model :

a valid model or NULL +

stream :

an open stream +

Returns :

the texture image or NULL in case of an error. +
+
+
+
+

g3d_texture_load ()

+
G3DImage*           g3d_texture_load                    (G3DContext *context,
+                                                         const gchar *filename);
+

+Load a texture from a file. The type of file is determined by the file +extension.

+

+ +

+
++ + + + + + + + + + + + + + +

context :

a valid context +

filename :

the file name of the texture +

Returns :

the texture image or NULL in case of an error. +
+
+
+
+

g3d_texture_free ()

+
void                g3d_texture_free                    (G3DImage *texture);
+

+Frees all memory used by this texture image.

+

+ +

+
++ + + + +

texture :

a texture image +
+
+
+
+

g3d_texture_prepare ()

+
gboolean            g3d_texture_prepare                 (G3DImage *texture);
+

+Resizes the image to dimensions which are a power of 2 to be +usable as an OpenGL texture. +(FIXME: unimplemented)

+

+ +

+
++ + + + + + + + + + +

texture :

a texture image +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_texture_flip_y ()

+
gboolean            g3d_texture_flip_y                  (G3DImage *texture);
+

+Mirror the image along the x axis - all y coordinates are inverted.

+

+ +

+
++ + + + + + + + + + +

texture :

a texture image +

Returns :

TRUE on success, FALSE on error. +
+
+
+
+

g3d_texture_merge_alpha ()

+
G3DImage*           g3d_texture_merge_alpha             (G3DImage *image,
+                                                         G3DImage *aimage);
+

+Merges alpha information from aimage into output image. If image is NULL a +new image is created, else image is returned with alpha from aimage.

+

+ +

+
++ + + + + + + + + + + + + + +

image :

a texture image or NULL +

aimage :

an image with alpha information +

Returns :

a texture image or NULL in case of an error. +
+
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-types.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-types.html new file mode 100644 index 0000000..b7f076d --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-types.html @@ -0,0 +1,109 @@ + + + + +types + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

types

+

types — Basic types

+
+
+

Synopsis

+
+
+#include <g3d/types.h>
+
+typedef             G3DSingle;
+typedef             G3DDouble;
+typedef             G3DFloat;
+#define             G3D_FLOAT_IS_DOUBLE
+
+
+
+

Description

+

+Some basic type abstractions used in libg3d.

+

+ +

+
+
+

Details

+
+

G3DSingle

+
typedef gfloat G3DSingle;
+
+

+Single-precision floating point number.

+

+ +

+
+
+
+

G3DDouble

+
typedef gdouble G3DDouble;
+
+

+Double-precision floating point number.

+

+ +

+
+
+
+

G3DFloat

+

+Default floating point type. If used consistently in the library (not the +case at the moment) this type can be switched between single and double +precision at compile-time.

+

+ +

+
+
+
+

G3D_FLOAT_IS_DOUBLE

+
#define             G3D_FLOAT_IS_DOUBLE
+

+A flag indicating type of G3DFloat. It is TRUE if G3DFloat is double and +FALSE if G3DFloat is single precision.

+

+ +

+
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-vector.html b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-vector.html new file mode 100644 index 0000000..7c2ed8f --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d-vector.html @@ -0,0 +1,266 @@ + + + + +vector + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+

vector

+

vector — Vector manipulation and calculation

+
+
+

Synopsis

+
+
+#include <g3d/vector.h>
+
+typedef             G3DVector;
+gboolean            g3d_vector_normal                   (G3DFloat ax,
+                                                         G3DFloat ay,
+                                                         G3DFloat az,
+                                                         G3DFloat bx,
+                                                         G3DFloat by,
+                                                         G3DFloat bz,
+                                                         G3DFloat *nx,
+                                                         G3DFloat *ny,
+                                                         G3DFloat *nz);
+gboolean            g3d_vector_unify                    (G3DFloat *nx,
+                                                         G3DFloat *ny,
+                                                         G3DFloat *nz);
+gboolean            g3d_vector_transform                (G3DFloat *x,
+                                                         G3DFloat *y,
+                                                         G3DFloat *z,
+                                                         G3DMatrix *matrix);
+
+
+
+

Description

+

+A vector is a one-dimensional array of floating point data. +

+

+Declare it as statically as: +

+

+G3DVector vector[3]; +

+

+or allocate it dynamically with: +

+

+G3DVector *vector = g3d_vector_new(3, 1);

+

+ +

+
+
+

Details

+
+

G3DVector

+
typedef G3DFloat G3DVector;
+
+

+Vector element type.

+

+ +

+
+
+
+

g3d_vector_normal ()

+
gboolean            g3d_vector_normal                   (G3DFloat ax,
+                                                         G3DFloat ay,
+                                                         G3DFloat az,
+                                                         G3DFloat bx,
+                                                         G3DFloat by,
+                                                         G3DFloat bz,
+                                                         G3DFloat *nx,
+                                                         G3DFloat *ny,
+                                                         G3DFloat *nz);
+

+calculate the normal from a plane defined by two vectors

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

ax :

x component first vector +

ay :

y component first vector +

az :

z component first vector +

bx :

x component second vector +

by :

y component second vector +

bz :

z component second vector +

nx :

x component resulting normal +

ny :

y component resulting normal +

nz :

z component resulting normal +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_vector_unify ()

+
gboolean            g3d_vector_unify                    (G3DFloat *nx,
+                                                         G3DFloat *ny,
+                                                         G3DFloat *nz);
+

+Transforms the given vector to the unit vector.

+

+ +

+
++ + + + + + + + + + + + + + + + + + +

nx :

x component of vector +

ny :

y component of vector +

nz :

z component of vector +

Returns :

TRUE on success, FALSE else +
+
+
+
+

g3d_vector_transform ()

+
gboolean            g3d_vector_transform                (G3DFloat *x,
+                                                         G3DFloat *y,
+                                                         G3DFloat *z,
+                                                         G3DMatrix *matrix);
+

+Transforms the given vector corresponding to the given matrix

+

+ +

+
++ + + + + + + + + + + + + + + + + + + + + + +

x :

x component of vector +

y :

y component of vector +

z :

z component of vector +

matrix :

transformation matrix (4x4) +

Returns :

TRUE on success, FALSE else +
+
+
+
+ + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d.devhelp b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d.devhelp new file mode 100644 index 0000000..4d1df55 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d.devhelp @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d.devhelp2 b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d.devhelp2 new file mode 100644 index 0000000..07a1733 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/libg3d.devhelp2 @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/right.png b/src/others/mimesh/libg3d-0.0.8/doc/api/html/right.png new file mode 100644 index 0000000..92832e3 Binary files /dev/null and b/src/others/mimesh/libg3d-0.0.8/doc/api/html/right.png differ diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/style.css b/src/others/mimesh/libg3d-0.0.8/doc/api/html/style.css new file mode 100644 index 0000000..4c57e41 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/doc/api/html/style.css @@ -0,0 +1,160 @@ +.synopsis, .classsynopsis +{ + background: #eeeeee; + border: solid 1px #aaaaaa; + padding: 0.5em; +} +.programlisting +{ + background: #eeeeff; + border: solid 1px #aaaaff; + padding: 0.5em; +} +.variablelist +{ + padding: 4px; + margin-left: 3em; +} +.variablelist td:first-child +{ + vertical-align: top; +} + +/* this is needed so that the local anchors are displayed below the naviagtion */ +@media screen { + sup a.footnote + { + position: relative; + top: 0em ! important; + } + div.refnamediv a[name], div.refsect1 a[name] + { + position: relative; + top: -4.5em; + } + table.navigation#top + { + background: #ffeeee; + border: solid 1px #ffaaaa; + margin-top: 0; + margin-bottom: 0; + position: fixed; + top: 0; + left: 0; + height: 2em; + z-index: 1; + } + .navigation a + { + color: #770000; + } + .navigation a:visited + { + color: #550000; + } + td.shortcuts + { + color: #770000; + font-size: 80%; + } + div.refentry, div.chapter, div.reference, div.part, div.book, div.index, div.glossary, div.sect1, div.appendix, div.preface + { + position: relative; + top: 3em; + z-index: 0; + } + div.refnamediv + { + margin-top: 2em; + } + body + { + padding-bottom: 20em; + } +} +@media print { + table.navigation { + visibility: collapse; + display: none; + } + div.titlepage table.navigation { + visibility: visible; + display: table; + background: #ffeeee; + border: solid 1px #ffaaaa; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + height: 2em; + } +} + +.navigation .title +{ + font-size: 200%; +} + + +div.gallery-float +{ + float: left; + padding: 10px; +} +div.gallery-float img +{ + border-style: none; +} +div.gallery-spacer +{ + clear: both; +} +a +{ + text-decoration: none; +} +a:hover +{ + text-decoration: underline; + color: #FF0000; +} + +div.table table +{ + border-collapse: collapse; + border-spacing: 0px; + border-style: solid; + border-color: #777777; + border-width: 1px; +} + +div.table table td, div.table table th +{ + border-style: solid; + border-color: #777777; + border-width: 1px; + padding: 3px; + vertical-align: top; +} + +div.table table th +{ + background-color: #eeeeee; +} + +hr +{ + color: #777777; + background: #777777; + border: 0; + height: 1px; + clear: both; +} + +.footer +{ + padding-top: 3.5em; + color: #777777; + text-align: center; + font-size: 80%; +} diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/html/up.png b/src/others/mimesh/libg3d-0.0.8/doc/api/html/up.png new file mode 100644 index 0000000..85b3e2a Binary files /dev/null and b/src/others/mimesh/libg3d-0.0.8/doc/api/html/up.png differ -- cgit v1.1