[Bf-blender-cvs] [67bc8c6] cycles-ptex-49: Add Ptex adjacency data to BPXRect
Nicholas Bishop
noreply at git.blender.org
Thu Feb 12 14:16:42 CET 2015
Commit: 67bc8c6dbeee59b36ffe7ff7a20c3c973d544fac
Author: Nicholas Bishop
Date: Wed Feb 11 17:40:40 2015 +0100
Branches: cycles-ptex-49
https://developer.blender.org/rB67bc8c6dbeee59b36ffe7ff7a20c3c973d544fac
Add Ptex adjacency data to BPXRect
===================================================================
M extern/ptex/BPX_rect.h
===================================================================
diff --git a/extern/ptex/BPX_rect.h b/extern/ptex/BPX_rect.h
index 495bded..d3dc43e 100644
--- a/extern/ptex/BPX_rect.h
+++ b/extern/ptex/BPX_rect.h
@@ -22,11 +22,34 @@ typedef enum {
BPX_RECT_NUM_SIDES = 4
} BPXRectSide;
+/* Constant for BPXRectSideAdj.index */
+enum {
+ BPX_RECT_SIDE_ADJ_NONE = -1
+};
+
+/* Adjacency data for creating filter borders */
+typedef struct BPXRectSideAdj {
+ /* Index of adjacent rectangle, or BPX_RECT_SIDE_ADJ_NONE */
+ int index;
+
+ /* Adjacent side of the adjacent rectangle
+ *
+ * Undefined if index is BPX_RECT_SIDE_ADJ_NONE
+ *
+ * TODO(nicholasbishop): to save memory could pack this and index
+ * into a single 32-bit int */
+ BPXRectSide side;
+} BPXRectSideAdj;
+
/* TODO(nicholasbishop): this is yet another 2D integer rect
* structure. Could be nicer to reuse rcti. */
-/* Note: begin is inclusive, end is exclusive to match OIIO::ROI */
typedef struct BPXRect {
+ BPXRectSideAdj adj[4];
+
+ /* Note: begin is inclusive, end is exclusive to match
+ * OIIO::ROI */
+
int xbegin;
int xend;
More information about the Bf-blender-cvs
mailing list