zenilib: zenilib/jni/external/lib3ds/src/lib3ds_impl.h File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Macros | Typedefs | Enumerations | Functions
lib3ds_impl.h File Reference
`#include "lib3ds.h"`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <stdarg.h>`
`#include <string.h>`
`#include <math.h>`
`#include <float.h>`
`#include <assert.h>`
`#include <setjmp.h>`
`#include <stdint.h>`

Go to the source code of this file.

## Classes

struct | Lib3dsChunk
struct | Lib3dsIoImpl

## Macros

#define | FALSE 0
#define | LIB3DS_DEG_TO_RAD(x) ((LIB3DS_PI/180.0)*(x))
#define | LIB3DS_EPSILON (1e-5)
#define | LIB3DS_HALFPI (LIB3DS_PI/2.0)
#define | LIB3DS_PI 3.14159265358979323846
#define | LIB3DS_RAD_TO_DEG(x) ((180.0/LIB3DS_PI)*(x))
#define | LIB3DS_TWOPI (2.0*LIB3DS_PI)
#define | TRUE 1

## Typedefs

typedef struct Lib3dsChunk | Lib3dsChunk
typedef enum Lib3dsChunks | Lib3dsChunks
typedef void(* | Lib3dsFreeFunc )(void *ptr)
typedef struct Lib3dsIoImpl | Lib3dsIoImpl

## Enumerations

enum

Lib3dsChunks {
CHK_NULL_CHUNK =0x0000, CHK_M3DMAGIC =0x4D4D, CHK_SMAGIC =0x2D2D, CHK_LMAGIC =0x2D3D,
CHK_MLIBMAGIC =0x3DAA, CHK_MATMAGIC =0x3DFF, CHK_CMAGIC =0xC23D, CHK_M3D_VERSION =0x0002,
CHK_M3D_KFVERSION =0x0005, CHK_COLOR_F =0x0010, CHK_COLOR_24 =0x0011, CHK_LIN_COLOR_24 =0x0012,
CHK_LIN_COLOR_F =0x0013, CHK_INT_PERCENTAGE =0x0030, CHK_FLOAT_PERCENTAGE =0x0031, CHK_MDATA =0x3D3D,
CHK_MESH_VERSION =0x3D3E, CHK_MASTER_SCALE =0x0100, CHK_LO_SHADOW_BIAS =0x1400, CHK_HI_SHADOW_BIAS =0x1410,
CHK_SHADOW_MAP_SIZE =0x1420, CHK_SHADOW_SAMPLES =0x1430, CHK_SHADOW_RANGE =0x1440, CHK_SHADOW_FILTER =0x1450,
CHK_RAY_BIAS =0x1460, CHK_O_CONSTS =0x1500, CHK_AMBIENT_LIGHT =0x2100, CHK_BIT_MAP =0x1100,
CHK_SOLID_BGND =0x1200, CHK_V_GRADIENT =0x1300, CHK_USE_BIT_MAP =0x1101, CHK_USE_SOLID_BGND =0x1201,
CHK_USE_V_GRADIENT =0x1301, CHK_FOG =0x2200, CHK_FOG_BGND =0x2210, CHK_LAYER_FOG =0x2302,
CHK_DISTANCE_CUE =0x2300, CHK_DCUE_BGND =0x2310, CHK_USE_FOG =0x2201, CHK_USE_LAYER_FOG =0x2303,
CHK_USE_DISTANCE_CUE =0x2301, CHK_MAT_ENTRY =0xAFFF, CHK_MAT_NAME =0xA000, CHK_MAT_AMBIENT =0xA010,
CHK_MAT_DIFFUSE =0xA020, CHK_MAT_SPECULAR =0xA030, CHK_MAT_SHININESS =0xA040, CHK_MAT_SHIN2PCT =0xA041,
CHK_MAT_TRANSPARENCY =0xA050, CHK_MAT_XPFALL =0xA052, CHK_MAT_USE_XPFALL =0xA240, CHK_MAT_REFBLUR =0xA053,
CHK_MAT_SHADING =0xA100, CHK_MAT_USE_REFBLUR =0xA250, CHK_MAT_SELF_ILLUM =0xA080, CHK_MAT_TWO_SIDE =0xA081,
CHK_MAT_DECAL =0xA082, CHK_MAT_ADDITIVE =0xA083, CHK_MAT_SELF_ILPCT =0xA084, CHK_MAT_WIRE =0xA085,
CHK_MAT_FACEMAP =0xA088, CHK_MAT_PHONGSOFT =0xA08C, CHK_MAT_WIREABS =0xA08E, CHK_MAT_WIRE_SIZE =0xA087,
CHK_MAT_TEXMAP =0xA200, CHK_MAT_SXP_TEXT_DATA =0xA320, CHK_MAT_TEXMASK =0xA33E, CHK_MAT_SXP_TEXTMASK_DATA =0xA32A,
CHK_MAT_TEX2MAP =0xA33A, CHK_MAT_SXP_TEXT2_DATA =0xA321, CHK_MAT_TEX2MASK =0xA340, CHK_MAT_SXP_TEXT2MASK_DATA =0xA32C,
CHK_MAT_OPACMAP =0xA210, CHK_MAT_SXP_OPAC_DATA =0xA322, CHK_MAT_OPACMASK =0xA342, CHK_MAT_SXP_OPACMASK_DATA =0xA32E,
CHK_MAT_BUMPMAP =0xA230, CHK_MAT_SXP_BUMP_DATA =0xA324, CHK_MAT_BUMPMASK =0xA344, CHK_MAT_SXP_BUMPMASK_DATA =0xA330,
CHK_MAT_SPECMAP =0xA204, CHK_MAT_SXP_SPEC_DATA =0xA325, CHK_MAT_SPECMASK =0xA348, CHK_MAT_SXP_SPECMASK_DATA =0xA332,
CHK_MAT_SHINMAP =0xA33C, CHK_MAT_SXP_SHIN_DATA =0xA326, CHK_MAT_SHINMASK =0xA346, CHK_MAT_SXP_SHINMASK_DATA =0xA334,
CHK_MAT_SELFIMAP =0xA33D, CHK_MAT_SXP_SELFI_DATA =0xA328, CHK_MAT_SELFIMASK =0xA34A, CHK_MAT_SXP_SELFIMASK_DATA =0xA336,
CHK_MAT_REFLMAP =0xA220, CHK_MAT_REFLMASK =0xA34C, CHK_MAT_SXP_REFLMASK_DATA =0xA338, CHK_MAT_ACUBIC =0xA310,
CHK_MAT_MAPNAME =0xA300, CHK_MAT_MAP_TILING =0xA351, CHK_MAT_MAP_TEXBLUR =0xA353, CHK_MAT_MAP_USCALE =0xA354,
CHK_MAT_MAP_VSCALE =0xA356, CHK_MAT_MAP_UOFFSET =0xA358, CHK_MAT_MAP_VOFFSET =0xA35A, CHK_MAT_MAP_ANG =0xA35C,
CHK_MAT_MAP_COL1 =0xA360, CHK_MAT_MAP_COL2 =0xA362, CHK_MAT_MAP_RCOL =0xA364, CHK_MAT_MAP_GCOL =0xA366,
CHK_MAT_MAP_BCOL =0xA368, CHK_NAMED_OBJECT =0x4000, CHK_N_DIRECT_LIGHT =0x4600, CHK_DL_OFF =0x4620,
CHK_DL_OUTER_RANGE =0x465A, CHK_DL_INNER_RANGE =0x4659, CHK_DL_MULTIPLIER =0x465B, CHK_DL_EXCLUDE =0x4654,
CHK_DL_ATTENUATE =0x4625, CHK_DL_SPOTLIGHT =0x4610, CHK_DL_SPOT_ROLL =0x4656, CHK_DL_SHADOWED =0x4630,
CHK_DL_LOCAL_SHADOW2 =0x4641, CHK_DL_SEE_CONE =0x4650, CHK_DL_SPOT_RECTANGULAR =0x4651, CHK_DL_SPOT_ASPECT =0x4657,
CHK_DL_SPOT_PROJECTOR =0x4653, CHK_DL_SPOT_OVERSHOOT =0x4652, CHK_DL_RAY_BIAS =0x4658, CHK_DL_RAYSHAD =0x4627,
CHK_N_CAMERA =0x4700, CHK_CAM_SEE_CONE =0x4710, CHK_CAM_RANGES =0x4720, CHK_OBJ_HIDDEN =0x4010,
CHK_OBJ_VIS_LOFTER =0x4011, CHK_OBJ_DOESNT_CAST =0x4012, CHK_OBJ_DONT_RCVSHADOW =0x4017, CHK_OBJ_MATTE =0x4013,
CHK_OBJ_FAST =0x4014, CHK_OBJ_PROCEDURAL =0x4015, CHK_OBJ_FROZEN =0x4016, CHK_N_TRI_OBJECT =0x4100,
CHK_POINT_ARRAY =0x4110, CHK_POINT_FLAG_ARRAY =0x4111, CHK_FACE_ARRAY =0x4120, CHK_MSH_MAT_GROUP =0x4130,
CHK_SMOOTH_GROUP =0x4150, CHK_MSH_BOXMAP =0x4190, CHK_TEX_VERTS =0x4140, CHK_MESH_MATRIX =0x4160,
CHK_MESH_COLOR =0x4165, CHK_MESH_TEXTURE_INFO =0x4170, CHK_KFDATA =0xB000, CHK_KFHDR =0xB00A,
CHK_KFSEG =0xB008, CHK_KFCURTIME =0xB009, CHK_AMBIENT_NODE_TAG =0xB001, CHK_OBJECT_NODE_TAG =0xB002,
CHK_CAMERA_NODE_TAG =0xB003, CHK_TARGET_NODE_TAG =0xB004, CHK_LIGHT_NODE_TAG =0xB005, CHK_L_TARGET_NODE_TAG =0xB006,
CHK_SPOTLIGHT_NODE_TAG =0xB007, CHK_NODE_ID =0xB030, CHK_NODE_HDR =0xB010, CHK_PIVOT =0xB013,
CHK_INSTANCE_NAME =0xB011, CHK_MORPH_SMOOTH =0xB015, CHK_BOUNDBOX =0xB014, CHK_POS_TRACK_TAG =0xB020,
CHK_COL_TRACK_TAG =0xB025, CHK_ROT_TRACK_TAG =0xB021, CHK_SCL_TRACK_TAG =0xB022, CHK_MORPH_TRACK_TAG =0xB026,
CHK_FOV_TRACK_TAG =0xB023, CHK_ROLL_TRACK_TAG =0xB024, CHK_HOT_TRACK_TAG =0xB027, CHK_FALL_TRACK_TAG =0xB028,
CHK_HIDE_TRACK_TAG =0xB029, CHK_POLY_2D = 0x5000, CHK_SHAPE_OK = 0x5010, CHK_SHAPE_NOT_OK = 0x5011,
CHK_SHAPE_HOOK = 0x5020, CHK_PATH_3D = 0x6000, CHK_PATH_MATRIX = 0x6005, CHK_SHAPE_2D = 0x6010,
CHK_M_SCALE = 0x6020, CHK_M_TWIST = 0x6030, CHK_M_TEETER = 0x6040, CHK_M_FIT = 0x6050,
CHK_M_BEVEL = 0x6060, CHK_XZ_CURVE = 0x6070, CHK_YZ_CURVE = 0x6080, CHK_INTERPCT = 0x6090,
CHK_DEFORM_LIMIT = 0x60A0, CHK_USE_CONTOUR = 0x6100, CHK_USE_TWEEN = 0x6110, CHK_USE_SCALE = 0x6120,
CHK_USE_TWIST = 0x6130, CHK_USE_TEETER = 0x6140, CHK_USE_FIT = 0x6150, CHK_USE_BEVEL = 0x6160,
CHK_DEFAULT_VIEW = 0x3000, CHK_VIEW_TOP = 0x3010, CHK_VIEW_BOTTOM = 0x3020, CHK_VIEW_LEFT = 0x3030,
CHK_VIEW_RIGHT = 0x3040, CHK_VIEW_FRONT = 0x3050, CHK_VIEW_BACK = 0x3060, CHK_VIEW_USER = 0x3070,
CHK_VIEW_CAMERA = 0x3080, CHK_VIEW_WINDOW = 0x3090, CHK_VIEWPORT_LAYOUT_OLD = 0x7000, CHK_VIEWPORT_DATA_OLD = 0x7010,
CHK_VIEWPORT_LAYOUT = 0x7001, CHK_VIEWPORT_DATA = 0x7011, CHK_VIEWPORT_DATA_3 = 0x7012, CHK_VIEWPORT_SIZE = 0x7020,
CHK_NETWORK_VIEW = 0x7030
}

