Top | ![]() |
![]() |
![]() |
![]() |
G3DModel * | g3d_model_new () |
G3DModel * | g3d_model_load () |
G3DModel * | g3d_model_load_full () |
gboolean | g3d_model_check () |
gboolean | g3d_model_center () |
gboolean | g3d_model_transform () |
void | g3d_model_clear () |
void | g3d_model_free () |
G3DObject * | g3d_model_get_object_by_name () |
#define | G3D_MODEL_CENTER |
#define | G3D_MODEL_NOCHECK |
#define | G3D_MODEL_OPTIMIZE |
#define | G3D_MODEL_SCALE |
G3DModel |
A model is a group of objects. All information loaded from a file by libg3d is found in this model.
G3DModel *
g3d_model_new (void
);
This functions allocates and initializes a new G3DModel.
G3DModel * g3d_model_load (G3DContext *context
,const gchar *filename
);
Loads a model from a file. The model is checked, centered, resized, optimized.
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.
gboolean
g3d_model_check (G3DModel *model
);
Checks whether a model returned by plugin is valid.
gboolean
g3d_model_center (G3DModel *model
);
Translates all object coordinates that the object center is at (0, 0, 0)
gboolean g3d_model_transform (G3DModel *model
,G3DMatrix *matrix
);
Transform all toplevel objects in model with matrix.
void
g3d_model_free (G3DModel *model
);
Frees all memory allocated for the model including all objects, materials and textures.
#define G3D_MODEL_NOCHECK (1 << 3)
The common checks should be disabled. The checks include:
#define G3D_MODEL_OPTIMIZE (1 << 2)
The model material/object/face lists should be serialized to some private arrays (deprecated).
#define G3D_MODEL_SCALE (1 << 0)
The model should be scaled to a maximum extension of +/- 10.0.
typedef struct { gchar *filename; GSList *materials; GSList *objects; } G3DModel;
A 3D model.
file name or URI of loaded model, may be set by application |
||
list of materials (G3DMaterial) |
||
list of objects (G3DObject) |