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/xml/context.xml | 321 +++++++++
.../mimesh/libg3d-0.0.8/doc/api/xml/face.xml | 197 +++++
src/others/mimesh/libg3d-0.0.8/doc/api/xml/iff.xml | 558 ++++++++++++++
.../mimesh/libg3d-0.0.8/doc/api/xml/material.xml | 142 ++++
.../mimesh/libg3d-0.0.8/doc/api/xml/matrix.xml | 278 +++++++
.../mimesh/libg3d-0.0.8/doc/api/xml/model.xml | 285 ++++++++
.../mimesh/libg3d-0.0.8/doc/api/xml/object.xml | 301 ++++++++
.../mimesh/libg3d-0.0.8/doc/api/xml/plugins.xml | 423 +++++++++++
.../mimesh/libg3d-0.0.8/doc/api/xml/primitive.xml | 302 ++++++++
.../mimesh/libg3d-0.0.8/doc/api/xml/quat.xml | 220 ++++++
.../mimesh/libg3d-0.0.8/doc/api/xml/read.xml | 218 ++++++
.../mimesh/libg3d-0.0.8/doc/api/xml/stream.xml | 801 +++++++++++++++++++++
.../mimesh/libg3d-0.0.8/doc/api/xml/texture.xml | 318 ++++++++
.../mimesh/libg3d-0.0.8/doc/api/xml/types.xml | 92 +++
.../mimesh/libg3d-0.0.8/doc/api/xml/vector.xml | 184 +++++
15 files changed, 4640 insertions(+)
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/context.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/face.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/iff.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/material.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/matrix.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/model.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/object.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/plugins.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/primitive.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/quat.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/read.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/stream.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/texture.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/types.xml
create mode 100644 src/others/mimesh/libg3d-0.0.8/doc/api/xml/vector.xml
(limited to 'src/others/mimesh/libg3d-0.0.8/doc/api/xml')
diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/xml/context.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/context.xml
new file mode 100644
index 0000000..d9d6e36
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/context.xml
@@ -0,0 +1,321 @@
+
+
+
+
+context
+3
+LIBG3D Library
+
+
+
+context
+Libg3d initialization and configuration
+
+
+
+
+Synopsis
+
+
+
+#include <g3d/g3d.h>
+
+ G3DContext;
+G3DContext* g3d_context_new (void);
+void g3d_context_free (G3DContext *context);
+gboolean (*G3DSetBgColorFunc) (G3DFloat r,
+ G3DFloat g,
+ G3DFloat b,
+ G3DFloat a,
+ gpointer user_data);
+gboolean (*G3DUpdateInterfaceFunc) (gpointer user_data);
+gboolean (*G3DUpdateProgressBarFunc) (G3DFloat percentage,
+ gboolean show,
+ gpointer user_data);
+gboolean g3d_context_update_interface (G3DContext *context);
+void g3d_context_set_update_interface_func
+ (G3DContext *context,
+ G3DUpdateInterfaceFunc func,
+ gpointer user_data);
+gboolean g3d_context_update_progress_bar (G3DContext *context,
+ G3DFloat percentage,
+ gboolean visibility);
+void g3d_context_set_update_progress_bar_func
+ (G3DContext *context,
+ G3DUpdateProgressBarFunc func,
+ gpointer user_data);
+gboolean g3d_context_set_bgcolor (G3DContext *context,
+ G3DFloat r,
+ G3DFloat g,
+ G3DFloat b,
+ G3DFloat a);
+void g3d_context_set_set_bgcolor_func (G3DContext *context,
+ G3DSetBgColorFunc func,
+ gpointer user_data);
+
+
+
+
+
+
+
+
+
+
+
+
+Description
+
+All state information is saved in the context. It also serves as an
+interface to the application.
+
+
+
+
+
+
+Details
+
+G3DContext
+G3DContexttypedef struct {
+} G3DContext;
+
+
+Internal stuff for libg3d.
+
+
+
+
+g3d_context_new ()
+g3d_context_newG3DContext* 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 ()
+g3d_context_freevoid g3d_context_free (G3DContext *context);
+
+Cleans up the context and the plugin system and frees all reserved
+memory.
+
+
+
+context :
+ the context to free
+
+
+
+G3DSetBgColorFunc ()
+G3DSetBgColorFuncgboolean (*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 ()
+G3DUpdateInterfaceFuncgboolean (*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 ()
+G3DUpdateProgressBarFuncgboolean (*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 ()
+g3d_context_update_interfacegboolean 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 ()
+g3d_context_set_update_interface_funcvoid 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 ()
+g3d_context_update_progress_bargboolean 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 ()
+g3d_context_set_update_progress_bar_funcvoid 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 ()
+g3d_context_set_bgcolorgboolean 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 ()
+g3d_context_set_set_bgcolor_funcvoid 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/xml/face.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/face.xml
new file mode 100644
index 0000000..cb8059a
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/face.xml
@@ -0,0 +1,197 @@
+
+
+
+
+face
+3
+LIBG3D Library
+
+
+
+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
+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
+G3D_FLAG_FAC_NORMALS#define G3D_FLAG_FAC_NORMALS (1L << 0)
+
+
+The face has custom normals.
+
+
+
+
+G3D_FLAG_FAC_TEXMAP
+G3D_FLAG_FAC_TEXMAP#define G3D_FLAG_FAC_TEXMAP (1L << 1)
+
+
+The face has a texture map and texture coordinates.
+
+
+
+
+G3DFace
+G3DFacetypedef 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 ()
+g3d_face_get_normalgboolean 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 ()
+g3d_face_freevoid 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/xml/iff.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/iff.xml
new file mode 100644
index 0000000..73b9ca6
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/iff.xml
@@ -0,0 +1,558 @@
+
+
+
+
+iff
+3
+LIBG3D Library
+
+
+
+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
+G3D_IFF_PAD1#define G3D_IFF_PAD1 0x01
+
+
+No padding is done after chunks.
+
+
+
+
+G3D_IFF_PAD2
+G3D_IFF_PAD2#define G3D_IFF_PAD2 0x02
+
+
+Chunks are 2-byte aligned
+
+
+
+
+G3D_IFF_PAD4
+G3D_IFF_PAD4#define G3D_IFF_PAD4 0x04
+
+
+Chunks are 4-byte aligned
+
+
+
+
+G3D_IFF_PAD8
+G3D_IFF_PAD8#define G3D_IFF_PAD8 0x08
+
+
+Chunks are 8-byte aligned
+
+
+
+
+G3D_IFF_LE
+G3D_IFF_LE#define G3D_IFF_LE 0x40 /* little endian */
+
+
+The file has little-endian data.
+
+
+
+
+G3D_IFF_LEN16
+G3D_IFF_LEN16#define G3D_IFF_LEN16 0x20
+
+
+All chunks have 16-bit sizes.
+
+
+
+
+G3D_IFF_SUBCHUNK_LEN16
+G3D_IFF_SUBCHUNK_LEN16#define G3D_IFF_SUBCHUNK_LEN16 0x10
+
+
+All chunks except the toplevel ones have 16-bit sizes.
+
+
+
+
+G3D_IFF_MKID()
+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 ()
+g3d_iff_checkgboolean 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 ()
+g3d_iff_read_chunkgsize 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 ()
+g3d_iff_handle_chunkgpointer 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 ()
+g3d_iff_chunk_matchesgboolean 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 ()
+g3d_iff_read_ctnrgboolean 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 ()
+g3d_iff_id_to_textgchar* 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 ()
+g3d_iff_openFILE* 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 ()
+g3d_iff_readchunkint 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 ()
+G3DIffChunkCallbackgboolean (*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
+g3d_iff_chunk_callback#define g3d_iff_chunk_callback G3DIffChunkCallback
+
+
+IFF chunk callback (deprecated).
+
+
+
+
+G3DIffChunkInfo
+G3DIffChunkInfotypedef 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
+g3d_iff_chunk_info#define g3d_iff_chunk_info G3DIffChunkInfo
+
+
+IFF chunk description (deprecated).
+
+
+
+
+G3DIffGlobal
+G3DIffGlobaltypedef 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
+g3d_iff_gdata#define g3d_iff_gdata G3DIffGlobal
+
+
+IFF global data (deprecated).
+
+
+
+
+G3DIffLocal
+G3DIffLocaltypedef 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
+g3d_iff_ldata#define g3d_iff_ldata G3DIffLocal
+
+
+IFF local data (deprecated).
+
+
+
+
+
+
+
+
+
+
diff --git a/src/others/mimesh/libg3d-0.0.8/doc/api/xml/material.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/material.xml
new file mode 100644
index 0000000..e7240da
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/material.xml
@@ -0,0 +1,142 @@
+
+
+
+
+material
+3
+LIBG3D Library
+
+
+
+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
+G3DMaterialtypedef 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 ()
+g3d_material_newG3DMaterial* g3d_material_new (void);
+
+Generates a new material with a default color.
+
+
+
+Returns : the new material or NULL on error
+
+
+
+g3d_material_free ()
+g3d_material_freevoid 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/xml/matrix.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/matrix.xml
new file mode 100644
index 0000000..be65522
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/matrix.xml
@@ -0,0 +1,278 @@
+
+
+
+
+matrix
+3
+LIBG3D Library
+
+
+
+matrix
+Matrix manipulation and calculation
+
+
+
+
+Synopsis
+
+
+
+#include <g3d/matrix.h>
+
+typedef G3DMatrix;
+gboolean g3d_matrix_identity (G3DMatrix *matrix);
+gboolean g3d_matrix_multiply (G3DMatrix *m1,
+ G3DMatrix *m2,
+ G3DMatrix *rm);
+gboolean g3d_matrix_translate (G3DFloat x,
+ G3DFloat y,
+ G3DFloat z,
+ G3DMatrix *rm);
+gboolean g3d_matrix_rotate (G3DFloat angle,
+ G3DFloat ax,
+ G3DFloat ay,
+ G3DFloat az,
+ G3DMatrix *rm);
+gboolean g3d_matrix_rotate_xyz (G3DFloat rx,
+ G3DFloat ry,
+ G3DFloat rz,
+ G3DMatrix *rm);
+gboolean g3d_matrix_scale (G3DFloat x,
+ G3DFloat y,
+ G3DFloat z,
+ G3DMatrix *rm);
+gboolean g3d_matrix_transpose (G3DMatrix *matrix);
+G3DFloat g3d_matrix_determinant (G3DMatrix *matrix);
+gboolean g3d_matrix_dump (G3DMatrix *matrix);
+
+
+
+
+
+
+
+
+
+
+
+
+Description
+
+Matrices in libg3d have the following layout:
+
+
+G3DMatrix matrix[16]:
+
+
+matrix[col * 4 + row] = f;
+
+
+
+
+
+
+Details
+
+G3DMatrix
+G3DMatrixtypedef G3DFloat G3DMatrix;
+
+
+Matrix element type.
+
+
+
+
+g3d_matrix_identity ()
+g3d_matrix_identitygboolean 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 ()
+g3d_matrix_multiplygboolean 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 ()
+g3d_matrix_translategboolean 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 ()
+g3d_matrix_rotategboolean 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 ()
+g3d_matrix_rotate_xyzgboolean 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 ()
+g3d_matrix_scalegboolean 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 ()
+g3d_matrix_transposegboolean g3d_matrix_transpose (G3DMatrix *matrix);
+
+Transposes the matrix.
+
+
+
+matrix :
+ the matrix
+
+Returns : TRUE on success, FALSE else
+
+
+
+g3d_matrix_determinant ()
+g3d_matrix_determinantG3DFloat g3d_matrix_determinant (G3DMatrix *matrix);
+
+Calculate the determinant of the matrix (FIXME: not verified).
+
+
+
+matrix :
+ the matrix
+
+Returns : the determinant.
+
+
+
+g3d_matrix_dump ()
+g3d_matrix_dumpgboolean 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/xml/model.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/model.xml
new file mode 100644
index 0000000..1392763
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/model.xml
@@ -0,0 +1,285 @@
+
+
+
+
+model
+3
+LIBG3D Library
+
+
+
+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
+G3D_MODEL_CENTER#define G3D_MODEL_CENTER (1 << 1)
+
+
+The model should be centered around the (0,0,0).
+
+
+
+
+G3D_MODEL_NOCHECK
+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
+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
+G3D_MODEL_SCALE#define G3D_MODEL_SCALE (1 << 0)
+
+
+The model should be scaled to a maximum extension of +/- 10.0.
+
+
+
+
+G3DModel
+G3DModeltypedef 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 ()
+g3d_model_newG3DModel* g3d_model_new (void);
+
+This functions allocates and initializes a new G3DModel.
+
+
+
+Returns : a newly allocated G3DModel
+
+
+
+g3d_model_load ()
+g3d_model_loadG3DModel* 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 ()
+g3d_model_load_fullG3DModel* 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 ()
+g3d_model_checkgboolean 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 ()
+g3d_model_centergboolean 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 ()
+g3d_model_transformgboolean 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 ()
+g3d_model_clearvoid g3d_model_clear (G3DModel *model);
+
+Removes all objects from a model.
+
+
+
+model :
+ the model to clear
+
+
+
+g3d_model_free ()
+g3d_model_freevoid 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 ()
+g3d_model_get_object_by_nameG3DObject* 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/xml/object.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/object.xml
new file mode 100644
index 0000000..5aa5baa
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/object.xml
@@ -0,0 +1,301 @@
+
+
+
+
+object
+3
+LIBG3D Library
+
+
+
+object
+Object manipulation
+
+
+
+
+Synopsis
+
+
+
+#include <g3d/object.h>
+
+ G3DObject;
+ G3DTransformation;
+void g3d_object_free (G3DObject *object);
+gdouble g3d_object_radius (G3DObject *object);
+gboolean g3d_object_scale (G3DObject *object,
+ G3DFloat scale);
+gboolean g3d_object_transform (G3DObject *object,
+ G3DMatrix *matrix);
+gboolean g3d_object_transform_normals (G3DObject *object,
+ G3DMatrix *matrix);
+G3DObject* g3d_object_duplicate (G3DObject *object);
+gboolean g3d_object_optimize (G3DObject *object);
+gboolean g3d_object_smooth (G3DObject *object);
+gboolean g3d_object_merge (G3DObject *o1,
+ G3DObject *o2);
+
+
+
+
+
+
+
+
+
+
+
+
+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
+G3DObjecttypedef 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
+G3DTransformationtypedef 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 ()
+g3d_object_freevoid g3d_object_free (G3DObject *object);
+
+Frees all memory allocated for that object.
+
+
+
+object :
+ the object to free
+
+
+
+g3d_object_radius ()
+g3d_object_radiusgdouble 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 ()
+g3d_object_scalegboolean 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 ()
+g3d_object_transformgboolean 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 ()
+g3d_object_transform_normalsgboolean 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 ()
+g3d_object_duplicateG3DObject* 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 ()
+g3d_object_optimizegboolean 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 ()
+g3d_object_smoothgboolean g3d_object_smooth (G3DObject *object);
+
+FIXME: unimplemented.
+
+
+
+object :
+ the object to smooth
+
+Returns : TRUE on success, FALSE else
+
+
+
+g3d_object_merge ()
+g3d_object_mergegboolean 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/xml/plugins.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/plugins.xml
new file mode 100644
index 0000000..567293e
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/plugins.xml
@@ -0,0 +1,423 @@
+
+
+
+
+plugins
+3
+LIBG3D Library
+
+
+
+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
+G3DPluginTypetypedef 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 ()
+G3DPluginInitFuncgpointer (*G3DPluginInitFunc) (G3DContext *context);
+
+Prototype for plugin_init().
+
+
+
+context :
+ the context
+
+Returns : opaque plugin data.
+
+
+
+G3DPluginCleanupFunc ()
+G3DPluginCleanupFuncvoid (*G3DPluginCleanupFunc) (gpointer user_data);
+
+Prototype for plugin_cleanup().
+
+
+
+user_data :
+ opaque plugin data
+
+
+
+G3DPluginLoadModelFunc ()
+G3DPluginLoadModelFuncgboolean (*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 ()
+G3DPluginLoadModelFromStreamFuncgboolean (*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 ()
+G3DPluginLoadImageFuncgboolean (*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 ()
+G3DPluginLoadImageStreamFuncgboolean (*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 ()
+G3DPluginGetDescFuncgchar* (*G3DPluginGetDescFunc) (G3DContext *context);
+
+Prototype for plugin_description().
+
+
+
+context :
+ the context
+
+Returns : a newly-allocated string containing the description of the plugin.
+
+
+
+G3DPluginGetExtFunc ()
+G3DPluginGetExtFuncgchar** (*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
+G3DPlugintypedef struct {
+} G3DPlugin;
+
+
+A libg3d plugin.
+
+
+
+
+g3d_plugins_init ()
+g3d_plugins_initgboolean 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 ()
+g3d_plugins_cleanupvoid g3d_plugins_cleanup (G3DContext *context);
+
+Clean up the plugin system. Usually done by g3d_context_free().
+
+
+
+context :
+ a valid context
+
+
+
+g3d_plugins_load_model ()
+g3d_plugins_load_modelgboolean 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 ()
+g3d_plugins_load_model_from_streamgboolean 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 ()
+g3d_plugins_load_imagegboolean 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 ()
+g3d_plugins_load_image_from_streamgboolean 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 ()
+g3d_plugins_get_image_extensionsgchar** 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/xml/primitive.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/primitive.xml
new file mode 100644
index 0000000..bb2f8c8
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/primitive.xml
@@ -0,0 +1,302 @@
+
+
+
+
+primitive
+3
+LIBG3D Library
+
+
+
+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 ()
+g3d_primitive_cubeG3DObject* 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 ()
+g3d_primitive_boxG3DObject* 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 ()
+g3d_primitive_box_strip_2dG3DObject* 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 ()
+g3d_primitive_meshG3DObject* 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 ()
+g3d_primitive_cylinderG3DObject* 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 ()
+g3d_primitive_tubeG3DObject* 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 ()
+g3d_primitive_sphereG3DObject* 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/xml/quat.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/quat.xml
new file mode 100644
index 0000000..efb65d4
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/quat.xml
@@ -0,0 +1,220 @@
+
+
+
+
+quat
+3
+LIBG3D Library
+
+
+
+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
+G3DQuattypedef G3DFloat G3DQuat;
+
+
+Quaternion element type.
+
+
+
+
+g3d_quat_add ()
+g3d_quat_addgboolean 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 ()
+g3d_quat_normalizegboolean 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 ()
+g3d_quat_rotategboolean 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 ()
+g3d_quat_to_matrixgboolean 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 ()
+g3d_quat_to_rotation_xyzgboolean 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 ()
+g3d_quat_trackballgboolean 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/xml/read.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/read.xml
new file mode 100644
index 0000000..08f1473
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/read.xml
@@ -0,0 +1,218 @@
+
+
+
+
+read
+3
+LIBG3D Library
+
+
+
+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 ()
+g3d_read_int8gint32 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 ()
+g3d_read_int16_begint32 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 ()
+g3d_read_int16_legint32 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 ()
+g3d_read_int32_begint32 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 ()
+g3d_read_int32_legint32 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 ()
+g3d_read_float_beG3DFloat 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 ()
+g3d_read_float_leG3DFloat 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 ()
+g3d_read_double_beG3DDouble 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 ()
+g3d_read_double_leG3DDouble 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 ()
+g3d_read_cstrgint32 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/xml/stream.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/stream.xml
new file mode 100644
index 0000000..99d7bfb
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/stream.xml
@@ -0,0 +1,801 @@
+
+
+
+
+stream
+3
+LIBG3D Library
+
+
+
+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
+G3DStreamtypedef struct {
+} G3DStream;
+
+
+An abstraction of input handling.
+
+
+
+
+g3d_stream_open_file ()
+g3d_stream_open_fileG3DStream* 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 ()
+g3d_stream_open_structured_fileG3DStream* 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 ()
+g3d_stream_open_structured_file_from_streamG3DStream* 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 ()
+g3d_stream_open_zipG3DStream* 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 ()
+g3d_stream_open_zip_from_streamG3DStream* 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 ()
+g3d_stream_open_gzip_from_streamG3DStream* 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 ()
+g3d_stream_from_bufferG3DStream* 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 ()
+g3d_stream_zlib_inflate_streamG3DStream* 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 ()
+g3d_stream_new_customG3DStream* 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 ()
+g3d_stream_closegint g3d_stream_close (G3DStream *stream);
+
+Closes an open stream.
+
+
+
+stream :
+ the stream
+
+Returns : 0 on success.
+
+
+
+g3d_stream_skip ()
+g3d_stream_skipgint 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 ()
+g3d_stream_seekgint 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 ()
+g3d_stream_tellgoffset 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 ()
+g3d_stream_sizegoffset 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 ()
+g3d_stream_eofgboolean 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 ()
+g3d_stream_is_seekablegboolean 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 ()
+g3d_stream_get_urigchar* 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 ()
+g3d_stream_lineguint32 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 ()
+g3d_stream_readgsize 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 ()
+g3d_stream_read_linegchar* 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 ()
+g3d_stream_read_int8gint32 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 ()
+g3d_stream_read_int16_begint32 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 ()
+g3d_stream_read_int16_legint32 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 ()
+g3d_stream_read_int32_begint32 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 ()
+g3d_stream_read_int32_legint32 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 ()
+g3d_stream_read_float_beG3DFloat 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 ()
+g3d_stream_read_float_leG3DFloat 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 ()
+g3d_stream_read_double_beG3DDouble 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 ()
+g3d_stream_read_double_leG3DDouble 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 ()
+g3d_stream_read_cstrgint32 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 ()
+G3DStreamCloseFuncgint (*G3DStreamCloseFunc) (gpointer data);
+
+Callback function for g3d_stream_close().
+
+
+
+data :
+ opaque stream data
+
+Returns : 0 on success, -1 else.
+
+
+
+G3DStreamEofFunc ()
+G3DStreamEofFuncgboolean (*G3DStreamEofFunc) (gpointer data);
+
+Callback function for g3d_stream_eof().
+
+
+
+data :
+ opaque stream data
+
+Returns : TRUE on stream end-of-file, FALSE else.
+
+
+
+G3DStreamReadFunc ()
+G3DStreamReadFuncgsize (*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 ()
+G3DStreamReadLineFuncgchar* (*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 ()
+G3DStreamSeekFuncgint (*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 ()
+G3DStreamSizeFuncgoffset (*G3DStreamSizeFunc) (gpointer data);
+
+Callback function for g3d_stream_size().
+
+
+
+data :
+ opaque stream data
+
+Returns : size of stream.
+
+
+
+G3DStreamTellFunc ()
+G3DStreamTellFuncgoffset (*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/xml/texture.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/texture.xml
new file mode 100644
index 0000000..7720977
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/texture.xml
@@ -0,0 +1,318 @@
+
+
+
+
+texture
+3
+LIBG3D Library
+
+
+
+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
+G3D_FLAG_IMG_GREYSCALE#define G3D_FLAG_IMG_GREYSCALE (1L << 1)
+
+
+The image just uses the red channel for grey value
+
+
+
+
+enum G3DTexEnv
+G3DTexEnvtypedef 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
+G3DImagetypedef 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 ()
+g3d_texture_load_cachedG3DImage* 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 ()
+g3d_texture_load_from_streamG3DImage* 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 ()
+g3d_texture_loadG3DImage* 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 ()
+g3d_texture_freevoid g3d_texture_free (G3DImage *texture);
+
+Frees all memory used by this texture image.
+
+
+
+texture :
+ a texture image
+
+
+
+g3d_texture_prepare ()
+g3d_texture_preparegboolean 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 ()
+g3d_texture_flip_ygboolean 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 ()
+g3d_texture_merge_alphaG3DImage* 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/xml/types.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/types.xml
new file mode 100644
index 0000000..c12d48b
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/types.xml
@@ -0,0 +1,92 @@
+
+
+
+
+types
+3
+LIBG3D Library
+
+
+
+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
+G3DSingletypedef gfloat G3DSingle;
+
+
+Single-precision floating point number.
+
+
+
+
+G3DDouble
+G3DDoubletypedef gdouble G3DDouble;
+
+
+Double-precision floating point number.
+
+
+
+
+G3DFloat
+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
+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/xml/vector.xml b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/vector.xml
new file mode 100644
index 0000000..d306c67
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/doc/api/xml/vector.xml
@@ -0,0 +1,184 @@
+
+
+
+
+vector
+3
+LIBG3D Library
+
+
+
+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
+G3DVectortypedef G3DFloat G3DVector;
+
+
+Vector element type.
+
+
+
+
+g3d_vector_normal ()
+g3d_vector_normalgboolean 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 ()
+g3d_vector_unifygboolean 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 ()
+g3d_vector_transformgboolean 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
+
+
+
+
+
+
+
+
+
--
cgit v1.1