1. Cliff Biffle
  2. kinect-viewer

Commits

Cliff Biffle  committed b682cc1

Moved correctPerspective into types.h in preparation for refactoring.

  • Participants
  • Parent commits 931df5b
  • Branches default

Comments (0)

Files changed (2)

File KVDepthView.m

View file
   }
 }
 
-static inline vec3f_t correctPerspective(int x, int y, GLfloat z) {
-  GLfloat dr = 1.F + z;
-  return (vec3f_t) {
-    .x = (x - 320) * dr,
-    .y = (y - 240) * dr,
-    .z = z
-  };
-}
-
 static inline void vector_subtract(const vec3f_t *a, const vec3f_t *b, vec3f_t *out) {
 	*out = (vec3f_t) {
 		a->x - b->x,

File types.h

View file
   uint16_t samples[480][640];
 } depth_t;
 
+static inline vec3f_t correctPerspective(int x, int y, float z) {
+  float dr = 1.F + z;
+  return (vec3f_t) {
+    .x = (x - 320) * dr,
+    .y = (y - 240) * dr,
+    .z = z
+  };
+}
+
 #endif __types_h__