Functions

aycore.h File Reference

Ayam Core API. More...

Go to the source code of this file.

Functions

int ay_bbc_get (ay_object *o, double *bbox)
 calculate the bounding box of object o
int ay_clear_scene (void)
 remove all objects from the scene
int ay_clear_scenetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to remove all objects from the scene.
int ay_clevel_find (ay_object *c, ay_object *o, int *found)
 find object o in the hierarchy beneath object c
int ay_clevel_add (ay_object *o)
 push object o onto current level stack
void ay_clevel_del (void)
 pop current level stack
int ay_clevel_delall (void)
 clear current level stack
int ay_clevel_gotop ()
 change current level to the top level
int ay_clevel_gotoptcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to change the current level to the top level.
int ay_clevel_gouptcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to change the current level to the parent level.
int ay_clevel_godowntcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to change the current level to the child level of the first selected object.
int ay_clevel_gettcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get a string specification of the current level.
int ay_clevel_cltcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to change the current level.
int ay_clipb_copytcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to copy selected objects to the object clipboard.
int ay_clipb_cuttcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to move selected objects to the object clipboard.
int ay_clipb_pastetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to copy the objects from the object clipboard to the scene.
int ay_clipb_movetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to move the objects from the object clipboard to the scene.
int ay_clipb_replacetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to replace the selected objects with the objects from the object clipboard.
int ay_comp_strcase (char *s1, char *s2)
 compare two strings
int ay_comp_register (ay_comparecb *compcb, unsigned int type_id)
 register a comparison callback
int ay_comp_init (void)
 initialize object comparison module
int ay_comp_objects (ay_object *o1, ay_object *o2)
 compare two objects
int ay_comp_trafos (ay_object *o1, ay_object *o2)
 compare the transformation attributes of two objects
int ay_comp_tags (ay_object *o1, ay_object *o2)
 compare the tags of two objects
int ay_convert_register (ay_convertcb *convcb, unsigned int type_id)
 register a conversion callback
int ay_convert_force (ay_object *o, int in_place)
 convert an object
int ay_convert_forcetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to convert the selected objects.
void ay_draw_object (struct Togl *togl, ay_object *o, int selected)
 draw an object
int ay_draw_view (struct Togl *togl, int draw_offset)
 draw a view
void ay_draw_grid (struct Togl *togl)
 draw the grid of a view
void ay_draw_arrow (struct Togl *togl, double *from, double *to)
 draw an arrow (to signify a vector or curve orientation)
void ay_draw_bgimage (struct Togl *togl)
 draw the background image
void ay_draw_needredraw (ay_list_object *oldsel, ay_list_object *newsel, int *result)
 decide whether to redraw
void ay_draw_trimview (void)
 draw a view of type Trim
void ay_draw_rectangle (int winwidth, int winheight, double xmin, double ymin, double xmax, double ymax)
 draw an rectangle in image space
void ay_draw_cs (struct Togl *togl)
 draw a coordinate system (three color coded axes)
void ay_error (int code, char *where, char *what)
 report an error to the user
int ay_error_tcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to report an error to the user.
void ay_error_glucb (GLenum err)
 GLU error callback.
void ay_error_formatdrange (double lb, double ub, char **detail)
 Format double range error message.
void ay_error_formatirange (int lb, int ub, char **detail)
 Format integer range error message.
int ay_error_getglerrortcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Get the current GL error state and report it to the user.
int ay_geom_intersectlines3D (double *p1, double *t1, double *p2, double *t2, double *p)
 calculate intersection of two 3D lines
int ay_geom_intersectlines2D (double *p1, double *t1, double *p2, double *t2, double *p)
 calculate intersection of two 2D lines
void ay_geom_calcnfrom3 (double *p1, double *p2, double *p3, double *n)
 calculate normal from three points
int ay_instt_createoidht (ay_object *o)
 Build OID hash table (OID->master).
void ay_instt_connect (ay_object *o, ay_object **last)
 Connect instance objects to master objects based on OID tag information.
int ay_instt_createoid (char **dest)
 Create OID string.
int ay_instt_createorigids (ay_object *o)
 Create OID tags for all referenced objects.
int ay_instt_createinstanceids (ay_object *o)
 Create OID tags for all instance objects.
int ay_instt_clearoidtags (ay_object *o)
 Remove all OID tags from the scene.
