Permalink
Browse files

f

f
  • Loading branch information...
1 parent bbcc0d5 commit 6308a0c42da0f45bfbd6886c6d6b47a08bec77f4 @neuroprod committed Apr 23, 2012
Showing with 4,016 additions and 0 deletions.
  1. BIN example/.DS_Store
  2. 0 example/bin/data/.gitignore
  3. +1 −0 example/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/GLUT
  4. +1 −0 example/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Headers
  5. +1 −0 example/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Resources
  6. BIN example/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/GLUT
  7. +18 −0 example/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/copy.h
  8. +96 −0 ...ple/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/extrude.h
  9. +137 −0 example/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/glsmap.h
  10. +102 −0 ...e/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/glsmapint.h
  11. +648 −0 example/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/glut.h
  12. +30 −0 .../bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/glutbitmap.h
  13. +90 −0 ...ple/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/glutf90.h
  14. +42 −0 .../bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/glutstroke.h
  15. +89 −0 example/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/gutil.h
  16. +391 −0 ...e/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/intersect.h
  17. +298 −0 example/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/port.h
  18. +98 −0 example/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/rot.h
  19. +98 −0 ...ple/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/segment.h
  20. +203 −0 example/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/tube.h
  21. +78 −0 ...ple/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/tube_gc.h
  22. +1,339 −0 ...ple/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Headers/vvector.h
  23. BIN ...in/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/Caution.tiff
  24. +55 −0 ...ug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUT.nib/classes.nib
  25. +25 −0 ...Debug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUT.nib/info.nib
  26. BIN ...ug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUT.nib/objects.nib
  27. +13 −0 ...ntents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTClipboard.nib/classes.nib
  28. +12 −0 .../Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTClipboard.nib/info.nib
  29. BIN ...ntents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTClipboard.nib/objects.nib
  30. +73 −0 ...ents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTPreferences.nib/classes.nib
  31. +16 −0 ...ontents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTPreferences.nib/info.nib
  32. BIN ...ents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTPreferences.nib/objects.nib
  33. BIN ...pleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/GLUTUI.strings
  34. BIN ...Debug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/English.lproj/InfoPlist.strings
  35. +24 −0 .../bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/Info.plist
  36. BIN ...fxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/blankCursor.tiff
  37. BIN ...xKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/bottomCursor.tiff
  38. BIN ...ectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/bottomleftCursor.tiff
  39. BIN ...ctExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/bottomrightCursor.tiff
  40. BIN ...fxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/crossCursor.tiff
  41. BIN ...fxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/cycleCursor.tiff
  42. BIN ...KinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/destroyCursor.tiff
  43. BIN ...xKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/fingerCursor.tiff
  44. BIN ...ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/helpCursor.tiff
  45. BIN ...ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/leftCursor.tiff
  46. BIN ...nectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/leftRightCursor.tiff
  47. BIN ...ectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/rightArrowCursor.tiff
  48. BIN ...fxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/rightCursor.tiff
  49. BIN ...fxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/sprayCursor.tiff
  50. BIN .../ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/topCursor.tiff
  51. BIN ...KinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/topleftCursor.tiff
  52. BIN ...inectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/toprightCursor.tiff
  53. BIN ...xKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/upDownCursor.tiff
  54. BIN ...ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/Resources/waitCursor.tiff
  55. +1 −0 example/bin/ofxKinectExampleDebug.app/Contents/Frameworks/GLUT.framework/Versions/Current
  56. +36 −0 example/bin/ofxKinectExampleDebug.app/Contents/Info.plist
  57. BIN example/bin/ofxKinectExampleDebug.app/Contents/MacOS/libfmodex.dylib
  58. BIN example/bin/ofxKinectExampleDebug.app/Contents/MacOS/ofxKinectExampleDebug
  59. +1 −0 example/bin/ofxKinectExampleDebug.app/Contents/PkgInfo
  60. BIN ...tExample.xcodeproj/project.xcworkspace/xcuserdata/kris.xcuserdatad/UserInterfaceState.xcuserstate
