Object Loader. http://www.paulbourke.net/dataformats/obj/.
More...
#include "object.h"
#include "array.h"
#include "camera.h"
#include "gui.h"
#include "log.h"
#include "ndata.h"
Go to the source code of this file.
|
| static void | mesh_create (Mesh **meshes, const char *name, Vertex *corners, int material) |
| |
| static int | readGLfloat (GLfloat *dest, int how_many, char **saveptr) |
| |
| static int | readGLmaterial (GLfloat col[3], char **saveptr) |
| |
| static void | materials_readFromFile (const char *filename, Material **materials) |
| |
| Object * | object_loadFromFile (const char *filename) |
| | Loads object.
|
| |
| void | object_free (Object *object) |
| | Frees memory reserved for the object.
|
| |
| static void | object_renderMesh (const Object *object, int part, GLfloat alpha) |
| |
| void | object_renderSolidPart (const Object *object, const Solid *solid, const char *part_name, GLfloat alpha, double scale) |
| |
◆ DELIM
◆ NAEV_ORTHO_DIST
| #define NAEV_ORTHO_DIST 9.*M_SQRT |
Distance from camera to origin in the Blender script
Definition at line 30 of file object.c.
◆ NAEV_ORTHO_SCALE
| #define NAEV_ORTHO_SCALE 10. |
The cam.ortho_scale defined in the Blender script
Definition at line 29 of file object.c.
◆ materials_readFromFile()
| static void materials_readFromFile |
( |
const char * | filename, |
|
|
Material ** | materials ) |
|
static |
◆ mesh_create()
| static void mesh_create |
( |
Mesh ** | meshes, |
|
|
const char * | name, |
|
|
Vertex * | corners, |
|
|
int | material ) |
|
static |
◆ object_free()
| void object_free |
( |
Object * | object | ) |
|
Frees memory reserved for the object.
Definition at line 354 of file object.c.
◆ object_loadFromFile()
| Object * object_loadFromFile |
( |
const char * | filename | ) |
|
◆ object_renderMesh()
| static void object_renderMesh |
( |
const Object * | object, |
|
|
int | part, |
|
|
GLfloat | alpha ) |
|
static |
◆ object_renderSolidPart()
| void object_renderSolidPart |
( |
const Object * | object, |
|
|
const Solid * | solid, |
|
|
const char * | part_name, |
|
|
GLfloat | alpha, |
|
|
double | scale ) |
◆ readGLfloat()
| static int readGLfloat |
( |
GLfloat * | dest, |
|
|
int | how_many, |
|
|
char ** | saveptr ) |
|
static |
◆ readGLmaterial()
| static int readGLmaterial |
( |
GLfloat | col[3], |
|
|
char ** | saveptr ) |
|
static |
◆ emptyTextureRefs
| unsigned int emptyTextureRefs = 0 |
|
static |
◆ oneTexture
◆ zeroTexture