int ay_instt_findinstance (ay_object *r, ay_object *o)
 Search for instance objects.
void ay_instt_remclipboard (ay_object *o)
 Remove all instances of object o from clipboard.
void ay_instt_clearclipboard (ay_object *o)
 Check if there are instances in the clipboard, remove them.
int ay_instt_wribiarchives (char *file, ay_object *o)
 RIB export of instances to RI archives.
int ay_instt_resolve (ay_object *i)
 resolve instance to normal object
int ay_instt_resolvetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to resolve selected instances to normal objects.
int ay_instt_checkinstance (ay_object *o, ay_object *target, ay_object *instance, int *check_this_tree)
 DnD helper.
int ay_instt_check (ay_object *o, ay_object *target)
 DnD helper.
int ay_instt_getmastertcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to find the master of the selected instance.
int ay_instt_countrefs (ay_object *o, ay_object *m, unsigned int *refs)
 find instances of a master and count them
void ay_instt_init (Tcl_Interp *interp)
 initialize instance tool module
int ay_interpol_1DA4D (double p, int len, double *st, double *en, double *ta)
 interpolate between two arrays of homogenous 3D coordinates
int ay_interpol_1DA1D (double p, int len, double *st, double *en, double *ta)
 interpolate between two arrays of doubles
int ay_interpol_trafos (double p, ay_object *o1, ay_object *o2, ay_object *ta)
 interpolate between two sets of transformation attributes
int ay_interpol_ncurves (double p, ay_object *c1, ay_object *c2, ay_object **ta)
 interpolate between two curves
int ay_notify_register (ay_notifycb *notcb, unsigned int type_id)
 register notify callback
int ay_notify_parent (void)
 call notification callbacks of all parent objects (of current level)
int ay_notify_object (ay_object *o)
 call notification callback of object o
int ay_notify_parentof (ay_object *o, int silent)
 call notification callback of parent of object o
int ay_notify_objecttcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to enforce notification of selected objects.
int ay_notify_findparents (ay_object *o, ay_object *r, ay_list_object **parents)
 find parents
int ay_notify_complete (ay_object *r)
 do complete notification for object r
int ay_notify_init (Tcl_Interp *interp)
 initialize notification module
Tk_RestrictAction ay_ns_restrictall (ClientData clientData, XEvent *eventPtr)
 restrict processing of Tk events
int ay_ns_execute (ay_object *o, char *script)
 execute script from ANS/BNS tag
void ay_ns_init (Tcl_Interp *interp)
 initialize notify script tag module
int ay_oact_parseargs (struct Togl *togl, int argc, char *argv[], char *fname, double *winx, double *winy, double *owinx, double *owiny)
 helper function to parse args
int ay_oact_movetcb (struct Togl *togl, int argc, char *argv[])
 move object modelling action
int ay_oact_rottcb (struct Togl *togl, int argc, char *argv[])
 rotate object modelling action
int ay_oact_rotatcb (struct Togl *togl, int argc, char *argv[])
 rotate about mark object modelling action
int ay_oact_sc1DXcb (struct Togl *togl, int argc, char *argv[])
 scale 1D X object modelling action
int ay_oact_sc1DXAcb (struct Togl *togl, int argc, char *argv[])
 scale 1D X about mark object modelling action
int ay_oact_sc1DYcb (struct Togl *togl, int argc, char *argv[])
 scale 1D Y object modelling action
int ay_oact_sc1DYAcb (struct Togl *togl, int argc, char *argv[])
 scale 1D Y about mark object modelling action
int ay_oact_sc1DZcb (struct Togl *togl, int argc, char *argv[])
 scale 1D Z object modelling action
int ay_oact_sc1DZAcb (struct Togl *togl, int argc, char *argv[])
 scale 1D Z about mark object modelling action
int ay_oact_sc2Dcb (struct Togl *togl, int argc, char *argv[])
 scale 2D object modelling action
int ay_oact_sc3Dcb (struct Togl *togl, int argc, char *argv[])
 scale 3D object modelling action
int ay_oact_str2Dcb (struct Togl *togl, int argc, char *argv[])
 stretch 2D object modelling action
int ay_oact_sc2DAcb (struct Togl *togl, int argc, char *argv[])
 scale 2D about mark object modelling action
int ay_oact_str2DAcb (struct Togl *togl, int argc, char *argv[])
 stretch 2D about mark object modelling action