## Functions

void | lib3ds_atmosphere_read (Lib3dsAtmosphere *atmosphere, Lib3dsIo *io)
void | lib3ds_atmosphere_write (Lib3dsAtmosphere *atmosphere, Lib3dsIo *io)
void | lib3ds_background_read (Lib3dsBackground *background, Lib3dsIo *io)
void | lib3ds_background_write (Lib3dsBackground *background, Lib3dsIo *io)
void | lib3ds_camera_read (Lib3dsCamera *camera, Lib3dsIo *io)
void | lib3ds_camera_write (Lib3dsCamera *camera, Lib3dsIo *io)
const char * | lib3ds_chunk_name (uint16_t chunk)
void | lib3ds_chunk_read (Lib3dsChunk *c, Lib3dsIo *io)
void | lib3ds_chunk_read_end (Lib3dsChunk *c, Lib3dsIo *io)
uint16_t | lib3ds_chunk_read_next (Lib3dsChunk *c, Lib3dsIo *io)
void | lib3ds_chunk_read_reset (Lib3dsChunk *c, Lib3dsIo *io)
void | lib3ds_chunk_read_start (Lib3dsChunk *c, uint16_t chunk, Lib3dsIo *io)
void | lib3ds_chunk_read_tell (Lib3dsChunk *c, Lib3dsIo *io)
void | lib3ds_chunk_unknown (uint16_t chunk, Lib3dsIo *io)
void | lib3ds_chunk_write (Lib3dsChunk *c, Lib3dsIo *io)
void | lib3ds_chunk_write_end (Lib3dsChunk *c, Lib3dsIo *io)
void | lib3ds_chunk_write_start (Lib3dsChunk *c, Lib3dsIo *io)
void | lib3ds_io_cleanup (Lib3dsIo *io)
void | lib3ds_io_log (Lib3dsIo *io, Lib3dsLogLevel level, const char *format,...)
void | lib3ds_io_log_indent (Lib3dsIo *io, int indent)
size_t | lib3ds_io_read (Lib3dsIo *io, void *buffer, size_t size)
uint8_t | lib3ds_io_read_byte (Lib3dsIo *io)
uint32_t | lib3ds_io_read_dword (Lib3dsIo *io)
void | lib3ds_io_read_error (Lib3dsIo *io)
float | lib3ds_io_read_float (Lib3dsIo *io)
int8_t | lib3ds_io_read_intb (Lib3dsIo *io)
int32_t | lib3ds_io_read_intd (Lib3dsIo *io)
int16_t | lib3ds_io_read_intw (Lib3dsIo *io)
void | lib3ds_io_read_rgb (Lib3dsIo *io, float rgb[3])
void | lib3ds_io_read_string (Lib3dsIo *io, char *s, int buflen)
void | lib3ds_io_read_vector (Lib3dsIo *io, float v[3])
uint16_t | lib3ds_io_read_word (Lib3dsIo *io)
long | lib3ds_io_seek (Lib3dsIo *io, long offset, Lib3dsIoSeek origin)
void | lib3ds_io_setup (Lib3dsIo *io)
long | lib3ds_io_tell (Lib3dsIo *io)
size_t | lib3ds_io_write (Lib3dsIo *io, const void *buffer, size_t size)
void | lib3ds_io_write_byte (Lib3dsIo *io, uint8_t b)
void | lib3ds_io_write_dword (Lib3dsIo *io, uint32_t d)
void | lib3ds_io_write_error (Lib3dsIo *io)
void | lib3ds_io_write_float (Lib3dsIo *io, float l)
void | lib3ds_io_write_intb (Lib3dsIo *io, int8_t b)
void | lib3ds_io_write_intd (Lib3dsIo *io, int32_t d)
void | lib3ds_io_write_intw (Lib3dsIo *io, int16_t w)
void | lib3ds_io_write_rgb (Lib3dsIo *io, float rgb[3])
void | lib3ds_io_write_string (Lib3dsIo *io, const char *s)
void | lib3ds_io_write_vector (Lib3dsIo *io, float v[3])
void | lib3ds_io_write_word (Lib3dsIo *io, uint16_t w)
void | lib3ds_light_read (Lib3dsLight *light, Lib3dsIo *io)
void | lib3ds_light_write (Lib3dsLight *light, Lib3dsIo *io)
void | lib3ds_material_read (Lib3dsMaterial *material, Lib3dsIo *io)
void | lib3ds_material_write (Lib3dsMaterial *material, Lib3dsIo *io)
void | lib3ds_mesh_read (Lib3dsFile *file, Lib3dsMesh *mesh, Lib3dsIo *io)
void | lib3ds_mesh_write (Lib3dsFile *file, Lib3dsMesh *mesh, Lib3dsIo *io)
void | lib3ds_node_read (Lib3dsNode *node, Lib3dsIo *io)
void | lib3ds_node_write (Lib3dsNode *node, uint16_t node_id, uint16_t parent_id, Lib3dsIo *io)
void | lib3ds_shadow_read (Lib3dsShadow *shadow, Lib3dsIo *io)
void | lib3ds_shadow_write (Lib3dsShadow *shadow, Lib3dsIo *io)
void | lib3ds_track_read (Lib3dsTrack *track, Lib3dsIo *io)
void | lib3ds_track_write (Lib3dsTrack *track, Lib3dsIo *io)
void | lib3ds_util_insert_array (void ***ptr, int *n, int *size, void *element, int index)
void * | lib3ds_util_realloc_array (void *ptr, int old_size, int new_size, int element_size)
void | lib3ds_util_remove_array (void ***ptr, int *n, int index, Lib3dsFreeFunc free_func)
void | lib3ds_util_reserve_array (void ***ptr, int *n, int *size, int new_size, int force, Lib3dsFreeFunc free_func)
void | lib3ds_viewport_read (Lib3dsViewport *viewport, Lib3dsIo *io)
void | lib3ds_viewport_write (Lib3dsViewport *viewport, Lib3dsIo *io)

## Macro Definition Documentation

#define FALSE 0

Definition at line 52 of file lib3ds_impl.h.

#define LIB3DS_DEG_TO_RAD | ( |  | x | ) | ((LIB3DS_PI/180.0)*(x))

Definition at line 60 of file lib3ds_impl.h.

#define LIB3DS_EPSILON (1e-5)

Definition at line 55 of file lib3ds_impl.h.

Referenced by colorf_defined(), lib3ds_camera_read(), lib3ds_camera_write(), lib3ds_light_write(), lib3ds_matrix_inv(), lib3ds_matrix_rotate_quat(), lib3ds_node_write(), lib3ds_quat_axis_angle(), lib3ds_quat_exp(), lib3ds_quat_inv(), lib3ds_quat_ln(), lib3ds_quat_normalize(), lib3ds_quat_slerp(), lib3ds_shadow_write(), lib3ds_vector_normalize(), mdata_write(), and rot_key_setup().

#define LIB3DS_HALFPI (LIB3DS_PI/2.0)

Definition at line 58 of file lib3ds_impl.h.

#define LIB3DS_PI 3.14159265358979323846

Definition at line 56 of file lib3ds_impl.h.

#define LIB3DS_RAD_TO_DEG | ( |  | x | ) | ((180.0/LIB3DS_PI)*(x))

Definition at line 59 of file lib3ds_impl.h.

#define LIB3DS_TWOPI (2.0*LIB3DS_PI)

Definition at line 57 of file lib3ds_impl.h.

Referenced by rot_key_setup().

#define TRUE 1

Definition at line 49 of file lib3ds_impl.h.

## Typedef Documentation

typedef struct Lib3dsChunk Lib3dsChunk

typedef enum Lib3dsChunks Lib3dsChunks

typedef void(* Lib3dsFreeFunc)(void *ptr)

Definition at line 376 of file lib3ds_impl.h.

typedef struct Lib3dsIoImpl Lib3dsIoImpl

## Enumeration Type Documentation

enum Lib3dsChunks

