Main Ayam Header. More...
#include <limits.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <GL/glu.h>
#include <togl.h>
#include "aycore.h"
#include "nurbs.h"
#include "objects.h"
#include "contrib.h"
Go to the source code of this file.
Data Structures | |
struct | ay_point |
selected points More... | |
struct | ay_mpoint |
multiple points More... | |
struct | ay_pointedit |
point edit helper (ay_getpntcb callbacks fill it) More... | |
struct | ay_tag |
Tag, attach arbitrary information to objects. More... | |
struct | ay_btval |
binary tag value More... | |
struct | ay_bparam |
bevel parameter helper More... | |
struct | ay_cparam |
cap parameter helper More... | |
struct | ay_trafo |
transformation attributes More... | |
struct | ay_object |
Ayam object. More... | |
struct | ay_list_object |
Ayam object list element. More... | |
struct | ay_shader_arg |
RenderMan shader parameter. More... | |
struct | ay_shader |
RenderMan shader. More... | |
struct | ay_mat_object |
Material Object. More... | |
struct | ay_riopt |
RenderMan interface options. More... | |
struct | ay_root_object |
Root object. More... | |
struct | ay_stess_curve |
a tesselated NURBS curve More... | |
struct | ay_nurbcurve_object |
NURBS curve object. More... | |
struct | ay_stess_uvp |
a tesselated NURBS patch point More... | |
struct | ay_stess_patch |
a tesselated NURBS patch More... | |
struct | ay_nurbpatch_object |
NURBS patch object. More... | |
struct | ay_apatch_object |
Approximating surface object. More... | |
struct | ay_ipatch_object |
Interpolating surface object. More... | |
struct | ay_pamesh_object |
Bilinear/Bicubic patch mesh object. More... | |
struct | ay_pomesh_object |
Polygonal mesh object. More... | |
struct | ay_sdmesh_object |
Subdivision mesh object. More... | |
struct | ay_gordon_object |
Gordon surface object. More... | |
struct | ay_text_object |
Text object. More... | |
struct | ay_light_object |
Lightsource object. More... | |
struct | ay_level_object |
Level object. More... | |
struct | ay_box_object |
Box object. More... | |
struct | ay_bpatch_object |
Bilinear patch object. More... | |
struct | ay_sphere_object |
Sphere object. More... | |
struct | ay_cone_object |
Cone object. More... | |
struct | ay_disk_object |
Disk object. More... | |
struct | ay_cylinder_object |
Cylinder object. More... | |
struct | ay_hyperboloid_object |
Hyperboloid object. More... | |
struct | ay_paraboloid_object |
Paraboloid object. More... | |
struct | ay_torus_object |
Torus object. More... | |
struct | ay_icurve_object |
Interpolating curve object. More... | |
struct | ay_acurve_object |
Approximating curve object. More... | |
struct | ay_concatnc_object |
Concatenate curves object. More... | |
struct | ay_offnc_object |
Offset curves object. More... | |
struct | ay_cap_object |
Cap surface object. More... | |
struct | ay_bevel_object |
Bevel surface object. More... | |
struct | ay_clone_object |
Clone object. More... | |
struct | ay_camera_object |
Camera object. More... | |
struct | ay_riinc_object |
RenderMan Interface Bytestream include object. More... | |
struct | ay_riproc_object |
RenderMan Interface Bytestream procedural object. More... | |
struct | ay_revolve_object |
Surface of revolution object. More... | |
struct | ay_extrude_object |
Extrusion surface object. More... | |
struct | ay_sweep_object |
Swept surface object. More... | |
struct | ay_swing_object |
Swung surface object. More... | |
struct | ay_birail1_object |
Birail surface object (from three curves). More... | |
struct | ay_birail2_object |
Birail surface object (from four curves). More... | |
struct | ay_skin_object |
Skinned surface object (Loft). More... | |
struct | ay_extrnc_object |
Extract curve from surface object. More... | |
struct | ay_extrnp_object |
Extract surface from surface object. More... | |
struct | ay_concatnp_object |
Concatenate surfaces object. More... | |
struct | ay_offnp_object |
Offset surface object. More... | |
struct | ay_ncircle_object |
Circle object. More... | |
struct | ay_script_object |
Script object. More... | |
struct | ay_view_object |
View object. More... | |
struct | ay_select_object |
Select object. More... | |
struct | ay_trim_object |
Trim surface object. More... | |
struct | ay_preferences |
User preferences. More... | |
struct | ay_ftable |
callback table More... | |
struct | ay_otable |
object table More... | |
Defines | |
#define | AYGLUCBTYPE |
#define | Tcl_GetErrorLine(interp) |
#define | AY_EPSILON |
to avoid direct comparison of doubles with 0.0 | |
#define | AY_APTRAN4(v1, v2, m) |
Apply 4x4 transformation matrix m to 3D point/vector in v2. | |
#define | AY_APTRAN3(v1, v2, m) |
Apply 4x4 transformation matrix m to 3D point/vector in v2. | |
#define | AY_M44(m, r, c) |
4x4 matrix element access | |
#define | AY_ISTRAFO(o) |
is ay_object o transformed? | |
#define | AY_CHTCLERRRET(stat, name, interp) |
check and report tcl error status, then return | |
#define | AY_CHTCLERRGOT(stat, name, interp) |
check and report tcl error status, then jump to cleanup label | |
#define | AY_PRINTCMDHELP(help) |
check for -h argument and print help message | |
#define | AY_MAX(a, b) |
compute maximum of two numbers | |
The Truth | |
#define | AY_TRUE |
#define | AY_FALSE |
Return/Error Codes | |
#define | AY_OK |
#define | AY_EWARN |
#define | AY_ERROR |
#define | AY_EFLUSH |
#define | AY_EOUTPUT |
#define | AY_EOMEM |
#define | AY_EOPENFILE |
#define | AY_ECLOSEFILE |
#define | AY_EFORMAT |
#define | AY_EUEOF |
#define | AY_EEOF |
#define | AY_EDONOTLINK |
#define | AY_ERANGE |
#define | AY_EUTAGTYPE |
#define | AY_ENOSEL |
#define | AY_EARGS |
#define | AY_EOPT |
#define | AY_EUOPT |
#define | AY_EWTYPE |
#define | AY_ETYPE |
#define | AY_ENTYPE |
#define | AY_EREF |
#define | AY_ENULL |
Object Type Ids | |
#define | AY_IDROOT |
#define | AY_IDNPATCH |
#define | AY_IDNCURVE |
#define | AY_IDLEVEL |
#define | AY_IDLIGHT |
#define | AY_IDBOX |
#define | AY_IDBPATCH |
#define | AY_IDVIEW |
#define | AY_IDCAMERA |
#define | AY_IDINSTANCE |
#define | AY_IDSPHERE |
#define | AY_IDDISK |
#define | AY_IDCONE |
#define | AY_IDCYLINDER |
#define | AY_IDPARABOLOID |
#define | AY_IDHYPERBOLOID |
#define | AY_IDTORUS |
#define | AY_IDRIINC |
#define | AY_IDMATERIAL |
#define | AY_IDICURVE |
#define | AY_IDREVOLVE |
#define | AY_IDEXTRUDE |
#define | AY_IDSWEEP |
#define | AY_IDSKIN |
#define | AY_IDCAP |
#define | AY_IDPAMESH |
#define | AY_IDPOMESH |
#define | AY_IDCONCATNC |
#define | AY_IDCLONE |
#define | AY_IDSDMESH |
#define | AY_IDGORDON |
#define | AY_IDTEXT |
#define | AY_IDBIRAIL1 |
#define | AY_IDBIRAIL2 |
#define | AY_IDEXTRNC |
#define | AY_IDSCRIPT |
#define | AY_IDRIPROC |
#define | AY_IDBEVEL |
#define | AY_IDNCIRCLE |
#define | AY_IDSWING |
#define | AY_IDSELECT |
#define | AY_IDEXTRNP |
#define | AY_IDOFFNC |
#define | AY_IDACURVE |
#define | AY_IDTRIM |
#define | AY_IDCONCATNP |
#define | AY_IDOFFNP |
#define | AY_IDIPATCH |
#define | AY_IDMIRROR |
#define | AY_IDDSKIN |
#define | AY_IDAPATCH |
#define | AY_IDLAST |
Level Object SubType Ids | |
#define | AY_LTEND |
#define | AY_LTLEVEL |
#define | AY_LTUNION |
#define | AY_LTDIFF |
#define | AY_LTINT |
#define | AY_LTPRIM |
View Object SubType Ids | |
#define | AY_VTFRONT |
#define | AY_VTSIDE |
#define | AY_VTTOP |
#define | AY_VTPERSP |
#define | AY_VTTRIM |
Shader Types | |
#define | AY_STSURFACE |
#define | AY_STDISPLACEMENT |
#define | AY_STVOLUME |
#define | AY_STLIGHT |
#define | AY_STIMAGER |
#define | AY_STTRANSFORMATION |
#define | AY_STAREALIGHT |
#define | AY_STINTERIOR |
#define | AY_STEXTERIOR |
#define | AY_STATMOSPHERE |
Shader Argument Types | |
#define | AY_SASCALAR |
#define | AY_SAPOINT |
#define | AY_SANORMAL |
#define | AY_SAVECTOR |
#define | AY_SACOLOR |
#define | AY_SASTRING |
#define | AY_SAMATRIX |
Light Source Types | |
#define | AY_LITCUSTOM |
#define | AY_LITPOINT |
#define | AY_LITDISTANT |
#define | AY_LITSPOT |
NURBS Curve Types | |
#define | AY_CTOPEN |
#define | AY_CTCLOSED |
#define | AY_CTPERIODIC |
Knot Vector Types | |
#define | AY_KTBEZIER |
#define | AY_KTBSPLINE |
#define | AY_KTNURB |
#define | AY_KTCUSTOM |
#define | AY_KTCHORDAL |
#define | AY_KTCENTRI |
#define | AY_KTUNIFORM |
Patch Mesh Types | |
#define | AY_PTBILINEAR |
#define | AY_PTBICUBIC |
Basis Matrix Types | |
#define | AY_BTBEZIER |
#define | AY_BTBSPLINE |
#define | AY_BTCATMULLROM |
#define | AY_BTHERMITE |
#define | AY_BTPOWER |
#define | AY_BTCUSTOM |
Subdivision Schemes | |
#define | AY_SDSCATMULL |
#define | AY_SDSLOOP |
Subdivision Tag Types | |
#define | AY_SDTHOLE |
Hole. | |
#define | AY_SDTCORNER |
Corner. | |
#define | AY_SDTCREASE |
Crease. | |
#define | AY_SDTIB |
Interpolate Boundary. | |
Procedural Object Types | |
#define | AY_PRTDREADA |
Delayed Read Archive. | |
#define | AY_PRTRUNPROG |
Run Program. | |
#define | AY_PRTDYNLOAD |
Dynamic Load. | |
Cap Types | |
#define | AY_CATNONE |
No Cap. | |
#define | AY_CATTRIM |
Trim Cap. | |
#define | AY_CATSIMPLE |
Simple Cap. | |
#define | AY_CATSIMPLEINT |
Simple Cap Integrated. | |
#define | AY_CATGORDON |
Gordon Cap. | |
Offset Curve Types | |
#define | AY_OCTPOINT |
Point. | |
#define | AY_OCTSECTION |
Section. | |
#define | AY_OCTHYBRID |
Hybrid (Point+Section). | |
#define | AY_OCT3DPVN |
3D Normals from Primitive Variable | |
#define | AY_OCT3DPVNB |
3D Binormals from Primitive Variable | |
#define | AY_OCTPLANENORMAL |
3D Normal from Curve | |
Point Types | |
#define | AY_PT3D |
Normal 3D Point. | |
#define | AY_PTRAT |
Rational (4D) Point. | |
#define | AY_PTKNOT |
Knot Point. | |
Drawing Modes | |
#define | AY_DMWIRE |
#define | AY_DMSHADE |
#define | AY_DMSHADEWIRE |
#define | AY_DMWIREHIDDEN |
#define | AY_DMISOPHOTES |
Directions | |
#define | AY_NORTH |
#define | AY_EAST |
#define | AY_SOUTH |
#define | AY_WEST |
#define | AY_FORWARD |
#define | AY_BACKWARD |
Great Planes | |
#define | AY_XY |
#define | AY_YZ |
#define | AY_XZ |
Generic Operations | |
#define | AY_OPREVERT |
#define | AY_OPOPEN |
#define | AY_OPCLOSE |
#define | AY_OPREFINE |
#define | AY_OPCOARSEN |
Texture Selectors | |
#define | AY_TIISOPHOTES |
#define | AY_TISILHOUETTES |
#define | AY_TIVPRENDER |
Transformation Element Selector | |
#define | AY_MOV |
#define | AY_ROT |
#define | AY_SCA |
Transcendent Tools | |
#define | AY_PI |
#define | AY_HALFPI |
#define | AY_D2R(x) |
#define | AY_R2D(x) |
#define | AY_COT(x) |
Basic Vector Arithmetic | |
#define | AY_VLEN(x, y, z) |
#define | AY_V3LEN(v) |
#define | AY_V2LEN(v) |
#define | AY_V3ZERO(v) |
#define | AY_V3SUB(r, v1, v2) |
#define | AY_V2SUB(r, v1, v2) |
#define | AY_V3ADD(r, v1, v2) |
#define | AY_V3MUL(r, v1, v2) |
#define | AY_V3CROSS(r, v1, v2) |
#define | AY_V3SCAL(v, f) |
#define | AY_V2SCAL(v, f) |
#define | AY_V3DOT(v1, v2) |
#define | AY_V2DOT(v1, v2) |
#define | AY_V3DIST(v1, v2) |
#define | AY_V3SDIST(v1, v2) |
#define | AY_V4COMP(v1, v2) |
#define | AY_V3COMP(v1, v2) |
#define | AY_V2COMP(v1, v2) |
Version Strings and Numbers | |
#define | AY_VERSIONSTR |
#define | AY_VERSIONSTRMI |
#define | AY_VERSIONMA |
#define | AY_VERSION |
#define | AY_VERSIONMI |
Typedefs | |
typedef int( | ay_sevalcb )(Tcl_Interp *interp, char *script, int compile, Tcl_Obj **cscript) |
Script evaluation callback. | |
typedef void(* | ay_voidfp )(void) |
to avoid the use of "void *" to store function pointers | |
typedef int( | ay_createcb )(int argc, char *argv[], ay_object *o) |
Create callback, think constructor. | |
typedef int( | ay_deletecb )(void *c) |
Delete callback, think destructor. | |
typedef int( | ay_copycb )(void *src, void **dst) |
Copy callback, think copy constructor. | |
typedef int( | ay_drawcb )(struct Togl *togl, ay_object *o) |
Draw callback. | |
typedef int( | ay_propcb )(Tcl_Interp *interp, int argc, char *argv[], ay_object *o) |
Get/Set properties callback. | |
typedef int( | ay_getpntcb )(int mode, ay_object *o, double *p, ay_pointedit *pe) |
Select editable points callback. | |
typedef int( | ay_wribcb )(char *file, ay_object *o) |
RIB export callback. | |
typedef int( | ay_readcb )(FILE *fileptr, ay_object *o) |
Read (from Ayam scene file) callback. | |
typedef int( | ay_writecb )(FILE *fileptr, ay_object *o) |
Write (to Ayam scene file) callback. | |
typedef int( | ay_notifycb )(ay_object *o) |
Notification (update after changes to children) callback. | |
typedef int( | ay_treedropcb )(ay_object *o) |
Tree drop (update after Drag and Drop operation in TreeView) callback. | |
typedef int( | ay_comparecb )(ay_object *o1, ay_object *o2) |
Compare callback. | |
typedef int( | ay_convertcb )(ay_object *o, int in_place) |
Convert callback. | |
typedef int( | ay_providecb )(ay_object *o, unsigned int type, ay_object **result) |
Provide callback. | |
typedef int( | ay_peekcb )(ay_object *o, unsigned int type, ay_object **result, double *transform) |
Peek callback. | |
typedef int( | ay_bbccb )(ay_object *o, double *bbox, int *flags) |
Calculate bounding box callback. | |
typedef int( | ay_inspntcb )(ay_object *o, int *index, double *objXYZ, int edit) |
Insert point callback. | |
typedef int( | ay_delpntcb )(ay_object *o, int *index, double *objXYZ) |
Delete point callback. | |
typedef int( | ay_genericcb )(ay_object *o, int op) |
Generic operation callback. | |
Variables | |
Tcl_Interp * | ay_interp |
Main Ayam Tcl interpreter. | |
Tcl_Interp * | ay_safeinterp |
Safe Tcl interpreter (e.g. for Script object scripts). | |
ay_preferences | ay_prefs |
user preferences | |
ay_object * | ay_root |
pointer to the root object | |
ay_object * | ay_endlevel |
pointer to the terminating end level object | |
ay_object ** | ay_next |
pointer to pointer (pointer to some objects ->next or ->down slot) where the next object will be linked to | |
ay_view_object * | ay_currentview |
current view | |
ay_list_object * | ay_selection |
current object selection | |
ay_list_object * | ay_currentlevel |
current level | |
ay_object * | ay_clipboard |
object clipboard | |
GLUquadric * | ay_gluquadobj |
global GLU quadric object (for drawing quadrics with GLU) | |
Tcl_HashTable | ay_otypesht |
table of registered object types | |
ay_otable | ay_typenamest |
table of registered object type names | |
Tcl_HashTable | ay_tagtypesht |
table of registered tag types | |
Tcl_HashTable | ay_languagesht |
table of registered script languages | |
ay_ftable | ay_sevalcbt |
all registered script evaluation callbacks | |
int | ay_errno |
global error number | |
int | ay_read_version |
currently read scene file version (!= Ayam version!) | |
int | ay_read_viewnum |
currently read view number (internal views get different treatment) | |
unsigned int | ay_glname |
current gl name (for object picking) | |
int | ay_wrib_framenum |
current frame number in RIB export | |
unsigned int | ay_wrib_primlevel |
current primitive level in RIB export (to avoid nested RiSolid()s) | |
char * | ay_version_ma |
major Ayam version number | |
char * | ay_version_mi |
minor Ayam version number | |
function pointer tables (object callbacks) | |
ay_ftable | ay_createcbt |
all registered create callbacks | |
ay_ftable | ay_deletecbt |
all registered delete callbacks | |
ay_ftable | ay_copycbt |
all registered copy callbacks | |
ay_ftable | ay_drawcbt |
all registered draw callbacks | |
ay_ftable | ay_drawhcbt |
all registered draw handles callbacks | |
ay_ftable | ay_drawacbt |
all registered draw annotations callbacks | |
ay_ftable | ay_shadecbt |
all registered shade callbacks | |
ay_ftable | ay_getpropcbt |
all registered get properties callbacks | |
ay_ftable | ay_setpropcbt |
all registered set properties callbacks | |
ay_ftable | ay_getpntcbt |
all registered get points callbacks | |
ay_ftable | ay_wribcbt |
all registered RIB export callbacks | |
ay_ftable | ay_readcbt |
all registered read callbacks | |
ay_ftable | ay_writecbt |
all registered write callbacks | |
ay_ftable | ay_notifycbt |
all registered notify callbacks | |
ay_ftable | ay_bbccbt |
all registered bounding box calculation callbacks | |
ay_ftable | ay_treedropcbt |
all registered tree drop callbacks | |
ay_ftable | ay_convertcbt |
all registered conversion callbacks | |
ay_ftable | ay_providecbt |
all registered provide callbacks | |
ay_ftable | ay_peekcbt |
all registered peek callbacks | |
Tag names and types | |
unsigned int | ay_dummy_tagtype |
char * | ay_dummy_tagname |
unsigned int | ay_oi_tagtype |
char * | ay_oi_tagname |
unsigned int | ay_riattr_tagtype |
char * | ay_riattr_tagname |
unsigned int | ay_riopt_tagtype |
char * | ay_riopt_tagname |
unsigned int | ay_tc_tagtype |
char * | ay_tc_tagname |
unsigned int | ay_pv_tagtype |
char * | ay_pv_tagname |
unsigned int | ay_ridisp_tagtype |
char * | ay_ridisp_tagname |
unsigned int | ay_rihider_tagtype |
char * | ay_rihider_tagname |
unsigned int | ay_rimake_tagtype |
char * | ay_rimake_tagname |
unsigned int | ay_noexport_tagtype |
char * | ay_noexport_tagname |
unsigned int | ay_tp_tagtype |
char * | ay_tp_tagname |
unsigned int | ay_bns_tagtype |
char * | ay_bns_tagname |
unsigned int | ay_ans_tagtype |
char * | ay_ans_tagname |
unsigned int | ay_dbns_tagtype |
char * | ay_dbns_tagname |
unsigned int | ay_dans_tagtype |
char * | ay_dans_tagname |
unsigned int | ay_umm_tagtype |
char * | ay_umm_tagname |
unsigned int | ay_vmm_tagtype |
char * | ay_vmm_tagname |
unsigned int | ay_bp_tagtype |
char * | ay_bp_tagname |
unsigned int | ay_cp_tagtype |
char * | ay_cp_tagname |
unsigned int | ay_np_tagtype |
char * | ay_np_tagname |
unsigned int | ay_rp_tagtype |
char * | ay_rp_tagname |
unsigned int | ay_hc_tagtype |
char * | ay_hc_tagname |
unsigned int | ay_no_tagtype |
char * | ay_no_tagname |
unsigned int | ay_nm_tagtype |
char * | ay_nm_tagname |
unsigned int | ay_nt_tagtype |
char * | ay_nt_tagname |
unsigned int | ay_aswire_tagtype |
char * | ay_aswire_tagname |
unsigned int | ay_mn_tagtype |
char * | ay_mn_tagname |
unsigned int | ay_mp_tagtype |
char * | ay_mp_tagname |
unsigned int | ay_sb_tagtype |
char * | ay_sb_tagname |
unsigned int | ay_sbc_tagtype |
char * | ay_sbc_tagname |
unsigned int | ay_peek_tagtype |
char * | ay_peek_tagname |
unsigned int | ay_da_tagtype |
char * | ay_da_tagname |
unsigned int | ay_ti_tagtype |
char * | ay_ti_tagname |
unsigned int | ay_rs_tagtype |
char * | ay_rs_tagname |
Generic Error Message Strings | |
char * | ay_error_igntype |