int ay_oact_sc3DAcb (struct Togl *togl, int argc, char *argv[])
 scale 3D about mark object modelling action
void ay_object_defaults (ay_object *o)
 reset attributes of object o to defaults
int ay_object_create (unsigned int index, ay_object **o)
 create an object
int ay_object_createargs (unsigned int index, int argc, char **argv, ay_object **o)
 create an object with parameters
int ay_object_createtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to create a new object and link it to the current level.
int ay_object_delete (ay_object *o)
 delete an objet
int ay_object_deletemulti (ay_object *o)
 delete multiple (connected) objects
int ay_object_deletetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to delete selected objects.
int ay_object_link (ay_object *o)
 link object to the scene hierarchy
int ay_object_unlink (ay_object *o)
 unlink object from the scene hierarchy
char * ay_object_gettypename (unsigned int index)
 get type name
char * ay_object_getname (ay_object *o)
 get name of object o
int ay_object_setnametcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to set the name of the selected objects.
int ay_object_copy (ay_object *src, ay_object **dst)
 copy an object
int ay_object_copymulti (ay_object *src, ay_object **dst)
 copy multiple (connected) objects
int ay_object_haschildtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to inquire whether an object has children.
int ay_object_gettypetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get the type of an object.
int ay_object_getnametcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get the name of the selected object.
int ay_object_crtendlevel (ay_object **o)
 create level terminator object
int ay_object_deleteinstances (ay_object **o)
 remove instances of object o
int ay_object_replace (ay_object *src, ay_object *dst)
 replace object dst with src
unsigned int ay_object_count (ay_object *o)
 count objects beneath o
int ay_object_candelete (ay_object *p, ay_object *o)
 can objects in o be deleted?
int ay_otype_registercore (char *name, ay_createcb *crtcb, ay_deletecb *delcb, ay_copycb *copycb, ay_drawcb *drawcb, ay_drawcb *drawhcb, ay_drawcb *shadecb, ay_propcb *setpropcb, ay_propcb *getpropcb, ay_getpntcb *getpntcb, ay_readcb *readcb, ay_writecb *writecb, ay_wribcb *wribcb, ay_bbccb *bbccb, unsigned int type_index)
 register core object type (with known type id)
int ay_otype_register (char *name, ay_createcb *crtcb, ay_deletecb *delcb, ay_copycb *copycb, ay_drawcb *drawcb, ay_drawcb *drawhcb, ay_drawcb *shadecb, ay_propcb *setpropcb, ay_propcb *getpropcb, ay_getpntcb *getpntcb, ay_readcb *readcb, ay_writecb *writecb, ay_wribcb *wribcb, ay_bbccb *bbccb, unsigned int *type_index)
 register object type (from plugin, create a type id)
void ay_matt_init (Tcl_Interp *interp)
 initialize material tools module
int ay_matt_registermaterial (char *name, ay_mat_object *mat)
 register a material
int ay_matt_isregistered (char *name)
 check, whether material name is registered
int ay_matt_deregister (char *name)
 de-register material
int ay_matt_getmaterial (char *name, ay_mat_object **material)
 get material object from name
int ay_matt_removeallrefs (ay_object *o)
 remove all material references
int ay_matt_removerefs (ay_object *o, ay_mat_object *material)
 remove all references to given material
int ay_matt_removecliprefs (ay_object *o)
 remove material references from clipboard
void ay_matt_connect (ay_object *o)
 Connect objects to the appropriate material objects (using MI tags).
int ay_matt_creatematerialids (ay_object *o)
 Creates MI tags for all objects with a material.
int ay_matt_clearmaterialids (ay_object *o)
 Removes MI tags.
int ay_matt_wrib (char *file, ay_mat_object *m)
 RIB export of material information.
void ay_matt_nomaterial (unsigned int type)
 objects of type may have no material
int ay_matt_mayhavematerial (unsigned int type)
 Check whether objects of given type may have a material.
void ay_pact_clearpointedit (ay_pointedit *pe)
 helper to clear a pointedit structure
int ay_pact_getpoint (int mode, ay_object *o, double *obj, ay_pointedit *pe)
 pick points
int ay_pact_seltcb (struct Togl *togl, int argc, char *argv[])
 tag/select point action
int ay_pact_insertptcb (struct Togl *togl, int argc, char *argv[])
 insert point action
int ay_pact_deleteptcb (struct Togl *togl, int argc, char *argv[])
 delete point action