View
Binary file not shown.
No changes.
@@ -0,0 +1,18 @@
+
+/*
+ *
+ * Written By Linas Vepstas November 1991
+ */
+
+
+#define COPY_THREE_WORDS(A,B) { \
+ struct three_words { int a, b, c, }; \
+ *(struct three_words *) (A) = *(struct three_words *) (B); \
+}
+
+#define COPY_FOUR_WORDS(A,B) { \
+ struct four_words { int a, b, c, d, }; \
+ *(struct four_words *) (A) = *(struct four_words *) (B); \
+}
+
+/* ============================================================= */
@@ -0,0 +1,96 @@
+
+/*
+ * extrude.h
+ *
+ * FUNCTION:
+ * prototypes for privately used subroutines for the tubing library
+ *
+ * HISTORY:
+ * Linas Vepstas 1991
+ */
+
+#include "port.h" /* for gleDouble */
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+/* ============================================================ */
+/*
+ * Provides choice of calling subroutine, vs. invoking macro.
+ * Basically, inlines the source, or not.
+ * Trades performance for executable size.
+ */
+
+#define INLINE_INTERSECT
+#ifdef INLINE_INTERSECT
+#define INNERSECT(sect,p,n,v1,v2) { INTERSECT(sect,p,n,v1,v2); }
+#else
+#define INNERSECT(sect,p,n,v1,v2) intersect(sect,p,n,v1,v2)
+#endif /* INLINE_INTERSECT */
+
+/* ============================================================ */
+/* The folowing defines give a kludgy way of accessing the qmesh primitive */
+
+/*
+#define bgntmesh _emu_qmesh_bgnqmesh
+#define endtmesh _emu_qmesh_endqmesh
+#define c3f _emu_qmesh_c3f
+#define n3f _emu_qmesh_n3f
+#define v3f _emu_qmesh_v3f
+*/
+
+/* ============================================================ */
+
+extern void up_sanity_check (gleDouble up[3], /* up vector for contour */
+ int npoints, /* numpoints in poly-line */
+ gleDouble point_array[][3]); /* polyline */
+
+
+extern void draw_raw_style_end_cap (int ncp, /* number of contour points */
+ gleDouble contour[][2], /* 2D contour */
+ gleDouble zval, /* where to draw cap */
+ int frontwards); /* front or back cap */
+
+extern void draw_round_style_cap_callback (int iloop,
+ double cap[][3],
+ float face_color[3],
+ gleDouble cut_vector[3],
+ gleDouble bisect_vector[3],
+ double norms[][3],
+ int frontwards);
+
+extern void draw_angle_style_front_cap (int ncp,
+ gleDouble bi[3],
+ gleDouble point_array[][3]);
+
+extern void extrusion_raw_join (int ncp, /* number of contour points */
+ gleDouble contour[][2], /* 2D contour */
+ gleDouble cont_normal[][2],/* 2D contour normal vecs */
+ gleDouble up[3], /* up vector for contour */
+ int npoints, /* numpoints in poly-line */
+ gleDouble point_array[][3], /* polyline */
+ float color_array[][3], /* color of polyline */
+ gleDouble xform_array[][2][3]); /* 2D contour xforms */
+
+
+extern void extrusion_round_or_cut_join (int ncp, /* number of contour points */
+ gleDouble contour[][2], /* 2D contour */
+ gleDouble cont_normal[][2],/* 2D contour normal vecs */
+ gleDouble up[3], /* up vector for contour */
+ int npoints, /* numpoints in poly-line */
+ gleDouble point_array[][3], /* polyline */
+ float color_array[][3], /* color of polyline */
+ gleDouble xform_array[][2][3]); /* 2D contour xforms */
+
+
+extern void extrusion_angle_join (int ncp, /* number of contour points */
+ gleDouble contour[][2], /* 2D contour */
+ gleDouble cont_normal[][2],/* 2D contour normal vecs */
+ gleDouble up[3], /* up vector for contour */
+ int npoints, /* numpoints in poly-line */
+ gleDouble point_array[][3], /* polyline */
+ float color_array[][3], /* color of polyline */
+ gleDouble xform_array[][2][3]); /* 2D contour xforms */
+
+/* -------------------------- end of file -------------------------------- */
@@ -0,0 +1,137 @@
+#ifndef __glsmap_h__
+#define __glsmap_h__
+
+/* Copyright (c) Mark J. Kilgard, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+#if defined(_WIN32)
+
+/* Try hard to avoid including <windows.h> to avoid name space pollution,
+ but Win32's <GL/gl.h> needs APIENTRY and WINGDIAPI defined properly. */
+# if 0
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# else
+ /* XXX This is from Win32's <windef.h> */
+# ifndef APIENTRY
+# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
+# define APIENTRY __stdcall
+# else
+# define APIENTRY
+# endif
+# endif
+# ifndef CALLBACK
+ /* XXX This is from Win32's <winnt.h> */
+# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
+# define CALLBACK __stdcall
+# else
+# define CALLBACK
+# endif
+# endif
+ /* XXX This is from Win32's <wingdi.h> and <winnt.h> */
+# ifndef WINGDIAPI
+# define WINGDIAPI __declspec(dllimport)
+# endif
+ /* XXX This is from Win32's <ctype.h> */
+# ifndef _WCHAR_T_DEFINED
+typedef unsigned short wchar_t;
+# define _WCHAR_T_DEFINED
+# endif
+# endif
+
+#pragma warning (disable:4244) /* Disable bogus conversion warnings. */
+#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
+
+#endif /* _WIN32 */
+
+#include <OpenGL/gl.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ SMAP_CLEAR_SMAP_TEXTURE = 0x1,
+ SMAP_GENERATE_VIEW_MIPMAPS = 0x2,
+ SMAP_GENERATE_SMAP_MIPMAPS = 0x4,
+ SMAP_GENERATE_MIPMAPS = 0x6 /* both of above */
+} SphereMapFlags;
+
+/* Cube view enumerants. */
+enum {
+ SMAP_FRONT = 0,
+ SMAP_TOP = 1,
+ SMAP_BOTTOM = 2,
+ SMAP_LEFT = 3,
+ SMAP_RIGHT = 4,
+ SMAP_BACK = 5
+};
+
+typedef struct _SphereMap SphereMap;
+
+extern SphereMap *smapCreateSphereMap(SphereMap *shareSmap);
+extern void smapDestroySphereMap(SphereMap *smap);
+
+extern void smapConfigureSphereMapMesh(SphereMap *smap, int steps, int rings, int edgeExtend);
+
+extern void smapSetSphereMapTexObj(SphereMap *smap, GLuint texobj);
+extern void smapSetViewTexObj(SphereMap *smap, GLuint texobj);
+extern void smapSetViewTexObjs(SphereMap *smap, GLuint texobjs[6]);
+extern void smapGetSphereMapTexObj(SphereMap *smap, GLuint *texobj);
+extern void smapGetViewTexObj(SphereMap *smap, GLuint *texobj);
+extern void smapGetViewTexObjs(SphereMap *smap, GLuint texobjs[6]);
+
+extern void smapSetFlags(SphereMap *smap, SphereMapFlags flags);
+extern void smapGetFlags(SphereMap *smap, SphereMapFlags *flags);
+
+extern void smapSetViewOrigin(SphereMap *smap, GLint x, GLint y);
+extern void smapSetSphereMapOrigin(SphereMap *smap, GLint x, GLint y);
+extern void smapGetViewOrigin(SphereMap *smap, GLint *x, GLint *y);
+extern void smapGetSphereMapOrigin(SphereMap *smap, GLint *x, GLint *y);
+
+extern void smapSetEye(SphereMap *smap, GLfloat eyex, GLfloat eyey, GLfloat eyez);
+extern void smapSetEyeVector(SphereMap *smap, GLfloat *eye);
+extern void smapSetUp(SphereMap *smap, GLfloat upx, GLfloat upy, GLfloat upz);
+extern void smapSetUpVector(SphereMap *smap, GLfloat *up);
+extern void smapSetObject(SphereMap *smap, GLfloat objx, GLfloat objy, GLfloat objz);
+extern void smapSetObjectVector(SphereMap *smap, GLfloat *obj);
+extern void smapGetEye(SphereMap *smap, GLfloat *eyex, GLfloat *eyey, GLfloat *eyez);
+extern void smapGetEyeVector(SphereMap *smap, GLfloat *eye);
+extern void smapGetUp(SphereMap *smap, GLfloat *upx, GLfloat *upy, GLfloat *upz);
+extern void smapGetUpVector(SphereMap *smap, GLfloat *up);
+extern void smapGetObject(SphereMap *smap, GLfloat *objx, GLfloat *objy, GLfloat *objz);
+extern void smapGetObjectVector(SphereMap *smap, GLfloat *obj);
+
+extern void smapSetNearFar(SphereMap *smap, GLfloat viewNear, GLfloat viewFar);
+extern void smapGetNearFar(SphereMap *smap, GLfloat *viewNear, GLfloat *viewFar);
+
+extern void smapSetSphereMapTexDim(SphereMap *smap, GLsizei texdim);
+extern void smapSetViewTexDim(SphereMap *smap, GLsizei texdim);
+extern void smapGetSphereMapTexDim(SphereMap *smap, GLsizei *texdim);
+extern void smapGetViewTexDim(SphereMap *smap, GLsizei *texdim);
+
+extern void smapSetContextData(SphereMap *smap, void *context);
+extern void smapGetContextData(SphereMap *smap, void **context);
+
+extern void smapSetPositionLightsFunc(SphereMap *smap, void (*positionLights)(int view, void *context));
+extern void smapSetDrawViewFunc(SphereMap *smap, void (*drawView)(int view, void *context));
+extern void smapGetPositionLightsFunc(SphereMap *smap, void (**positionLights)(int view, void *context));
+extern void smapGetDrawViewFunc(SphereMap *smap, void (**drawView)(int view, void *context));
+
+extern void smapGenViewTex(SphereMap *smap, int view);
+extern void smapGenViewTexs(SphereMap *smap);
+extern void smapGenSphereMapFromViewTexs(SphereMap *smap);
+extern void smapGenSphereMap(SphereMap *smap);
+extern void smapGenSphereMapWithOneViewTex(SphereMap *smap);
+
+extern int smapRvecToSt(float rvec[3], float st[2]);
+extern void smapStToRvec(float *st, float *rvec);
+
+#ifdef __cplusplus
+}
+
+#endif
+#endif /* __glsmap_h__ */
@@ -0,0 +1,102 @@
+#ifndef __glsmapint_h__
+#define __glsmapint_h__
+
+/* Copyright (c) Mark J. Kilgard, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+#include "glsmap.h"
+
+enum { X = 0, Y = 1, Z = 2 };
+
+#define INITFACE(mesh) \
+ int steps = mesh->steps; \
+ int sqsteps = mesh->steps * mesh->steps
+
+#define FACE(side,y,x) \
+ mesh->face[(side)*sqsteps + (y)*steps + (x)]
+
+#define FACExy(side,i,j) \
+ (&FACE(side,i,j).x)
+
+#define FACEst(side,i,j) \
+ (&FACE(side,i,j).s)
+
+#define INITBACK(mesh) \
+ int allrings = mesh->rings + mesh->edgeExtend; \
+ int ringedspokes = allrings * mesh->steps
+
+#define BACK(edge,ring,spoke) \
+ mesh->back[(edge)*ringedspokes + (ring)*mesh->steps + (spoke)]
+
+#define BACKxy(edge,ring,spoke) \
+ (&BACK(edge,ring,spoke).x)
+
+#define BACKst(edge,ring,spoke) \
+ (&BACK(edge,ring,spoke).s)
+
+typedef struct _STXY {
+ GLfloat s, t;
+ GLfloat x, y;
+} STXY;
+
+typedef struct _SphereMapMesh {
+
+ int refcnt;
+
+ int steps;
+ int rings;
+ int edgeExtend;
+
+ STXY *face;
+ STXY *back;
+
+} SphereMapMesh;
+
+struct _SphereMap {
+
+ /* Shared sphere map mesh vertex data. */
+ SphereMapMesh *mesh;
+
+ /* Texture object ids. */
+ GLuint smapTexObj;
+ GLuint viewTexObjs[6];
+ GLuint viewTexObj;
+
+ /* Flags */
+ SphereMapFlags flags;
+
+ /* Texture dimensions must be a power of two. */
+ int viewTexDim; /* view texture dimension */
+ int smapTexDim; /* sphere map texture dimension */
+
+ /* Viewport origins for view and sphere map rendering. */
+ int viewOrigin[2];
+ int smapOrigin[2];
+
+ /* Viewing vectors. */
+ GLfloat eye[3];
+ GLfloat up[3];
+ GLfloat obj[3];
+
+ /* Projection parameters. */
+ GLfloat viewNear;
+ GLfloat viewFar;
+
+ /* Rendering callbacks. */
+ void (*positionLights)(int view, void *context);
+ void (*drawView)(int view, void *context);
+
+ /* Application specified callback data. */
+ void *context;
+
+};
+
+/* Library internal routines. */
+extern void __smapDrawSphereMapMeshSide(SphereMapMesh *mesh, int side);
+extern void __smapDrawSphereMapMeshBack(SphereMapMesh *mesh);
+extern void __smapValidateSphereMapMesh(SphereMapMesh *mesh);
+
+#endif /* __glsmapint_h__ */
Oops, something went wrong.

0 comments on commit 6308a0c

Please sign in to comment.