Enumerator
CHK_NULL_CHUNK |
CHK_M3DMAGIC |
CHK_SMAGIC |
CHK_LMAGIC |
CHK_MLIBMAGIC |
CHK_MATMAGIC |
CHK_CMAGIC |
CHK_M3D_VERSION |
CHK_M3D_KFVERSION |
CHK_COLOR_F |
CHK_COLOR_24 |
CHK_LIN_COLOR_24 |
CHK_LIN_COLOR_F |
CHK_INT_PERCENTAGE |
CHK_FLOAT_PERCENTAGE |
CHK_MDATA |
CHK_MESH_VERSION |
CHK_MASTER_SCALE |
CHK_LO_SHADOW_BIAS |
CHK_HI_SHADOW_BIAS |
CHK_SHADOW_MAP_SIZE |
CHK_SHADOW_SAMPLES |
CHK_SHADOW_RANGE |
CHK_SHADOW_FILTER |
CHK_RAY_BIAS |
CHK_O_CONSTS |
CHK_AMBIENT_LIGHT |
CHK_BIT_MAP |
CHK_SOLID_BGND |
CHK_V_GRADIENT |
CHK_USE_BIT_MAP |
CHK_USE_SOLID_BGND |
CHK_USE_V_GRADIENT |
CHK_FOG |
CHK_FOG_BGND |
CHK_LAYER_FOG |
CHK_DISTANCE_CUE |
CHK_DCUE_BGND |
CHK_USE_FOG |
CHK_USE_LAYER_FOG |
CHK_USE_DISTANCE_CUE |
CHK_MAT_ENTRY |
CHK_MAT_NAME |
CHK_MAT_AMBIENT |
CHK_MAT_DIFFUSE |
CHK_MAT_SPECULAR |
CHK_MAT_SHININESS |
CHK_MAT_SHIN2PCT |
CHK_MAT_TRANSPARENCY |
CHK_MAT_XPFALL |
CHK_MAT_USE_XPFALL |
CHK_MAT_REFBLUR |
CHK_MAT_SHADING |
CHK_MAT_USE_REFBLUR |
CHK_MAT_SELF_ILLUM |
CHK_MAT_TWO_SIDE |
CHK_MAT_DECAL |
CHK_MAT_ADDITIVE |
CHK_MAT_SELF_ILPCT |
CHK_MAT_WIRE |
CHK_MAT_FACEMAP |
CHK_MAT_PHONGSOFT |
CHK_MAT_WIREABS |
CHK_MAT_WIRE_SIZE |
CHK_MAT_TEXMAP |
CHK_MAT_SXP_TEXT_DATA |
CHK_MAT_TEXMASK |
CHK_MAT_SXP_TEXTMASK_DATA |
CHK_MAT_TEX2MAP |
CHK_MAT_SXP_TEXT2_DATA |
CHK_MAT_TEX2MASK |
CHK_MAT_SXP_TEXT2MASK_DATA |
CHK_MAT_OPACMAP |
CHK_MAT_SXP_OPAC_DATA |
CHK_MAT_OPACMASK |
CHK_MAT_SXP_OPACMASK_DATA |
CHK_MAT_BUMPMAP |
CHK_MAT_SXP_BUMP_DATA |
CHK_MAT_BUMPMASK |
CHK_MAT_SXP_BUMPMASK_DATA |
CHK_MAT_SPECMAP |
CHK_MAT_SXP_SPEC_DATA |
CHK_MAT_SPECMASK |
CHK_MAT_SXP_SPECMASK_DATA |
CHK_MAT_SHINMAP |
CHK_MAT_SXP_SHIN_DATA |
CHK_MAT_SHINMASK |
CHK_MAT_SXP_SHINMASK_DATA |
CHK_MAT_SELFIMAP |
CHK_MAT_SXP_SELFI_DATA |
CHK_MAT_SELFIMASK |
CHK_MAT_SXP_SELFIMASK_DATA |
CHK_MAT_REFLMAP |
CHK_MAT_REFLMASK |
CHK_MAT_SXP_REFLMASK_DATA |
CHK_MAT_ACUBIC |
CHK_MAT_MAPNAME |
CHK_MAT_MAP_TILING |
CHK_MAT_MAP_TEXBLUR |
CHK_MAT_MAP_USCALE |
CHK_MAT_MAP_VSCALE |
CHK_MAT_MAP_UOFFSET |
CHK_MAT_MAP_VOFFSET |
CHK_MAT_MAP_ANG |
CHK_MAT_MAP_COL1 |
CHK_MAT_MAP_COL2 |
CHK_MAT_MAP_RCOL |
CHK_MAT_MAP_GCOL |
CHK_MAT_MAP_BCOL |
CHK_NAMED_OBJECT |
CHK_N_DIRECT_LIGHT |
CHK_DL_OFF |
CHK_DL_OUTER_RANGE |
CHK_DL_INNER_RANGE |
CHK_DL_MULTIPLIER |
CHK_DL_EXCLUDE |
CHK_DL_ATTENUATE |
CHK_DL_SPOTLIGHT |
CHK_DL_SPOT_ROLL |
CHK_DL_SHADOWED |
CHK_DL_LOCAL_SHADOW2 |
CHK_DL_SEE_CONE |
CHK_DL_SPOT_RECTANGULAR |
CHK_DL_SPOT_ASPECT |
CHK_DL_SPOT_PROJECTOR |
CHK_DL_SPOT_OVERSHOOT |
CHK_DL_RAY_BIAS |
CHK_DL_RAYSHAD |
CHK_N_CAMERA |
CHK_CAM_SEE_CONE |
CHK_CAM_RANGES |
CHK_OBJ_HIDDEN |
CHK_OBJ_VIS_LOFTER |
CHK_OBJ_DOESNT_CAST |
CHK_OBJ_DONT_RCVSHADOW |
CHK_OBJ_MATTE |
CHK_OBJ_FAST |
CHK_OBJ_PROCEDURAL |
CHK_OBJ_FROZEN |
CHK_N_TRI_OBJECT |
CHK_POINT_ARRAY |
CHK_POINT_FLAG_ARRAY |
CHK_FACE_ARRAY |
CHK_MSH_MAT_GROUP |
CHK_SMOOTH_GROUP |
CHK_MSH_BOXMAP |
CHK_TEX_VERTS |
CHK_MESH_MATRIX |
CHK_MESH_COLOR |
CHK_MESH_TEXTURE_INFO |
CHK_KFDATA |
CHK_KFHDR |
CHK_KFSEG |
CHK_KFCURTIME |
CHK_AMBIENT_NODE_TAG |
CHK_OBJECT_NODE_TAG |
CHK_CAMERA_NODE_TAG |
CHK_TARGET_NODE_TAG |
CHK_LIGHT_NODE_TAG |
CHK_L_TARGET_NODE_TAG |
CHK_SPOTLIGHT_NODE_TAG |
CHK_NODE_ID |
CHK_NODE_HDR |
CHK_PIVOT |
CHK_INSTANCE_NAME |
CHK_MORPH_SMOOTH |
CHK_BOUNDBOX |
CHK_POS_TRACK_TAG |
CHK_COL_TRACK_TAG |
CHK_ROT_TRACK_TAG |
CHK_SCL_TRACK_TAG |
CHK_MORPH_TRACK_TAG |
CHK_FOV_TRACK_TAG |
CHK_ROLL_TRACK_TAG |
CHK_HOT_TRACK_TAG |
CHK_FALL_TRACK_TAG |
CHK_HIDE_TRACK_TAG |
CHK_POLY_2D |
CHK_SHAPE_OK |
CHK_SHAPE_NOT_OK |
CHK_SHAPE_HOOK |
CHK_PATH_3D |
CHK_PATH_MATRIX |
CHK_SHAPE_2D |
CHK_M_SCALE |
CHK_M_TWIST |
CHK_M_TEETER |
CHK_M_FIT |
CHK_M_BEVEL |
CHK_XZ_CURVE |
CHK_YZ_CURVE |
CHK_INTERPCT |
CHK_DEFORM_LIMIT |
CHK_USE_CONTOUR |
CHK_USE_TWEEN |
CHK_USE_SCALE |
CHK_USE_TWIST |
CHK_USE_TEETER |
CHK_USE_FIT |
CHK_USE_BEVEL |
CHK_DEFAULT_VIEW |
CHK_VIEW_TOP |
CHK_VIEW_BOTTOM |
CHK_VIEW_LEFT |
CHK_VIEW_RIGHT |
CHK_VIEW_FRONT |
CHK_VIEW_BACK |
CHK_VIEW_USER |
CHK_VIEW_CAMERA |
CHK_VIEW_WINDOW |
CHK_VIEWPORT_LAYOUT_OLD |
CHK_VIEWPORT_DATA_OLD |
CHK_VIEWPORT_LAYOUT |
CHK_VIEWPORT_DATA |
CHK_VIEWPORT_DATA_3 |
CHK_VIEWPORT_SIZE |
CHK_NETWORK_VIEW |

Definition at line 66 of file lib3ds_impl.h.

## Function Documentation