int ay_pact_startpetcb (struct Togl *togl, int argc, char *argv[])
 start point action helper
int ay_pact_pentcb (struct Togl *togl, int argc, char *argv[])
 numerically edit coordinate values of points action
void ay_pact_griddify (double *n, double grid)
 helper to snap points to the grid
int ay_pact_petcb (struct Togl *togl, int argc, char *argv[])
 direct point edit action
int ay_pact_wetcb (struct Togl *togl, int argc, char *argv[])
 edit weights action
int ay_pact_wrtcb (struct Togl *togl, int argc, char *argv[])
 reset all weights action
int ay_pact_snaptogridcb (struct Togl *togl, int argc, char *argv[])
 snap selected points to the grid action
int ay_pact_snaptomarkcb (struct Togl *togl, int argc, char *argv[])
 snap selected points to the mark action
int ay_pact_multiptcb (struct Togl *togl, int argc, char *argv[])
 multiply selected points action
int ay_pomesht_destroy (ay_pomesh_object *pomesh)
 delete a polymesh object
int ay_pomesht_tesselate (ay_pomesh_object *pomesh)
 tesselate polymesh object (for drawing/shading purposes)
int ay_pomesht_merge (int merge_pv_tags, ay_list_object *list, ay_object **result)
 merge polymesh objects
int ay_pomesht_mergetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to merge the selected polymesh objects.
int ay_pomesht_optimizecoords (ay_pomesh_object *pomesh, int ignore_normals)
 optimize polymesh object
int ay_pomesht_optimizetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to optimize the selected polymesh objects.
int ay_pomesht_tosdmesh (ay_pomesh_object *pomesh, ay_sdmesh_object **sdmesh)
 convert polymesh object to subdision mesh object
int ay_pomesht_splitface (ay_pomesh_object *pomesh, unsigned int f, ay_pomesh_object *target)
 split off a face from a polymesh object
int ay_pomesht_split (ay_pomesh_object *pomesh, ay_point *pnts, ay_pomesh_object **result)
 split off a part from a polymesh object
int ay_pomesht_splittcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to split selected faces from selected polymesh objects.
int ay_prefs_gettcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get the preferences (C => Tcl).
int ay_prefs_settcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to set the preferences (Tcl => C).
int ay_prop_gettcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get the property of an object.
int ay_prop_settcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to set the property of an object.
int ay_prop_gettrafotcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get the transformations property.
int ay_prop_settrafotcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to set the transformations property.
int ay_prop_getattrtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get the attributes property.
int ay_prop_setattrtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to set the attributes property.
int ay_prop_getmattcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get the material property.
int ay_prop_setmattcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to set the material property.
int ay_prop_getnpinfo (Tcl_Interp *interp, char *n1, ay_object *o)
 generate nurbs patch configuration info string
int ay_prop_getncinfo (Tcl_Interp *interp, char *n1, ay_object *o)
 generate nurbs curve configuration info string
int ay_provide_register (ay_providecb *provcb, unsigned int type_id)
 register a provide callback
int ay_provide_object (ay_object *o, unsigned int type, ay_object **result)
 provide an object of desired type
int ay_pv_filltokpar (ay_object *o, int declare, int start, int *added, RtToken tokens[], RtPointer parms[])
 parse all PV tags to RtToken/RtPointer arrays
int ay_pv_add (ay_object *o, char *name, char *detail, int type, int datalen, int stride, void *data)
 add PV tag to an object
int ay_pv_merge (ay_tag *t1, ay_tag *t2, ay_tag **mt)
 merge two PV tags into one
int ay_pv_cmpndt (ay_tag *t1, ay_tag *t2)
 compare two PV tags name, detail, and data type
int ay_pv_checkndt (ay_tag *t, const char *name, const char *detail, const char *type)
 check a PV tags name, detail, and data type
int ay_pv_getdetail (ay_tag *t, char **detail)
 return a PV tags detail
int ay_pv_convert (ay_tag *tag, int type, unsigned int *datalen, void **data)
 convert PV tag data to value array
int ay_pv_getst (ay_object *o, char *mys, char *myt, void **data)
 get texture coordinates from PV tag
int ay_pv_getvc (ay_object *o, int stride, char *myc, void **data)
 get vertex colors from PV tag
int ay_pv_count (ay_object *o)
 count PV tags of object o
