[ Maverik Level 1 functions ]

#

mav_compositeRead

mav_compositeRead, mav_compositeReadAC3D, mav_compositeReadAC3DBuf, mav_compositeReadVRML97, mav_compositeReadLWO, mav_compositeReadJIF

## Summary

Define a composite object from file.

## Syntax

int mav_compositeRead(char *filename, MAV_composite *c, MAV_matrix m);

int mav_compositeReadAC3D(char *filename, MAV_composite *c, MAV_matrix m);

int mav_compositeReadAC3DBuf(char *buf, MAV_composite *c, MAV_matrix m);

int mav_compositeReadVRML97(char *filename, MAV_composite *c, MAV_matrix m);

int mav_compositeReadLWO(char *filename, MAV_composite *c, MAV_matrix m);

int mav_compositeReadJIF(char *filename, MAV_composite *c, MAV_matrix m);

## Description

These functions parse geometric models, defined in the various formats, from file, `filename`, or buffer, `buf`, storing the model in composite object `c`.

`mav_compositeRead` examines the extension of `filename` and calls the appropriate parser.

If `mav_opt_compositeSetMatrix` is set to `MAV_TRUE` (its default) then the composite object's matrix is set to be the identity matrix by these functions.

The matrices of various objects which make up of the composite object are multiplied by the matrix `m`. This allows for the object's ``default'' (that is, when the composite's matrix is an identity matrix) size, orientation and position to be controlled.

The functions returns `MAV_TRUE` on successfully completion, and `MAV_FALSE` otherwise, with the reason for failure printed to `stdout`.

Notes: VRML97 support is only available if Maverik has been compiled with this option enabled (see INSTALL file). Only the geometry of VRML97 files is read, no attempt is made to parse scripts, URL's, viewpoints etc... Furthermore, not all of the numerous ways in which the geometry can be defined are supported, e.g. concave polygons, colour-per-vertex. JIF is an now-obsolete format used internally within the Advanced Interfaces Group.

Back to the index page.