void lib3ds_atmosphere_read | ( | Lib3dsAtmosphere * | atmosphere,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 125 of file lib3ds_atmosphere.c.

References CHK_DISTANCE_CUE, CHK_FOG, CHK_LAYER_FOG, CHK_USE_DISTANCE_CUE, CHK_USE_FOG, CHK_USE_LAYER_FOG, Lib3dsChunk::chunk, distance_cue_read(), fog_read(), layer_fog_read(), lib3ds_chunk_read(), lib3ds_chunk_read_reset(), TRUE, Lib3dsAtmosphere::use_dist_cue, Lib3dsAtmosphere::use_fog, and Lib3dsAtmosphere::use_layer_fog.

Referenced by mdata_read().

void lib3ds_atmosphere_write | ( | Lib3dsAtmosphere * | atmosphere,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 167 of file lib3ds_atmosphere.c.

References CHK_COLOR_F, CHK_DCUE_BGND, CHK_DISTANCE_CUE, CHK_FOG, CHK_FOG_BGND, CHK_LAYER_FOG, CHK_USE_FOG, CHK_USE_LAYER_FOG, CHK_USE_V_GRADIENT, Lib3dsChunk::chunk, Lib3dsAtmosphere::dist_cue_background, Lib3dsAtmosphere::dist_cue_far_dimming, Lib3dsAtmosphere::dist_cue_far_plane, Lib3dsAtmosphere::dist_cue_near_dimming, Lib3dsAtmosphere::dist_cue_near_plane, Lib3dsAtmosphere::fog_background, Lib3dsAtmosphere::fog_color, Lib3dsAtmosphere::fog_far_density, Lib3dsAtmosphere::fog_far_plane, Lib3dsAtmosphere::fog_near_density, Lib3dsAtmosphere::fog_near_plane, Lib3dsAtmosphere::layer_fog_far_y, Lib3dsAtmosphere::layer_fog_flags, Lib3dsAtmosphere::layer_fog_near_y, lib3ds_chunk_write(), lib3ds_chunk_write_end(), lib3ds_chunk_write_start(), lib3ds_io_write_dword(), lib3ds_io_write_float(), lib3ds_io_write_rgb(), Lib3dsChunk::size, Lib3dsAtmosphere::use_dist_cue, Lib3dsAtmosphere::use_fog, and Lib3dsAtmosphere::use_layer_fog.

Referenced by mdata_write().

void lib3ds_background_read | ( | Lib3dsBackground * | background,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 93 of file lib3ds_background.c.

References Lib3dsBackground::bitmap_name, CHK_BIT_MAP, CHK_SOLID_BGND, CHK_USE_BIT_MAP, CHK_USE_SOLID_BGND, CHK_USE_V_GRADIENT, CHK_V_GRADIENT, Lib3dsChunk::chunk, lib3ds_chunk_read(), lib3ds_chunk_read_reset(), lib3ds_io_read_string(), solid_bgnd_read(), TRUE, Lib3dsBackground::use_bitmap, Lib3dsBackground::use_gradient, Lib3dsBackground::use_solid, and v_gradient_read().

Referenced by mdata_read().

void lib3ds_background_write | ( | Lib3dsBackground * | background,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 162 of file lib3ds_background.c.

References Lib3dsBackground::bitmap_name, CHK_BIT_MAP, CHK_SOLID_BGND, CHK_USE_BIT_MAP, CHK_USE_SOLID_BGND, CHK_USE_V_GRADIENT, CHK_V_GRADIENT, Lib3dsChunk::chunk, colorf_defined(), colorf_write(), Lib3dsBackground::gradient_bottom, Lib3dsBackground::gradient_middle, Lib3dsBackground::gradient_percent, Lib3dsBackground::gradient_top, lib3ds_chunk_write(), lib3ds_io_write_float(), lib3ds_io_write_string(), Lib3dsChunk::size, Lib3dsBackground::solid_color, Lib3dsBackground::use_bitmap, Lib3dsBackground::use_gradient, and Lib3dsBackground::use_solid.

Referenced by mdata_write().

void lib3ds_camera_read | ( | Lib3dsCamera * | camera,
|  | Lib3dsIo * | io
| ) |  |

Read a camera definition from a file.

This function is called by lib3ds_file_read(), and you probably don't want to call it directly.

Parameters

  camera | A Lib3dsCamera to be filled in.
  io | A Lib3dsIo object previously set up by the caller.

See Also
  lib3ds_file_read

Definition at line 72 of file lib3ds_camera.c.

References CHK_CAM_RANGES, CHK_CAM_SEE_CONE, CHK_N_CAMERA, chunk, fabs(), Lib3dsCamera::far_range, Lib3dsCamera::fov, i, lib3ds_chunk_read_end(), lib3ds_chunk_read_next(), lib3ds_chunk_read_start(), lib3ds_chunk_read_tell(), lib3ds_chunk_unknown(), LIB3DS_EPSILON, lib3ds_io_read_float(), Lib3dsCamera::near_range, Lib3dsCamera::position, Lib3dsCamera::roll, Lib3dsCamera::see_cone, Lib3dsCamera::target, and TRUE.

Referenced by named_object_read().

void lib3ds_camera_write | ( | Lib3dsCamera * | camera,
|  | Lib3dsIo * | io
| ) |  |

Write a camera definition to a file.

This function is called by lib3ds_file_write(), and you probably don't want to call it directly.

Parameters

  camera | A Lib3dsCamera to be written.
  io | A Lib3dsIo object previously set up by the caller.

See Also
  lib3ds_file_write

Definition at line 133 of file lib3ds_camera.c.

References CHK_CAM_RANGES, CHK_CAM_SEE_CONE, CHK_N_CAMERA, Lib3dsChunk::chunk, fabs(), Lib3dsCamera::far_range, Lib3dsCamera::fov, lib3ds_chunk_write(), lib3ds_chunk_write_end(), lib3ds_chunk_write_start(), LIB3DS_EPSILON, lib3ds_io_write_float(), lib3ds_io_write_vector(), Lib3dsCamera::near_range, Lib3dsCamera::position, Lib3dsCamera::roll, Lib3dsCamera::see_cone, Lib3dsChunk::size, and Lib3dsCamera::target.

Referenced by mdata_write().

const char* lib3ds_chunk_name | ( | uint16_t | chunk | ) |

Definition at line 250 of file lib3ds_chunktable.c.

Referenced by lib3ds_chunk_read_next(), and lib3ds_chunk_unknown().

void lib3ds_chunk_read | ( | Lib3dsChunk * | c,
|  | Lib3dsIo * | io
| ) |  |

Reads a 3d-Studio chunk header from a little endian file stream.

Parameters

  c | The chunk to store the data.
  io | The file stream.

Returns
  True on success, False otherwise.

Definition at line 34 of file lib3ds_chunk.c.

References assert, Lib3dsChunk::chunk, Lib3dsChunk::cur, Lib3dsChunk::end, lib3ds_io_log(), lib3ds_io_read_dword(), lib3ds_io_read_word(), lib3ds_io_tell(), LIB3DS_LOG_ERROR, and Lib3dsChunk::size.

Referenced by lib3ds_atmosphere_read(), lib3ds_background_read(), lib3ds_chunk_read_start(), and lib3ds_shadow_read().

void lib3ds_chunk_read_end | ( | Lib3dsChunk * | c,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 96 of file lib3ds_chunk.c.

References Lib3dsChunk::end, Lib3dsIo::impl, lib3ds_io_seek(), and LIB3DS_SEEK_SET.

Referenced by ambient_read(), color_read(), distance_cue_read(), face_array_read(), fog_read(), int_percentage_read(), kfdata_read(), layer_fog_read(), lib3ds_camera_read(), lib3ds_file_read(), lib3ds_light_read(), lib3ds_material_read(), lib3ds_mesh_read(), lib3ds_node_read(), lib3ds_viewport_read(), mdata_read(), named_object_read(), solid_bgnd_read(), spotlight_read(), texture_map_read(), and v_gradient_read().

uint16_t lib3ds_chunk_read_next | ( | Lib3dsChunk * | c,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 68 of file lib3ds_chunk.c.

References assert, Lib3dsChunk::chunk, Lib3dsChunk::cur, d, Lib3dsChunk::end, lib3ds_chunk_name(), lib3ds_io_log(), lib3ds_io_read_dword(), lib3ds_io_read_word(), lib3ds_io_seek(), LIB3DS_LOG_INFO, LIB3DS_SEEK_SET, Lib3dsIo::log_func, and Lib3dsChunk::size.

Referenced by ambient_read(), color_read(), distance_cue_read(), face_array_read(), fog_read(), int_percentage_read(), kfdata_read(), layer_fog_read(), lib3ds_camera_read(), lib3ds_file_read(), lib3ds_light_read(), lib3ds_material_read(), lib3ds_mesh_read(), lib3ds_node_read(), lib3ds_viewport_read(), mdata_read(), named_object_read(), solid_bgnd_read(), spotlight_read(), texture_map_read(), and v_gradient_read().

void lib3ds_chunk_read_reset | ( | Lib3dsChunk * | c,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 90 of file lib3ds_chunk.c.

References lib3ds_io_seek(), and LIB3DS_SEEK_CUR.

Referenced by kfdata_read(), lib3ds_atmosphere_read(), lib3ds_background_read(), lib3ds_file_read(), lib3ds_light_read(), lib3ds_material_read(), lib3ds_mesh_read(), mdata_read(), and named_object_read().

void lib3ds_chunk_read_start | ( | Lib3dsChunk * | c,
|  | uint16_t | chunk,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 50 of file lib3ds_chunk.c.

References assert, Lib3dsChunk::chunk, Lib3dsIo::impl, lib3ds_chunk_read(), lib3ds_io_log(), and LIB3DS_LOG_ERROR.

Referenced by ambient_read(), color_read(), distance_cue_read(), face_array_read(), fog_read(), int_percentage_read(), kfdata_read(), layer_fog_read(), lib3ds_camera_read(), lib3ds_file_read(), lib3ds_light_read(), lib3ds_material_read(), lib3ds_mesh_read(), lib3ds_node_read(), lib3ds_viewport_read(), mdata_read(), named_object_read(), solid_bgnd_read(), spotlight_read(), texture_map_read(), and v_gradient_read().

void lib3ds_chunk_read_tell | ( | Lib3dsChunk * | c,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 62 of file lib3ds_chunk.c.

References Lib3dsChunk::cur, and lib3ds_io_tell().

Referenced by distance_cue_read(), face_array_read(), fog_read(), layer_fog_read(), lib3ds_camera_read(), lib3ds_light_read(), lib3ds_viewport_read(), named_object_read(), spotlight_read(), and v_gradient_read().

void lib3ds_chunk_unknown | ( | uint16_t | chunk,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 140 of file lib3ds_chunk.c.

References lib3ds_chunk_name(), lib3ds_io_log(), LIB3DS_LOG_WARN, and Lib3dsIo::log_func.

Referenced by ambient_read(), color_read(), distance_cue_read(), face_array_read(), fog_read(), int_percentage_read(), kfdata_read(), layer_fog_read(), lib3ds_camera_read(), lib3ds_file_read(), lib3ds_light_read(), lib3ds_material_read(), lib3ds_mesh_read(), lib3ds_node_read(), lib3ds_viewport_read(), mdata_read(), named_object_read(), solid_bgnd_read(), spotlight_read(), texture_map_read(), and v_gradient_read().

void lib3ds_chunk_write | ( | Lib3dsChunk * | c,
|  | Lib3dsIo * | io
| ) |  |

Writes a 3d-Studio chunk header into a little endian file stream.

Parameters

  c | The chunk to be written.
  io | The file stream.

Returns
  True on success, False otherwise.

Definition at line 111 of file lib3ds_chunk.c.

References assert, Lib3dsChunk::chunk, lib3ds_io_write_dword(), lib3ds_io_write_word(), and Lib3dsChunk::size.

Referenced by color_write(), colorf_write(), face_array_write(), flag_array_write(), int_percentage_write(), kfdata_write(), lib3ds_atmosphere_write(), lib3ds_background_write(), lib3ds_camera_write(), lib3ds_file_write(), lib3ds_light_write(), lib3ds_material_write(), lib3ds_mesh_write(), lib3ds_node_write(), lib3ds_shadow_write(), lib3ds_viewport_write(), mdata_write(), object_flags_write(), point_array_write(), texco_array_write(), and texture_map_write().

void lib3ds_chunk_write_end | ( | Lib3dsChunk * | c,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 129 of file lib3ds_chunk.c.

References assert, Lib3dsChunk::cur, lib3ds_io_seek(), lib3ds_io_tell(), lib3ds_io_write_dword(), LIB3DS_SEEK_SET, and Lib3dsChunk::size.

Referenced by face_array_write(), kfdata_write(), lib3ds_atmosphere_write(), lib3ds_camera_write(), lib3ds_file_write(), lib3ds_light_write(), lib3ds_material_write(), lib3ds_mesh_write(), lib3ds_node_write(), lib3ds_viewport_write(), mdata_write(), and texture_map_write().

void lib3ds_chunk_write_start | ( | Lib3dsChunk * | c,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 119 of file lib3ds_chunk.c.

References assert, Lib3dsChunk::chunk, Lib3dsChunk::cur, lib3ds_io_tell(), lib3ds_io_write_dword(), lib3ds_io_write_word(), and Lib3dsChunk::size.

Referenced by face_array_write(), kfdata_write(), lib3ds_atmosphere_write(), lib3ds_camera_write(), lib3ds_file_write(), lib3ds_light_write(), lib3ds_material_write(), lib3ds_mesh_write(), lib3ds_node_write(), lib3ds_viewport_write(), mdata_write(), and texture_map_write().

void lib3ds_io_cleanup | ( | Lib3dsIo * | io | ) |

Definition at line 35 of file lib3ds_io.c.

References assert, free, if(), Lib3dsIo::impl, lib3ds_node_free(), NULL, Lib3dsIoImpl::tmp_mem, and Lib3dsIoImpl::tmp_node.

Referenced by lib3ds_file_read(), and lib3ds_file_write().

void lib3ds_io_log | ( | Lib3dsIo * | io,
|  | Lib3dsLogLevel | level,
|  | const char * | format,
|  |  | ...
| ) |  |

Definition at line 100 of file lib3ds_io.c.

References assert, Lib3dsIo::impl, lib3ds_io_log_str(), LIB3DS_LOG_ERROR, Lib3dsIo::log_func, and str.

Referenced by lib3ds_chunk_read(), lib3ds_chunk_read_next(), lib3ds_chunk_read_start(), lib3ds_chunk_unknown(), lib3ds_io_read_error(), lib3ds_io_read_string(), lib3ds_io_write_error(), lib3ds_material_read(), lib3ds_node_read(), named_object_read(), and texture_map_read().

void lib3ds_io_log_indent | ( | Lib3dsIo * | io,
|  | int | indent
| ) |  |

Definition at line 119 of file lib3ds_io.c.

References assert, and Lib3dsIo::impl.

Referenced by lib3ds_node_read().

size_t lib3ds_io_read | ( | Lib3dsIo * | io,
|  | void * | buffer,
|  | size_t | size
| ) |  |

Definition at line 72 of file lib3ds_io.c.

References assert, Lib3dsIo::read_func, and Lib3dsIo::self.

Referenced by lib3ds_io_read_byte(), lib3ds_io_read_dword(), lib3ds_io_read_float(), lib3ds_io_read_intb(), lib3ds_io_read_intd(), lib3ds_io_read_intw(), lib3ds_io_read_string(), lib3ds_io_read_word(), and lib3ds_viewport_read().

uint8_t lib3ds_io_read_byte | ( | Lib3dsIo * | io | ) |

Read a byte from a file stream.

Definition at line 143 of file lib3ds_io.c.

References assert, and lib3ds_io_read().

Referenced by color_read(), lib3ds_mesh_read(), and texture_map_read().

uint32_t lib3ds_io_read_dword | ( | Lib3dsIo * | io | ) |

Read a dword from file a stream in little endian format.

Definition at line 172 of file lib3ds_io.c.

References assert, d, and lib3ds_io_read().

Referenced by face_array_read(), layer_fog_read(), lib3ds_chunk_read(), lib3ds_chunk_read_next(), lib3ds_file_read(), and lib3ds_track_read().

void lib3ds_io_read_error | ( | Lib3dsIo * | io | ) |

Definition at line 128 of file lib3ds_io.c.

References lib3ds_io_log(), and LIB3DS_LOG_ERROR.

Referenced by lib3ds_io_read_string().

float lib3ds_io_read_float | ( | Lib3dsIo * | io | ) |

Read a float from a file stream in little endian format.

Definition at line 237 of file lib3ds_io.c.

References assert, d, and lib3ds_io_read().

Referenced by ambient_read(), color_read(), distance_cue_read(), fog_read(), layer_fog_read(), lib3ds_camera_read(), lib3ds_io_read_rgb(), lib3ds_io_read_vector(), lib3ds_light_read(), lib3ds_material_read(), lib3ds_mesh_read(), lib3ds_node_read(), lib3ds_shadow_read(), lib3ds_track_read(), lib3ds_viewport_read(), mdata_read(), spotlight_read(), tcb_read(), texture_map_read(), and v_gradient_read().

int8_t lib3ds_io_read_intb | ( | Lib3dsIo * | io | ) |

Read a signed byte from a file stream.

Definition at line 190 of file lib3ds_io.c.

References assert, and lib3ds_io_read().

Referenced by lib3ds_material_read().

int32_t lib3ds_io_read_intd | ( | Lib3dsIo * | io | ) |

Read a signed dword a from file stream in little endian format.

Definition at line 219 of file lib3ds_io.c.

References assert, d, and lib3ds_io_read().

Referenced by kfdata_read(), lib3ds_material_read(), lib3ds_track_read(), and mdata_read().

int16_t lib3ds_io_read_intw | ( | Lib3dsIo * | io | ) |

Read a signed word from a file stream in little endian format.

Definition at line 203 of file lib3ds_io.c.

References assert, and lib3ds_io_read().

Referenced by int_percentage_read(), lib3ds_material_read(), lib3ds_shadow_read(), lib3ds_viewport_read(), spotlight_read(), and texture_map_read().

void lib3ds_io_read_rgb | ( | Lib3dsIo * | io,
|  | float | rgb[3]
| ) |  |

Definition at line 267 of file lib3ds_io.c.

References assert, and lib3ds_io_read_float().

Referenced by layer_fog_read(), solid_bgnd_read(), and v_gradient_read().

void lib3ds_io_read_string | ( | Lib3dsIo * | io,
|  | char * | s,
|  | int | buflen
| ) |  |

Read a zero-terminated string from a file stream.

Parameters

  io | IO input handle.
  s | The buffer to store the read string.
  buflen | Buffer length.

Returns
  True on success, False otherwise.

Definition at line 285 of file lib3ds_io.c.

References assert, k, lib3ds_io_log(), lib3ds_io_read(), lib3ds_io_read_error(), and LIB3DS_LOG_ERROR.

Referenced by face_array_read(), kfdata_read(), lib3ds_background_read(), lib3ds_material_read(), lib3ds_node_read(), named_object_read(), spotlight_read(), and texture_map_read().

void lib3ds_io_read_vector | ( | Lib3dsIo * | io,
|  | float | v[3]
| ) |  |

Read a vector from a file stream in little endian format.

Parameters

  io | IO input handle.
  v | The vector to store the data.

Definition at line 258 of file lib3ds_io.c.

References assert, and lib3ds_io_read_float().

Referenced by lib3ds_mesh_read(), lib3ds_node_read(), lib3ds_track_read(), and lib3ds_viewport_read().

uint16_t lib3ds_io_read_word | ( | Lib3dsIo * | io | ) |

Read a word from a file stream in little endian format.

Definition at line 156 of file lib3ds_io.c.

References assert, and lib3ds_io_read().

Referenced by face_array_read(), kfdata_read(), lib3ds_chunk_read(), lib3ds_chunk_read_next(), lib3ds_mesh_read(), lib3ds_node_read(), lib3ds_track_read(), lib3ds_viewport_read(), tcb_read(), and texture_map_read().

long lib3ds_io_seek | ( | Lib3dsIo * | io,
|  | long | offset,
|  | Lib3dsIoSeek | origin
| ) |  |

Definition at line 52 of file lib3ds_io.c.

References assert, Lib3dsIo::seek_func, and Lib3dsIo::self.

Referenced by lib3ds_chunk_read_end(), lib3ds_chunk_read_next(), lib3ds_chunk_read_reset(), and lib3ds_chunk_write_end().

void lib3ds_io_setup | ( | Lib3dsIo * | io | ) |

Definition at line 28 of file lib3ds_io.c.

References assert, calloc, and Lib3dsIo::impl.

Referenced by lib3ds_file_read(), and lib3ds_file_write().

long lib3ds_io_tell | ( | Lib3dsIo * | io | ) |

Definition at line 62 of file lib3ds_io.c.

References assert, Lib3dsIo::self, and Lib3dsIo::tell_func.

Referenced by lib3ds_chunk_read(), lib3ds_chunk_read_tell(), lib3ds_chunk_write_end(), and lib3ds_chunk_write_start().

size_t lib3ds_io_write | ( | Lib3dsIo * | io,
|  | const void * | buffer,
|  | size_t | size
| ) |  |

Definition at line 82 of file lib3ds_io.c.

References assert, Lib3dsIo::self, and Lib3dsIo::write_func.

Referenced by lib3ds_io_write_byte(), lib3ds_io_write_dword(), lib3ds_io_write_float(), lib3ds_io_write_intb(), lib3ds_io_write_intd(), lib3ds_io_write_intw(), lib3ds_io_write_string(), lib3ds_io_write_word(), and lib3ds_viewport_write().

void lib3ds_io_write_byte | ( | Lib3dsIo * | io,
|  | uint8_t | b
| ) |  |

Writes a byte into a file stream.

Definition at line 310 of file lib3ds_io.c.

References assert, lib3ds_io_write(), and lib3ds_io_write_error().

Referenced by color_write(), lib3ds_mesh_write(), and texture_map_write().

void lib3ds_io_write_dword | ( | Lib3dsIo * | io,
|  | uint32_t | d
| ) |  |

Writes a dword into a little endian file stream.

Definition at line 338 of file lib3ds_io.c.

References assert, lib3ds_io_write(), and lib3ds_io_write_error().

Referenced by face_array_write(), lib3ds_atmosphere_write(), lib3ds_chunk_write(), lib3ds_chunk_write_end(), lib3ds_chunk_write_start(), lib3ds_file_write(), and lib3ds_track_write().

void lib3ds_io_write_error | ( | Lib3dsIo * | io | ) |

Definition at line 134 of file lib3ds_io.c.

References lib3ds_io_log(), and LIB3DS_LOG_ERROR.

Referenced by lib3ds_io_write_byte(), lib3ds_io_write_dword(), lib3ds_io_write_float(), lib3ds_io_write_intb(), lib3ds_io_write_intd(), lib3ds_io_write_intw(), lib3ds_io_write_string(), and lib3ds_io_write_word().

void lib3ds_io_write_float | ( | Lib3dsIo * | io,
|  | float | l
| ) |  |

Writes a float into a little endian file stream.

Definition at line 402 of file lib3ds_io.c.

References assert, d, lib3ds_io_write(), and lib3ds_io_write_error().

Referenced by lib3ds_atmosphere_write(), lib3ds_background_write(), lib3ds_camera_write(), lib3ds_io_write_rgb(), lib3ds_io_write_vector(), lib3ds_light_write(), lib3ds_material_write(), lib3ds_mesh_write(), lib3ds_node_write(), lib3ds_shadow_write(), lib3ds_track_write(), lib3ds_viewport_write(), mdata_write(), tcb_write(), texco_array_write(), and texture_map_write().

void lib3ds_io_write_intb | ( | Lib3dsIo * | io,
|  | int8_t | b
| ) |  |

Writes a signed byte in a file stream.

Definition at line 356 of file lib3ds_io.c.

References assert, lib3ds_io_write(), and lib3ds_io_write_error().

Referenced by lib3ds_material_write().

void lib3ds_io_write_intd | ( | Lib3dsIo * | io,
|  | int32_t | d
| ) |  |

Writes a signed dword into a little endian file stream.

Definition at line 384 of file lib3ds_io.c.

References assert, lib3ds_io_write(), and lib3ds_io_write_error().

Referenced by kfdata_write(), lib3ds_material_write(), lib3ds_track_write(), and mdata_write().

void lib3ds_io_write_intw | ( | Lib3dsIo * | io,
|  | int16_t | w
| ) |  |

Writes a signed word into a little endian file stream.

Definition at line 368 of file lib3ds_io.c.

References assert, lib3ds_io_write(), and lib3ds_io_write_error().

Referenced by int_percentage_write(), kfdata_write(), lib3ds_light_write(), lib3ds_material_write(), lib3ds_node_write(), lib3ds_shadow_write(), and lib3ds_viewport_write().

void lib3ds_io_write_rgb | ( | Lib3dsIo * | io,
|  | float | rgb[3]
| ) |  |

Definition at line 431 of file lib3ds_io.c.

References i, and lib3ds_io_write_float().

Referenced by colorf_write(), lib3ds_atmosphere_write(), and lib3ds_light_write().

void lib3ds_io_write_string | ( | Lib3dsIo * | io,
|  | const char * | s
| ) |  |

Writes a zero-terminated string into a file stream.

Definition at line 443 of file lib3ds_io.c.

References assert, lib3ds_io_write(), and lib3ds_io_write_error().

Referenced by face_array_write(), kfdata_write(), lib3ds_background_write(), lib3ds_light_write(), lib3ds_material_write(), lib3ds_node_write(), mdata_write(), and texture_map_write().

void lib3ds_io_write_vector | ( | Lib3dsIo * | io,
|  | float | v[3]
| ) |  |

Writes a vector into a file stream in little endian format.

Definition at line 422 of file lib3ds_io.c.

References i, and lib3ds_io_write_float().

Referenced by lib3ds_camera_write(), lib3ds_light_write(), lib3ds_mesh_write(), lib3ds_node_write(), lib3ds_track_write(), lib3ds_viewport_write(), mdata_write(), and point_array_write().

void lib3ds_io_write_word | ( | Lib3dsIo * | io,
|  | uint16_t | w
| ) |  |

Writes a word into a little endian file stream.

Definition at line 322 of file lib3ds_io.c.

References assert, lib3ds_io_write(), and lib3ds_io_write_error().

Referenced by face_array_write(), flag_array_write(), lib3ds_chunk_write(), lib3ds_chunk_write_start(), lib3ds_mesh_write(), lib3ds_node_write(), lib3ds_track_write(), lib3ds_viewport_write(), point_array_write(), tcb_write(), texco_array_write(), and texture_map_write().

void lib3ds_light_read | ( | Lib3dsLight * | light,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 124 of file lib3ds_light.c.

References Lib3dsLight::attenuation, CHK_COLOR_F, CHK_DL_ATTENUATE, CHK_DL_EXCLUDE, CHK_DL_INNER_RANGE, CHK_DL_MULTIPLIER, CHK_DL_OFF, CHK_DL_OUTER_RANGE, CHK_DL_SPOTLIGHT, CHK_N_DIRECT_LIGHT, chunk, Lib3dsLight::color, i, Lib3dsLight::inner_range, lib3ds_chunk_read_end(), lib3ds_chunk_read_next(), lib3ds_chunk_read_reset(), lib3ds_chunk_read_start(), lib3ds_chunk_read_tell(), lib3ds_chunk_unknown(), lib3ds_io_read_float(), Lib3dsLight::multiplier, Lib3dsLight::off, Lib3dsLight::outer_range, Lib3dsLight::position, spotlight_read(), and TRUE.

Referenced by named_object_read().

void lib3ds_light_write | ( | Lib3dsLight * | light,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 190 of file lib3ds_light.c.

References Lib3dsLight::attenuation, CHK_COLOR_F, CHK_DL_ATTENUATE, CHK_DL_INNER_RANGE, CHK_DL_LOCAL_SHADOW2, CHK_DL_MULTIPLIER, CHK_DL_OFF, CHK_DL_OUTER_RANGE, CHK_DL_RAY_BIAS, CHK_DL_RAYSHAD, CHK_DL_SEE_CONE, CHK_DL_SHADOWED, CHK_DL_SPOT_ASPECT, CHK_DL_SPOT_OVERSHOOT, CHK_DL_SPOT_PROJECTOR, CHK_DL_SPOT_RECTANGULAR, CHK_DL_SPOT_ROLL, CHK_DL_SPOTLIGHT, CHK_N_DIRECT_LIGHT, Lib3dsChunk::chunk, Lib3dsLight::color, fabs(), Lib3dsLight::falloff, Lib3dsLight::hotspot, Lib3dsLight::inner_range, lib3ds_chunk_write(), lib3ds_chunk_write_end(), lib3ds_chunk_write_start(), LIB3DS_EPSILON, lib3ds_io_write_float(), lib3ds_io_write_intw(), lib3ds_io_write_rgb(), lib3ds_io_write_string(), lib3ds_io_write_vector(), Lib3dsLight::multiplier, Lib3dsLight::off, Lib3dsLight::outer_range, Lib3dsLight::position, Lib3dsLight::projector, Lib3dsLight::ray_bias, Lib3dsLight::ray_shadows, Lib3dsLight::rectangular_spot, Lib3dsLight::roll, Lib3dsLight::see_cone, Lib3dsLight::shadow_bias, Lib3dsLight::shadow_filter, Lib3dsLight::shadow_size, Lib3dsLight::shadowed, Lib3dsChunk::size, Lib3dsLight::spot_aspect, Lib3dsLight::spot_light, Lib3dsLight::spot_overshoot, Lib3dsLight::target, and Lib3dsLight::use_projector.

Referenced by mdata_write().

void lib3ds_material_read | ( | Lib3dsMaterial * | material,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 265 of file lib3ds_material.c.

References Lib3dsMaterial::ambient, assert, Lib3dsMaterial::autorefl_map_anti_alias, Lib3dsMaterial::autorefl_map_flags, Lib3dsMaterial::autorefl_map_frame_step, Lib3dsMaterial::autorefl_map_size, Lib3dsMaterial::blur, Lib3dsMaterial::bump_map, Lib3dsMaterial::bump_mask, CHK_MAT_ACUBIC, CHK_MAT_ADDITIVE, CHK_MAT_AMBIENT, CHK_MAT_BUMPMAP, CHK_MAT_BUMPMASK, CHK_MAT_DECAL, CHK_MAT_DIFFUSE, CHK_MAT_ENTRY, CHK_MAT_FACEMAP, CHK_MAT_NAME, CHK_MAT_OPACMAP, CHK_MAT_OPACMASK, CHK_MAT_PHONGSOFT, CHK_MAT_REFBLUR, CHK_MAT_REFLMAP, CHK_MAT_REFLMASK, CHK_MAT_SELF_ILLUM, CHK_MAT_SELF_ILPCT, CHK_MAT_SELFIMAP, CHK_MAT_SELFIMASK, CHK_MAT_SHADING, CHK_MAT_SHIN2PCT, CHK_MAT_SHININESS, CHK_MAT_SHINMAP, CHK_MAT_SHINMASK, CHK_MAT_SPECMAP, CHK_MAT_SPECMASK, CHK_MAT_SPECULAR, CHK_MAT_TEX2MAP, CHK_MAT_TEX2MASK, CHK_MAT_TEXMAP, CHK_MAT_TEXMASK, CHK_MAT_TRANSPARENCY, CHK_MAT_TWO_SIDE, CHK_MAT_USE_REFBLUR, CHK_MAT_USE_XPFALL, CHK_MAT_WIRE, CHK_MAT_WIRE_SIZE, CHK_MAT_WIREABS, CHK_MAT_XPFALL, chunk, color_read(), Lib3dsMaterial::diffuse, Lib3dsMaterial::face_map, Lib3dsMaterial::falloff, int_percentage_read(), Lib3dsMaterial::is_additive, lib3ds_chunk_read_end(), lib3ds_chunk_read_next(), lib3ds_chunk_read_reset(), lib3ds_chunk_read_start(), lib3ds_chunk_unknown(), lib3ds_io_log(), lib3ds_io_read_float(), lib3ds_io_read_intb(), lib3ds_io_read_intd(), lib3ds_io_read_intw(), lib3ds_io_read_string(), LIB3DS_LOG_INFO, Lib3dsMaterial::map_decal, Lib3dsMaterial::name, Lib3dsMaterial::opacity_map, Lib3dsMaterial::opacity_mask, Lib3dsMaterial::reflection_map, Lib3dsMaterial::reflection_mask, Lib3dsMaterial::self_illum, Lib3dsMaterial::self_illum_flag, Lib3dsMaterial::self_illum_map, Lib3dsMaterial::self_illum_mask, Lib3dsMaterial::shading, Lib3dsMaterial::shin_strength, Lib3dsMaterial::shininess, Lib3dsMaterial::shininess_map, Lib3dsMaterial::shininess_mask, Lib3dsMaterial::soften, Lib3dsMaterial::specular, Lib3dsMaterial::specular_map, Lib3dsMaterial::specular_mask, Lib3dsMaterial::texture1_map, Lib3dsMaterial::texture1_mask, Lib3dsMaterial::texture2_map, Lib3dsMaterial::texture2_mask, texture_map_read(), Lib3dsMaterial::transparency, TRUE, Lib3dsMaterial::two_sided, Lib3dsMaterial::use_blur, Lib3dsMaterial::use_falloff, Lib3dsMaterial::use_wire, Lib3dsMaterial::use_wire_abs, and Lib3dsMaterial::wire_size.

Referenced by mdata_read().

void lib3ds_material_write | ( | Lib3dsMaterial * | material,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 667 of file lib3ds_material.c.

References Lib3dsMaterial::ambient, Lib3dsMaterial::autorefl_map_anti_alias, Lib3dsMaterial::autorefl_map_flags, Lib3dsMaterial::autorefl_map_frame_step, Lib3dsMaterial::autorefl_map_size, Lib3dsMaterial::blur, Lib3dsMaterial::bump_map, Lib3dsMaterial::bump_mask, CHK_MAT_ACUBIC, CHK_MAT_ADDITIVE, CHK_MAT_AMBIENT, CHK_MAT_BUMPMAP, CHK_MAT_BUMPMASK, CHK_MAT_DECAL, CHK_MAT_DIFFUSE, CHK_MAT_ENTRY, CHK_MAT_FACEMAP, CHK_MAT_NAME, CHK_MAT_OPACMAP, CHK_MAT_OPACMASK, CHK_MAT_PHONGSOFT, CHK_MAT_REFBLUR, CHK_MAT_REFLMAP, CHK_MAT_REFLMASK, CHK_MAT_SELF_ILLUM, CHK_MAT_SELFIMAP, CHK_MAT_SELFIMASK, CHK_MAT_SHADING, CHK_MAT_SHIN2PCT, CHK_MAT_SHININESS, CHK_MAT_SHINMAP, CHK_MAT_SHINMASK, CHK_MAT_SPECMAP, CHK_MAT_SPECMASK, CHK_MAT_SPECULAR, CHK_MAT_TEX2MAP, CHK_MAT_TEX2MASK, CHK_MAT_TEXMAP, CHK_MAT_TEXMASK, CHK_MAT_TRANSPARENCY, CHK_MAT_TWO_SIDE, CHK_MAT_USE_REFBLUR, CHK_MAT_USE_XPFALL, CHK_MAT_WIRE, CHK_MAT_WIRE_SIZE, CHK_MAT_WIREABS, CHK_MAT_XPFALL, Lib3dsChunk::chunk, color_write(), Lib3dsMaterial::diffuse, Lib3dsMaterial::face_map, Lib3dsMaterial::falloff, int_percentage_write(), Lib3dsMaterial::is_additive, lib3ds_chunk_write(), lib3ds_chunk_write_end(), lib3ds_chunk_write_start(), lib3ds_io_write_float(), lib3ds_io_write_intb(), lib3ds_io_write_intd(), lib3ds_io_write_intw(), lib3ds_io_write_string(), Lib3dsMaterial::map_decal, Lib3dsMaterial::name, Lib3dsMaterial::opacity_map, Lib3dsMaterial::opacity_mask, Lib3dsMaterial::reflection_map, Lib3dsMaterial::reflection_mask, Lib3dsMaterial::self_illum_flag, Lib3dsMaterial::self_illum_map, Lib3dsMaterial::self_illum_mask, Lib3dsMaterial::shading, Lib3dsMaterial::shin_strength, Lib3dsMaterial::shininess, Lib3dsMaterial::shininess_map, Lib3dsMaterial::shininess_mask, Lib3dsChunk::size, Lib3dsMaterial::soften, Lib3dsMaterial::specular, Lib3dsMaterial::specular_map, Lib3dsMaterial::specular_mask, Lib3dsMaterial::texture1_map, Lib3dsMaterial::texture1_mask, Lib3dsMaterial::texture2_map, Lib3dsMaterial::texture2_mask, texture_map_write(), Lib3dsMaterial::transparency, Lib3dsMaterial::two_sided, Lib3dsMaterial::use_blur, Lib3dsMaterial::use_falloff, Lib3dsMaterial::use_wire, Lib3dsMaterial::use_wire_abs, and Lib3dsMaterial::wire_size.

Referenced by mdata_write().

void lib3ds_mesh_read | ( | Lib3dsFile * | file,
|  | Lib3dsMesh * | mesh,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 311 of file lib3ds_mesh.c.

References CHK_FACE_ARRAY, CHK_MESH_COLOR, CHK_MESH_MATRIX, CHK_MESH_TEXTURE_INFO, CHK_N_TRI_OBJECT, CHK_POINT_ARRAY, CHK_POINT_FLAG_ARRAY, CHK_TEX_VERTS, chunk, Lib3dsMesh::color, face_array_read(), i, if(), j, lib3ds_chunk_read_end(), lib3ds_chunk_read_next(), lib3ds_chunk_read_reset(), lib3ds_chunk_read_start(), lib3ds_chunk_unknown(), lib3ds_io_read_byte(), lib3ds_io_read_float(), lib3ds_io_read_vector(), lib3ds_io_read_word(), lib3ds_matrix_copy(), lib3ds_matrix_det(), lib3ds_matrix_identity(), lib3ds_matrix_inv(), lib3ds_matrix_mult(), lib3ds_matrix_scale(), lib3ds_mesh_resize_vertices(), lib3ds_vector_copy(), lib3ds_vector_transform(), Lib3dsMesh::map_cylinder_height, Lib3dsMesh::map_matrix, Lib3dsMesh::map_planar_size, Lib3dsMesh::map_pos, Lib3dsMesh::map_scale, Lib3dsMesh::map_tile, Lib3dsMesh::matrix, NULL, Lib3dsMesh::nvertices, Lib3dsMesh::texcos, Lib3dsMesh::vertices, and Lib3dsMesh::vflags.

Referenced by named_object_read().

void lib3ds_mesh_write | ( | Lib3dsFile * | file,
|  | Lib3dsMesh * | mesh,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 610 of file lib3ds_mesh.c.

References CHK_MESH_COLOR, CHK_MESH_MATRIX, CHK_MESH_TEXTURE_INFO, CHK_N_TRI_OBJECT, Lib3dsChunk::chunk, Lib3dsMesh::color, face_array_write(), flag_array_write(), i, j, lib3ds_chunk_write(), lib3ds_chunk_write_end(), lib3ds_chunk_write_start(), lib3ds_io_write_byte(), lib3ds_io_write_float(), lib3ds_io_write_vector(), lib3ds_io_write_word(), LIB3DS_MAP_NONE, Lib3dsMesh::map_cylinder_height, Lib3dsMesh::map_matrix, Lib3dsMesh::map_planar_size, Lib3dsMesh::map_pos, Lib3dsMesh::map_scale, Lib3dsMesh::map_tile, Lib3dsMesh::map_type, Lib3dsMesh::matrix, point_array_write(), Lib3dsChunk::size, and texco_array_write().

Referenced by mdata_write().

void lib3ds_node_read | ( | Lib3dsNode * | node,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 535 of file lib3ds_node.c.

References assert, Lib3dsMeshInstanceNode::bbox_max, Lib3dsMeshInstanceNode::bbox_min, CHK_AMBIENT_NODE_TAG, CHK_BOUNDBOX, CHK_CAMERA_NODE_TAG, CHK_COL_TRACK_TAG, CHK_FALL_TRACK_TAG, CHK_FOV_TRACK_TAG, CHK_HIDE_TRACK_TAG, CHK_HOT_TRACK_TAG, CHK_INSTANCE_NAME, CHK_L_TARGET_NODE_TAG, CHK_LIGHT_NODE_TAG, CHK_MORPH_SMOOTH, CHK_NODE_HDR, CHK_NODE_ID, CHK_OBJECT_NODE_TAG, CHK_PIVOT, CHK_POS_TRACK_TAG, CHK_ROLL_TRACK_TAG, CHK_ROT_TRACK_TAG, CHK_SCL_TRACK_TAG, CHK_SPOTLIGHT_NODE_TAG, CHK_TARGET_NODE_TAG, Lib3dsChunk::chunk, chunk, Lib3dsAmbientColorNode::color_track, Lib3dsOmnilightNode::color_track, Lib3dsSpotlightNode::color_track, Lib3dsSpotlightNode::falloff_track, Lib3dsNode::flags, Lib3dsCameraNode::fov_track, Lib3dsMeshInstanceNode::hide_track, Lib3dsSpotlightNode::hotspot_track, Lib3dsMeshInstanceNode::instance_name, lib3ds_chunk_read_end(), lib3ds_chunk_read_next(), lib3ds_chunk_read_start(), lib3ds_chunk_unknown(), lib3ds_io_log(), lib3ds_io_log_indent(), lib3ds_io_read_float(), lib3ds_io_read_string(), lib3ds_io_read_vector(), lib3ds_io_read_word(), LIB3DS_LOG_INFO, LIB3DS_NODE_AMBIENT_COLOR, LIB3DS_NODE_CAMERA, LIB3DS_NODE_CAMERA_TARGET, LIB3DS_NODE_MESH_INSTANCE, LIB3DS_NODE_OMNILIGHT, LIB3DS_NODE_SPOTLIGHT, LIB3DS_NODE_SPOTLIGHT_TARGET, LIB3DS_TRACK_BOOL, LIB3DS_TRACK_FLOAT, LIB3DS_TRACK_QUAT, lib3ds_track_read(), LIB3DS_TRACK_VECTOR, Lib3dsMeshInstanceNode::morph_smooth, Lib3dsNode::name, Lib3dsNode::node_id, Lib3dsMeshInstanceNode::pivot, Lib3dsMeshInstanceNode::pos_track, Lib3dsCameraNode::pos_track, Lib3dsTargetNode::pos_track, Lib3dsOmnilightNode::pos_track, Lib3dsSpotlightNode::pos_track, Lib3dsCameraNode::roll_track, Lib3dsSpotlightNode::roll_track, Lib3dsMeshInstanceNode::rot_track, Lib3dsMeshInstanceNode::scl_track, Lib3dsNode::type, Lib3dsTrack::type, and Lib3dsNode::user_id.

Referenced by kfdata_read().

void lib3ds_node_write | ( | Lib3dsNode * | node,
|  | uint16_t | node_id,
|  | uint16_t | parent_id,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 797 of file lib3ds_node.c.

References assert, Lib3dsMeshInstanceNode::bbox_max, Lib3dsMeshInstanceNode::bbox_min, CHK_AMBIENT_NODE_TAG, CHK_BOUNDBOX, CHK_CAMERA_NODE_TAG, CHK_COL_TRACK_TAG, CHK_FALL_TRACK_TAG, CHK_FOV_TRACK_TAG, CHK_HIDE_TRACK_TAG, CHK_HOT_TRACK_TAG, CHK_INSTANCE_NAME, CHK_L_TARGET_NODE_TAG, CHK_LIGHT_NODE_TAG, CHK_MORPH_SMOOTH, CHK_NODE_HDR, CHK_NODE_ID, CHK_OBJECT_NODE_TAG, CHK_PIVOT, CHK_POS_TRACK_TAG, CHK_ROLL_TRACK_TAG, CHK_ROT_TRACK_TAG, CHK_SCL_TRACK_TAG, CHK_SPOTLIGHT_NODE_TAG, CHK_TARGET_NODE_TAG, Lib3dsChunk::chunk, Lib3dsAmbientColorNode::color_track, Lib3dsOmnilightNode::color_track, Lib3dsSpotlightNode::color_track, fabs(), Lib3dsSpotlightNode::falloff_track, Lib3dsNode::flags, Lib3dsCameraNode::fov_track, Lib3dsMeshInstanceNode::hide_track, Lib3dsSpotlightNode::hotspot_track, i, Lib3dsMeshInstanceNode::instance_name, lib3ds_chunk_write(), lib3ds_chunk_write_end(), lib3ds_chunk_write_start(), LIB3DS_EPSILON, lib3ds_io_write_float(), lib3ds_io_write_intw(), lib3ds_io_write_string(), lib3ds_io_write_vector(), lib3ds_io_write_word(), LIB3DS_NODE_AMBIENT_COLOR, LIB3DS_NODE_CAMERA, LIB3DS_NODE_CAMERA_TARGET, LIB3DS_NODE_MESH_INSTANCE, LIB3DS_NODE_OMNILIGHT, LIB3DS_NODE_SPOTLIGHT, LIB3DS_NODE_SPOTLIGHT_TARGET, lib3ds_track_write(), Lib3dsMeshInstanceNode::morph_smooth, Lib3dsNode::name, Lib3dsTrack::nkeys, Lib3dsMeshInstanceNode::pivot, Lib3dsMeshInstanceNode::pos_track, Lib3dsCameraNode::pos_track, Lib3dsTargetNode::pos_track, Lib3dsOmnilightNode::pos_track, Lib3dsSpotlightNode::pos_track, Lib3dsCameraNode::roll_track, Lib3dsSpotlightNode::roll_track, Lib3dsMeshInstanceNode::rot_track, Lib3dsMeshInstanceNode::scl_track, Lib3dsChunk::size, and Lib3dsNode::type.

Referenced by nodes_write().

void lib3ds_shadow_read | ( | Lib3dsShadow * | shadow,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 22 of file lib3ds_shadow.c.

References CHK_HI_SHADOW_BIAS, CHK_LO_SHADOW_BIAS, CHK_RAY_BIAS, CHK_SHADOW_FILTER, CHK_SHADOW_MAP_SIZE, Lib3dsChunk::chunk, Lib3dsShadow::filter, Lib3dsShadow::hi_bias, lib3ds_chunk_read(), lib3ds_io_read_float(), lib3ds_io_read_intw(), Lib3dsShadow::low_bias, Lib3dsShadow::map_size, and Lib3dsShadow::ray_bias.

Referenced by mdata_read().

void lib3ds_shadow_write | ( | Lib3dsShadow * | shadow,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 56 of file lib3ds_shadow.c.

References CHK_HI_SHADOW_BIAS, CHK_LO_SHADOW_BIAS, CHK_RAY_BIAS, CHK_SHADOW_FILTER, CHK_SHADOW_MAP_SIZE, Lib3dsChunk::chunk, fabs(), Lib3dsShadow::filter, Lib3dsShadow::hi_bias, lib3ds_chunk_write(), LIB3DS_EPSILON, lib3ds_io_write_float(), lib3ds_io_write_intw(), Lib3dsShadow::low_bias, Lib3dsShadow::map_size, Lib3dsShadow::ray_bias, and Lib3dsChunk::size.

Referenced by mdata_write().

void lib3ds_track_read | ( | Lib3dsTrack * | track,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 422 of file lib3ds_track.c.

References Lib3dsTrack::flags, Lib3dsKey::frame, i, Lib3dsTrack::keys, lib3ds_io_read_dword(), lib3ds_io_read_float(), lib3ds_io_read_intd(), lib3ds_io_read_vector(), lib3ds_io_read_word(), LIB3DS_TRACK_BOOL, LIB3DS_TRACK_FLOAT, LIB3DS_TRACK_QUAT, lib3ds_track_resize(), LIB3DS_TRACK_VECTOR, tcb_read(), Lib3dsTrack::type, and Lib3dsKey::value.

Referenced by lib3ds_node_read().

void lib3ds_track_write | ( | Lib3dsTrack * | track,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 501 of file lib3ds_track.c.

References Lib3dsTrack::flags, Lib3dsKey::frame, i, Lib3dsTrack::keys, lib3ds_io_write_dword(), lib3ds_io_write_float(), lib3ds_io_write_intd(), lib3ds_io_write_vector(), lib3ds_io_write_word(), LIB3DS_TRACK_BOOL, LIB3DS_TRACK_FLOAT, LIB3DS_TRACK_QUAT, LIB3DS_TRACK_VECTOR, Lib3dsTrack::nkeys, tcb_write(), Lib3dsTrack::type, and Lib3dsKey::value.

Referenced by lib3ds_node_write().

void lib3ds_util_insert_array | ( | void *** | ptr,
|  | int * | n,
|  | int * | size,
|  | void * | element,
|  | int | index
| ) |  |

Definition at line 53 of file lib3ds_util.c.

References assert, FALSE, i, lib3ds_util_reserve_array(), memmove, and NULL.

Referenced by lib3ds_file_insert_camera(), lib3ds_file_insert_light(), lib3ds_file_insert_material(), and lib3ds_file_insert_mesh().

void* lib3ds_util_realloc_array | ( | void * | ptr,
|  | int | old_size,
|  | int | new_size,
|  | int | element_size
| ) |  |

Definition at line 21 of file lib3ds_util.c.

References memset, and realloc.

Referenced by lib3ds_mesh_resize_faces(), and lib3ds_mesh_resize_vertices().

void lib3ds_util_remove_array | ( | void *** | ptr,
|  | int * | n,
|  | int | index,
|  | Lib3dsFreeFunc | free_func
| ) |  |

Definition at line 79 of file lib3ds_util.c.

References assert, and memmove.

Referenced by lib3ds_file_remove_camera(), lib3ds_file_remove_light(), lib3ds_file_remove_material(), and lib3ds_file_remove_mesh().

void lib3ds_util_reserve_array | ( | void *** | ptr,
|  | int * | n,
|  | int * | size,
|  | int | new_size,
|  | int | force,
|  | Lib3dsFreeFunc | free_func
| ) |  |

Definition at line 34 of file lib3ds_util.c.

References assert, i, and realloc.

Referenced by lib3ds_file_reserve_cameras(), lib3ds_file_reserve_lights(), lib3ds_file_reserve_materials(), lib3ds_file_reserve_meshes(), and lib3ds_util_insert_array().

void lib3ds_viewport_read | ( | Lib3dsViewport * | viewport,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 22 of file lib3ds_viewport.c.

References Lib3dsView::axis_lock, Lib3dsView::camera, Lib3dsView::center, CHK_DEFAULT_VIEW, CHK_VIEW_BACK, CHK_VIEW_BOTTOM, CHK_VIEW_CAMERA, CHK_VIEW_FRONT, CHK_VIEW_LEFT, CHK_VIEW_RIGHT, CHK_VIEW_TOP, CHK_VIEW_USER, CHK_VIEWPORT_DATA, CHK_VIEWPORT_DATA_3, CHK_VIEWPORT_LAYOUT, CHK_VIEWPORT_SIZE, Lib3dsChunk::chunk, chunk, Lib3dsViewport::default_camera, Lib3dsViewport::default_horiz_angle, Lib3dsViewport::default_position, Lib3dsViewport::default_roll_angle, Lib3dsViewport::default_type, Lib3dsViewport::default_vert_angle, Lib3dsViewport::default_width, Lib3dsView::horiz_angle, Lib3dsViewport::layout_active, Lib3dsViewport::layout_position, Lib3dsViewport::layout_size, Lib3dsViewport::layout_style, Lib3dsViewport::layout_swap, Lib3dsViewport::layout_swap_prior, Lib3dsViewport::layout_swap_view, Lib3dsViewport::layout_views, lib3ds_chunk_read_end(), lib3ds_chunk_read_next(), lib3ds_chunk_read_start(), lib3ds_chunk_read_tell(), lib3ds_chunk_unknown(), lib3ds_io_read(), lib3ds_io_read_float(), lib3ds_io_read_intw(), lib3ds_io_read_vector(), lib3ds_io_read_word(), LIB3DS_LAYOUT_MAX_VIEWS, LIB3DS_VIEW_BACK, LIB3DS_VIEW_BOTTOM, LIB3DS_VIEW_CAMERA, LIB3DS_VIEW_FRONT, LIB3DS_VIEW_LEFT, LIB3DS_VIEW_RIGHT, LIB3DS_VIEW_TOP, LIB3DS_VIEW_USER, memset, Lib3dsView::position, Lib3dsView::size, Lib3dsView::type, Lib3dsView::vert_angle, and Lib3dsView::zoom.

Referenced by kfdata_read(), and mdata_read().

void lib3ds_viewport_write | ( | Lib3dsViewport * | viewport,
|  | Lib3dsIo * | io
| ) |  |

Definition at line 153 of file lib3ds_viewport.c.

References Lib3dsView::axis_lock, Lib3dsView::camera, Lib3dsView::center, CHK_DEFAULT_VIEW, CHK_VIEW_BACK, CHK_VIEW_BOTTOM, CHK_VIEW_CAMERA, CHK_VIEW_FRONT, CHK_VIEW_LEFT, CHK_VIEW_RIGHT, CHK_VIEW_TOP, CHK_VIEW_USER, CHK_VIEWPORT_DATA_3, CHK_VIEWPORT_LAYOUT, CHK_VIEWPORT_SIZE, Lib3dsChunk::chunk, Lib3dsViewport::default_camera, Lib3dsViewport::default_horiz_angle, Lib3dsViewport::default_position, Lib3dsViewport::default_roll_angle, Lib3dsViewport::default_type, Lib3dsViewport::default_vert_angle, Lib3dsViewport::default_width, Lib3dsView::horiz_angle, i, Lib3dsViewport::layout_active, Lib3dsViewport::layout_nviews, Lib3dsViewport::layout_position, Lib3dsViewport::layout_size, Lib3dsViewport::layout_style, Lib3dsViewport::layout_swap, Lib3dsViewport::layout_swap_prior, Lib3dsViewport::layout_swap_view, Lib3dsViewport::layout_views, lib3ds_chunk_write(), lib3ds_chunk_write_end(), lib3ds_chunk_write_start(), lib3ds_io_write(), lib3ds_io_write_float(), lib3ds_io_write_intw(), lib3ds_io_write_vector(), lib3ds_io_write_word(), LIB3DS_VIEW_BACK, LIB3DS_VIEW_BOTTOM, LIB3DS_VIEW_CAMERA, LIB3DS_VIEW_FRONT, LIB3DS_VIEW_LEFT, LIB3DS_VIEW_RIGHT, LIB3DS_VIEW_TOP, LIB3DS_VIEW_USER, Lib3dsView::position, Lib3dsView::size, Lib3dsChunk::size, Lib3dsView::type, Lib3dsView::vert_angle, and Lib3dsView::zoom.

Referenced by kfdata_write(), and mdata_write().