void ay_pv_init (Tcl_Interp *interp)
 initialize pv module
void ay_quat_axistoquat (double a[3], double phi, double q[4])
 convert rotation from axis/angle to quaternion
void ay_quat_norm (double q[4])
 normalize a quaternion
void ay_quat_add (double q1[4], double q2[4], double dest[4])
 add two quaternions
void ay_quat_torotmatrix (double q[4], double m[16])
 convert quaternion to rotation matrix
void ay_quat_toeuler (double q[4], double euler[3])
 convert quaternion to euler angles
void ay_quat_slerp (double t, double q1[4], double q2[4], double r[4])
 interpolate between two quaternions
double ay_quat_dot (double q1[4], double q2[4])
 calculate dot product of two quaternions
void ay_quat_inv (double q[4])
 calculate inverted quaternion
int ay_read_string (FILE *fileptr, char **result)
 read string from Ayam scene file
int ay_read_unistring (FILE *fileptr, Tcl_UniChar **result)
 read UNICODE string from Ayam scene file
int ay_read_skip (FILE *fileptr)
 skip to next object
int ay_read_header (FILE *fileptr)
 read header info from Ayam scene file
int ay_read_attributes (FILE *fileptr, ay_object *o)
 read standard object attributes from Ayam scene file
int ay_read_tags (FILE *fileptr, ay_object *o)
 read object tags from Ayam scene file
int ay_read_shader (FILE *fileptr, ay_shader **result)
 read shader from Ayam scene file
int ay_read_object (FILE *fileptr)
 read object from Ayam scene file
int ay_read_scene (Tcl_Interp *interp, char *filename, int insert)
 read scene from Ayam scene file
int ay_read_replacetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to open (replace) a scene file.
int ay_read_inserttcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to open (insert) a scene file.
int ay_riattr_wrib (ay_object *o)
 RIB export of RiAttr tag data.
void ay_riattr_init (Tcl_Interp *interp)
 initialize riattr module
int ay_riopt_wrib (ay_object *o)
 RIB export of RiOpt tag data.
void ay_riopt_init (Tcl_Interp *interp)
 initialize riopt module
int ay_sdmesht_tesselate (ay_sdmesh_object *sdmesh)
 tesselate a SDMesh (for drawing/shading purposes)
int ay_sdmesht_topolymesh (ay_sdmesh_object *sdmesh, ay_pomesh_object **pomesh)
 convert a SDMesh to a PolyMesh
int ay_sel_free (int clear_selflag)
 clear the selection
int ay_sel_add (ay_object *o)
 add object to selection
int ay_sel_selobtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to set the selection.
int ay_sel_getseltcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get the selection.
int ay_sel_hsltcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to silently select the last object in current level.
void ay_sel_clearselflag (ay_object *o)
 helper to clear selected flags from object hierarchies
void ay_selp_clear (ay_object *o)
 clear point selection of an object
int ay_selp_selall (ay_object *o)
 select all points of an object
int ay_selp_applytrafotcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to apply object transformations to points.
int ay_selp_invert (ay_object *o)
 invert point selection of an object
int ay_selp_inverttcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to invert the point selection of an object.
int ay_selp_center (ay_point *p, int dim, double *center)
 center selected points
int ay_selp_getcenter (ay_point *p, int mode, double *center)
 get center of selected points
int ay_selp_centertcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to center all points of an object.
int ay_selp_sel (ay_object *o, unsigned int indiceslen, unsigned int *indices)
 add points to point selection
int ay_selp_seltcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to manipulate the point selection.
int ay_selp_rem (ay_object *o, unsigned int index)
 repair selected points indizes after point removal
int ay_selp_ins (ay_object *o, unsigned int index, int addtoselp)
 repair selected points indizes after point insertion
int ay_selp_getpnts (int mode, ay_object *o, double *p, ay_pointedit *pe, int readonly, int arrlen, int stride, double *arr)
 getpnts callback helper
void ay_selp_selectmpnc (ay_object *o, int select_all)
 properly select multiple points of a NURBS curve
void ay_shade_object (struct Togl *togl, ay_object *o, int push_name)
 shade an object
int ay_shade_view (struct Togl *togl)
 shade complete scene
int ay_shader_scanslctcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to scan a SLC (BMRT) shader.
int ay_shader_scanslxtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to scan a SLX (Aqsis) shader.
int ay_shader_free (ay_shader *shader)
 delete a shader
