Revision: 42075
http://brlcad.svn.sourceforge.net/brlcad/?rev=42075&view=rev
Author: erikgreenwald
Date: 2011-01-11 15:24:29 +0000 (Tue, 11 Jan 2011)
Log Message:
-----------
new tieprivate.h, clean up of tie.h
Modified Paths:
--------------
brlcad/trunk/src/adrt/Makefile.am
brlcad/trunk/src/adrt/libtie/tie.c
brlcad/trunk/src/adrt/libtie/tie.h
brlcad/trunk/src/adrt/libtie/tie_kdtree.c
Added Paths:
-----------
brlcad/trunk/src/adrt/libtie/tieprivate.h
Modified: brlcad/trunk/src/adrt/Makefile.am
===================================================================
--- brlcad/trunk/src/adrt/Makefile.am 2011-01-11 15:00:55 UTC (rev 42074)
+++ brlcad/trunk/src/adrt/Makefile.am 2011-01-11 15:24:29 UTC (rev 42075)
@@ -63,6 +63,7 @@
libtie/tie.h
noinst_HEADERS = \
+ libtie/tieprivate.h \
load.h \
tienet.h
Modified: brlcad/trunk/src/adrt/libtie/tie.c
===================================================================
--- brlcad/trunk/src/adrt/libtie/tie.c 2011-01-11 15:00:55 UTC (rev 42074)
+++ brlcad/trunk/src/adrt/libtie/tie.c 2011-01-11 15:24:29 UTC (rev 42075)
@@ -22,17 +22,14 @@
*
*/
+#include "tie.h"
+
#include "common.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
-#include "tie.h"
-#include "bio.h"
-
-#include "bu.h"
-
#ifdef TIE_SSE
# include <xmmintrin.h>
#endif
@@ -41,11 +38,18 @@
# include <stdint.h>
#endif
+#include "bio.h"
+#include "bu.h"
+
+#include "tieprivate.h"
+
#ifdef _WIN32
# undef near
# undef far
#endif
+#define TIE_TAB1 "\1\0\0\2\2\1" /* Triangle Index Table
*/
+
#define TIE_DEGENERATE_THRESHOLD 0.0001
/*************************************************************
Modified: brlcad/trunk/src/adrt/libtie/tie.h
===================================================================
--- brlcad/trunk/src/adrt/libtie/tie.h 2011-01-11 15:00:55 UTC (rev 42074)
+++ brlcad/trunk/src/adrt/libtie/tie.h 2011-01-11 15:24:29 UTC (rev 42075)
@@ -28,22 +28,12 @@
#include "common.h"
+#include "vmath.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-#ifdef _WIN32
-# undef near
-# undef far
-#endif
-
-#include <math.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-
-#include "vmath.h"
-
#define TIE_SINGLE_PRECISION 0
#define TIE_DOUBLE_PRECISION 1
@@ -70,21 +60,11 @@
# define TIE_PRECISION TIE_SINGLE_PRECISION
#endif
-#define TIE_TAB1 "\1\0\0\2\2\1" /* Triangle Index Table
*/
-#define TIE_KDTREE_NODE_MAX 4 /* Maximum number of
triangles that can reside in a given node until it should be split */
-#define TIE_KDTREE_DEPTH_K1 1.4 /* K1 Depth Constant
Coefficient */
-#define TIE_KDTREE_DEPTH_K2 1 /* K2 Contant */
#define TIE_CHECK_DEGENERATE 1
#define TIE_KDTREE_FAST 0x0
#define TIE_KDTREE_OPTIMAL 0x1
-#define MAX_SLICES 100
-#define MIN_SLICES 35
-#define MIN_DENSITY 0.01
-#define MIN_SPAN 0.15
-#define SCALE_COEF 1.80
-
/* Type to use for floating precision */
#if TIE_PRECISION == TIE_SINGLE_PRECISION
typedef float tfloat;
@@ -131,17 +111,7 @@
void *data;
} tie_kdtree_t;
-typedef struct tie_geom_s {
- tie_tri_t **tri_list;
- unsigned int tri_num;
-} tie_geom_t;
-typedef struct tie_stack_s {
- tie_kdtree_t *node;
- tfloat near;
- tfloat far;
-} tie_stack_t;
-
typedef struct tie_s {
uint64_t rays_fired;
tie_kdtree_t *kdtree;
Modified: brlcad/trunk/src/adrt/libtie/tie_kdtree.c
===================================================================
--- brlcad/trunk/src/adrt/libtie/tie_kdtree.c 2011-01-11 15:00:55 UTC (rev
42074)
+++ brlcad/trunk/src/adrt/libtie/tie_kdtree.c 2011-01-11 15:24:29 UTC (rev
42075)
@@ -37,6 +37,18 @@
#include "rtgeom.h"
#include "raytrace.h"
+#include "tieprivate.h"
+
+#define MAX_SLICES 100
+#define MIN_SLICES 35
+#define MIN_DENSITY 0.01
+#define MIN_SPAN 0.15
+#define SCALE_COEF 1.80
+
+#define TIE_KDTREE_NODE_MAX 4 /* Maximum number of triangles
that can reside in a given node until it should be split */
+#define TIE_KDTREE_DEPTH_K1 1.4 /* K1 Depth Constant
Coefficient */
+#define TIE_KDTREE_DEPTH_K2 1 /* K2 Contant */
+
#define _MIN(a, b) (a)<(b)?(a):(b)
#define _MAX(a, b) (a)>(b)?(a):(b)
#define MATH_MIN3(_a, _b, _c, _d) _a = _MIN((_b), _MIN((_c), (_d)))
Added: brlcad/trunk/src/adrt/libtie/tieprivate.h
===================================================================
--- brlcad/trunk/src/adrt/libtie/tieprivate.h (rev 0)
+++ brlcad/trunk/src/adrt/libtie/tieprivate.h 2011-01-11 15:24:29 UTC (rev
42075)
@@ -0,0 +1,58 @@
+/* T I E P R I V A T E . H
+ * BRL-CAD
+ *
+ * Copyright (c) 2008-2010 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file tieprivate.h
+ *
+ * private stuff for libtie/librender
+ *
+ */
+
+#ifndef _TIEPRIVATE_H
+#define _TIEPRIVATE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct tie_geom_s {
+ tie_tri_t **tri_list;
+ unsigned int tri_num;
+} tie_geom_t;
+
+typedef struct tie_stack_s {
+ tie_kdtree_t *node;
+ tfloat near;
+ tfloat far;
+} tie_stack_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TIEPRIVATE_H */
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
Property changes on: brlcad/trunk/src/adrt/libtie/tieprivate.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web. Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits