home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / src / lib / pointlist / pointlist.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-29  |  1.4 KB  |  63 lines

  1. #include "geom.h"
  2. #include "pointlistP.h"
  3.  
  4. static char methods[][POINTLIST_MAXNAME] =
  5. {
  6.   POINTLIST_METHNAMES
  7. };
  8.  
  9. void *pointlist_default(int sel, Geom *geom, va_list args);
  10.  
  11. void pointlist_init() {
  12.   int i;
  13.  
  14.   for (i = 0; i < POINTLIST_MAXMETH; i++) 
  15.         GeomNewMethod(methods[i], pointlist_default);
  16.  
  17.   /* This should be the only place where the methods are mentioned by 
  18.    * name. */
  19.   ptlBezier_init();
  20.   ptlInst_init();
  21.   ptlList_init();
  22.   ptlMesh_init();
  23.   ptlPolylist_init();
  24.   ptlQuad_init();
  25.   ptlVect_init();
  26.  
  27. }
  28.  
  29. void pointlist_initspec(SpecFunc *specfunc, int n_func, GeomClass *class) {
  30.   int i;
  31.  
  32.   for (i = 0; i < n_func; i++) 
  33.     GeomSpecifyMethod(GeomMethodSel(specfunc[i].name), class, 
  34.              specfunc[i].func);
  35. }
  36.  
  37. void *pointlist_default(int sel, Geom *geom, va_list args) {
  38.   return NULL;
  39. }
  40.  
  41. HPoint3 *PointList_get(Geom *geom, Transform T, int CoordSystem)
  42. {
  43.   return (HPoint3 *)GeomCall(GeomMethodSel("PointList_get"), geom,
  44.                  T, CoordSystem);
  45. }
  46.  
  47. HPoint3 *PointList_fillin(Geom *geom, Transform T, int CoordSystem,
  48.               HPoint3 *plist) {
  49.   return (HPoint3 *)GeomCall(GeomMethodSel("PointList_fillin"), geom,
  50.                  T, CoordSystem, plist);
  51. }
  52.  
  53. void PointList_set(Geom *geom, int CoordSystem, HPoint3 *plist)
  54. {
  55.   GeomCall(GeomMethodSel("PointList_set"), geom, CoordSystem, plist);
  56. }
  57.  
  58. int PointList_length(Geom *geom) {
  59.   return (int)GeomCall(GeomMethodSel("PointList_length"), geom);
  60. }
  61.  
  62.  
  63.