int ay_shader_copyarg (ay_shader_arg *source, ay_shader_arg **dest)
 copy a shader argument
int ay_shader_copy (ay_shader *source, ay_shader **dest)
 copy a shader
int ay_shader_wrib (ay_shader *shader, int type, RtLightHandle *light_handle)
 RIB export of a shader.
int ay_shader_gettcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get a shader property.
int ay_shader_settcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to set a shader property.
int ay_table_init (ay_ftable *table)
 initialize callback table
int ay_table_additem (ay_ftable *table, ay_voidfp newitem, unsigned int index)
 add item to callback table
void ay_tags_delall (ay_object *o)
 delete all tags from object o
void ay_tags_free (ay_tag *tag)
 delete a single tag
int ay_tags_copy (ay_tag *source, ay_tag **dest)
 copy a single tag
int ay_tags_copyall (ay_object *src, ay_object *dst)
 copy all tags from object src to object dst
int ay_tags_append (ay_object *o, ay_tag *tag)
 append tag to object
int ay_tags_register (Tcl_Interp *interp, char *name, char **result)
 register a tag type
int ay_tags_settcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to set the tags property.
int ay_tags_addtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to add tags to an object.
int ay_tags_gettcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get the tags property.
int ay_tags_deletetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to delete tags from an object.
int ay_tags_parseplist (char *str, int declare, RtInt *argc, RtToken **tokensr, RtPointer **valuesr)
 parse PV tags for RIB export
int ay_tags_reconnect (ay_object *o, char *tagtype, char *tagname)
 reconnect already existing tags after late tag type registration
int ay_tags_addnonm (ay_object *o, ay_object *m)
 add NO/NM tags
int ay_tags_remnonm (ay_object *o, ay_object *m)
 remove NO/NM tags
int ay_tc_wrib (ay_object *o)
 write the first TC tag from object o to RIB
int ay_tc_wribindex (ay_object *o, int index)
 write single TC tag from object o to RIB
int ay_tc_count (ay_object *o)
 count TC tags of object o
void ay_tc_init (Tcl_Interp *interp)
 initialize tc module by registering the TC tag type
int ay_tcmd_convdlist (char *vname, int *dllen, double **dl)
 convert a Tcl list of doubles to a C array of doubles
int ay_tcmd_reverttcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to revert curves.
void ay_tcmd_showall (ay_object *o)
 show all objects below o
int ay_tcmd_showtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to show (un-hide) all objects.
void ay_tcmd_hideall (ay_object *o)
 hide all objects below o
int ay_tcmd_hidetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to hide all objects.
int ay_tcmd_getvertcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get the Ayam version.
int ay_tcmd_getbppntfromindex (ay_bpatch_object *patch, int index, double **p)
 get bilinear patch coordinate address from index
int ay_tcmd_getpointtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get the coordinates of points.
int ay_tcmd_setpointtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to set the coordinates of points.
int ay_tcmd_withobtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to execute command for a single object.
int ay_tcmd_registerlang (char *name, char **result)
 Manage scripting language IDs.
int ay_tcmd_getuint (char *str, unsigned int *uint)
 convert string to unsigned int
int ay_tgui_init (Tcl_Interp *interp)
 initialize tesselation GUI module
int ay_tmp_gettcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to get a temporary filename.
void ay_toglcb_create (struct Togl *togl)
 create Togl callback
void ay_toglcb_destroy (struct Togl *togl)
 destroy Togl callback
void ay_toglcb_reshape (struct Togl *togl)
 reshape Togl callback (called when window is resized or exposed)
void ay_toglcb_display (struct Togl *togl)
 display Togl callback
void ay_trafo_apply3 (double *c, double *m)
 apply trafo to point (3D)
void ay_trafo_apply3v (double *c, unsigned int clen, unsigned int stride, double *m)
 apply trafo to vector of points (3D)
void ay_trafo_apply4 (double *c, double *m)
 apply trafo to point (4D)
void ay_trafo_apply4v (double *c, unsigned int clen, unsigned int stride, double *m)
 apply trafo to vector of points (4D)
void ay_trafo_getall (ay_list_object *lo)
 concatenate all trafos onto GL matrix stack
void ay_trafo_getalli (ay_list_object *lo)
 inversely concatenate all trafos onto GL matrix stack
