| Top |
| #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);
calculates the normal of a face.
#define G3D_FLAG_MAT_TWOSIDE (1L << 0)
Faces using this material should be rendered two-sided as the direction is unknown.
#define G3D_FLAG_FAC_TEXMAP (1L << 1)
The face has a texture map and texture coordinates.
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.
number of vertices |
||
indices of vertices in G3DObject |
||
G3DMaterial * |
material to use for surface |
|
flags |
||
G3DVector * |
optional normal array (one vector - 3 G3DVector values - for each vertex) |
|
G3DImage * |
optional texture image |
|
number of texture vertices, should be 0 or match vertex_count |
||
G3DVector * |
array of texture vertices |