Data Structures | Defines | Typedefs | Variables

ayam.h File Reference

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_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_nurbcurve_object
 NURBS curve object. More...
struct  ay_stess_uvp
 a tesselated NURBS patch point More...
struct  ay_stess
 a complete tesselation More...
struct  ay_nurbpatch_object
 NURBS patch object. More...
struct  ay_ipatch_object
 IPatch object. More...
struct  ay_pamesh_object
 PatchMesh object. More...
struct  ay_pomesh_object
 PolyMesh object. More...
struct  ay_sdmesh_object
 SubdivisionMesh object. More...
struct  ay_gordon_object
 Gordon 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...

Defines

#define AYGLUCBTYPE
#define AY_POINTER
 size of arrows
#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
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_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_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_BTCUSTOM
Subdivision Schemes

#define AY_SDSCATMULL
#define AY_SDSLOOP
Subdivision Tag Types

#define AY_SDTHOLE
#define AY_SDTCORNER
#define AY_SDTCREASE
#define AY_SDTIB
Procedural Object Types

#define AY_PRTDREADA
 Delayed Read Archive.
#define AY_PRTRUNPROG
 Run Program.
#define AY_PRTDYNLOAD
 Dynamic Load.
Directions

#define AY_NORTH
#define AY_EAST
#define AY_SOUTH
#define AY_WEST
Great Planes

#define AY_XY
#define AY_YZ
#define AY_XZ
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_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_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_bbccb )(ay_object *o, double *bbox, int *flags)
 Calculate bounding box 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_objectay_root
 pointer to the root object
ay_objectay_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_objectay_currentview
 current view
ay_list_objectay_selection
 current object selection
ay_list_objectay_currentlevel
 current level
ay_objectay_clipboard
 object clipboard
GLUquadric * ay_gluquadobj
 global GLU quadric object (for drawing quadrics with GLU)
Tcl_HashTable ay_otypesht
 table of registered object types
Tcl_HashTable ay_typenamesht
 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_current_glname
 current gl name (for object picking)
int ay_wrib_framenum
 current frame number in RIB export
unsigned int ay_current_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

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_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
Tag names and types

char * ay_oi_tagtype
char * ay_oi_tagname
char * ay_riattr_tagtype
char * ay_riattr_tagname
char * ay_riopt_tagtype
char * ay_riopt_tagname
char * ay_tc_tagtype
char * ay_tc_tagname
char * ay_pv_tagtype
char * ay_pv_tagname
char * ay_ridisp_tagtype
char * ay_ridisp_tagname
char * ay_rihider_tagtype
char * ay_rihider_tagname
char * ay_noexport_tagtype
char * ay_noexport_tagname
char * ay_tp_tagtype
char * ay_tp_tagname
char * ay_bns_tagtype
char * ay_bns_tagname
char * ay_ans_tagtype
char * ay_ans_tagname
char * ay_dbns_tagtype
char * ay_dbns_tagname
char * ay_dans_tagtype
char * ay_dans_tagname
char * ay_umm_tagtype
char * ay_umm_tagname
char * ay_vmm_tagtype
char * ay_vmm_tagname
char * ay_bp_tagtype
char * ay_bp_tagname
char * ay_np_tagtype
char * ay_np_tagname
char * ay_rp_tagtype
char * ay_rp_tagname
char * ay_hc_tagtype
char * ay_hc_tagname
char * ay_no_tagtype
char * ay_no_tagname
char * ay_nm_tagtype
char * ay_nm_tagname
Generic Error Message Strings

char * ay_error_igntype

Detailed Description