void ay_trafo_getalls (ay_list_object *lo)
 concatenate all scale trafos onto GL matrix stack
void ay_trafo_getallis (ay_list_object *lo)
 inversely concatenate all scale trafos onto GL matrix stack
void ay_trafo_getallsr (ay_list_object *lo)
 concatenate all scale and rotate trafos onto GL matrix stack
void ay_trafo_getallisr (ay_list_object *lo)
 inversely concatenate all scale and rotate trafos onto GL matrix stack
void ay_trafo_getallr (ay_list_object *lo)
 concatenate all rotate trafos onto GL matrix stack
void ay_trafo_getallir (ay_list_object *lo)
 inversely concatenate all rotate trafos onto GL matrix stack
int ay_trafo_delegate (ay_object *o)
 delegate trafos to children
int ay_trafo_delegatetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to delegate the transformations to the children.
void ay_trafo_applyall (ay_list_object *lo, ay_object *o, double *p)
 apply transformations to a point (object to world)
void ay_trafo_applyalli (ay_list_object *lo, ay_object *o, double *p)
 inversely apply transformations to a point (world to object)
void ay_trafo_copy (ay_object *src, ay_object *dst)
 copy transformation attributes
void ay_trafo_add (ay_object *src, ay_object *dst)
 add transformation attributes
void ay_trafo_defaults (ay_object *o)
 initialize transformation attributes of object o to identity
int ay_trafo_movobtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to move an object.
int ay_trafo_movpntstcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to move the selected points of an object.
int ay_trafo_scalobtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to scale an object.
int ay_trafo_scalpntstcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to scale the selected points of an object.
int ay_trafo_rotobtcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to rotate an object.
int ay_trafo_rotpntstcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to rotate the selected points of an object.
void ay_trafo_multmatrix4 (double *m1, double *m2)
 multiply two transformation matrices
int ay_trafo_invmatrix4 (double *m, double *mi)
 invert transformation matrix
void ay_trafo_creatematrix (ay_object *o, double *m)
 initialize transformation matrix m from transformation attributes of o
void ay_trafo_decomposematrix (double *m, ay_object *o)
 decompose transformation matrix m to transformation attributes of o
void ay_trafo_identitymatrix (double *m)
 initialize transformation matrix m to identity
void ay_trafo_translatematrix (double x, double y, double z, double *m)
 add a translation to transformation matrix m
void ay_trafo_scalematrix (double x, double y, double z, double *m)
 add a scale transformation to transformation matrix m
void ay_trafo_rotatematrix (double angle, double x, double y, double z, double *m)
 add a rotation to transformation matrix m
void ay_trafo_pointstoplane (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double *A, double *B, double *C, double *D)
 convert 3 points to plane equation coefficients
void ay_trafo_scalecog (double scale, double *cv, int len, int stride)
 apply scale around cog for a number of points
int ay_undo_init (int buffer_size)
 initialize undo system
void ay_undo_clear (void)
 clear all undo states
void ay_undo_clearobj (ay_object *o)
 clear all undo states of object o
int ay_undo_undotcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to interface to the undo system.
int ay_vact_movetcb (struct Togl *togl, int argc, char *argv[])
 move/pan view modelling action
int ay_vact_zoomtcb (struct Togl *togl, int argc, char *argv[])
 zoom view modelling action
int ay_vact_moveztcb (struct Togl *togl, int argc, char *argv[])
 move (along z) view modelling action
void ay_viewt_setupprojection (struct Togl *togl)
 set up the camera projection of a view
void ay_viewt_rotate (ay_view_object *view, double rotx, double roty, double rotz)
 rotate a view
void ay_viewt_wintoobj (struct Togl *togl, ay_object *o, double winX, double winY, double *objX, double *objY, double *objZ)
 convert window coordinates to object space
void ay_viewt_winrecttoobj (struct Togl *togl, ay_object *o, double winX, double winY, double winX2, double winY2, double *obj)
 convert rectangle in window coordinates to object space
void ay_viewt_wintoworld (struct Togl *togl, double winX, double winY, double *worldX, double *worldY, double *worldZ)
 convert window coordinates to world space
int ay_viewt_zoomtoobj (struct Togl *togl, int argc, char *argv[])
 zoom a view to an object
int ay_viewt_align (struct Togl *togl, int argc, char *argv[])
 align a view to an object
void ay_viewt_alignlocal (void)
 align a view
int ay_viewt_makecurtcb (struct Togl *togl, int argc, char *argv[])
 make view (the associated GL context) current
void ay_viewt_changetype (ay_view_object *view, int type)
 change the type of a view (Front->Side)
int ay_viewt_reshapetcb (struct Togl *togl, int argc, char *argv[])
 update view after size changed
int ay_viewt_redrawtcb (struct Togl *togl, int argc, char *argv[])
 re-draw a view
int ay_viewt_setconftcb (struct Togl *togl, int argc, char *argv[])
 configure a view
int ay_viewt_updatemark (struct Togl *togl, int local)
 calculate new mark window coordinates
int ay_viewt_updateglobalmark (struct Togl *togl)
 manage the global mark after change in view togl
int ay_viewt_fromcamtcb (struct Togl *togl, int argc, char *argv[])
 copy from/to/up from the selected camera object to view togl
int ay_viewt_tocamtcb (struct Togl *togl, int argc, char *argv[])
 copy camera settings of view togl to the selected camera object
void ay_viewt_uprop (ay_view_object *view)
 update view property
int ay_viewt_griddify (struct Togl *togl, double *winx, double *winy)
 snap winx and winy to current grid
int ay_viewt_droptcb (struct Togl *togl, int argc, char *argv[])
 an object has been dropped onto a view window
int ay_viewt_setupintview (int viewnum, ay_object *o, ay_view_object *vtemp)
 setup internal view (while reading from scene file)
int ay_viewt_markfromsel (struct Togl *togl)
 set mark from selected objects cog
int ay_viewt_markfromselp (struct Togl *togl, int mode)
 set mark from selected points cog
int ay_viewt_saveimgtcb (struct Togl *togl, int argc, char *argv[])
 save TIFF image file
void ay_viewt_warpmouse (struct Togl *togl, double *coord, ay_object *o, double *newwinx, double *newwiny)
 warp mouse pointer to new position
int ay_wrib_isprimitive (ay_object *o)
 check, whether o should be considered a CSG primitive
int ay_wrib_noexport (ay_object *o)
 check for NoExport tags of an object
void ay_wrib_aimz (RtPoint direction)
 set up camera for RIB export
void ay_wrib_placecamera (RtPoint position, RtPoint direction, double roll)
 set up camera for RIB export
int ay_wrib_rioptions (void)
 export the RiOptions to a RIB file
int ay_wrib_checklights (ay_object *o)
 look through the scene whether there are any lights switched on
int ay_wrib_lights (char *file, ay_object *o)
 export the lights to a RIB file
void ay_wrib_rootsh (int imager)
 export the root object shaders to a RIB file
void ay_wrib_defmat (char *file)
 export the default material to a RIB file
int ay_wrib_trafos (ay_object *o)
 export transformations of an object to a RIB file
int ay_wrib_object (char *file, ay_object *o)
 export an object to a RIB file
int ay_wrib_toolobject (char *file, ay_object *o, ay_object *t)
 export a sub-object from a tool object to a RIB file
int ay_wrib_refobject (char *file, ay_object *o)
 export a referenced object to a RIB file
int ay_wrib_scene (char *file, char *image, int temp, int rtf, double *from, double *to, double roll, double zoom, double nearp, double farp, int width, int height, int type)
 export the scene to a RIB file
int ay_wrib_cb (struct Togl *togl, int argc, char *argv[])
 Togl callback for exporting the scene to a RIB file.
void ay_wrib_displaytags (void)
 export RiDisplay tags to a RIB file
void ay_wrib_hidertags (void)
 export RiHider tags to a RIB file
int ay_wrib_tcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to export the scene to a RIB file.
void ay_wrib_init (Tcl_Interp *interp)
 initialize RIB export module
int ay_write_header (FILE *fileptr)
 write the Ayam scene file format header to a scene file
int ay_write_attributes (FILE *fileptr, ay_object *o)
 save object attributes to a scene file
int ay_write_tags (FILE *fileptr, ay_object *o)
 save object tags to a scene file
void ay_write_shader (FILE *fileptr, ay_shader *shader)
 save a shader to a scene file
int ay_write_object (FILE *fileptr, ay_object *o)
 save an object to a scene file
int ay_write_scene (char *fname, int selected)
 save the scene to a scene file
int ay_write_scenetcmd (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
 Tcl command to save the scene to a scene file.

Detailed Description