Revision: 41599
http://brlcad.svn.sourceforge.net/brlcad/?rev=41599&view=rev
Author: starseeker
Date: 2010-12-14 16:13:36 +0000 (Tue, 14 Dec 2010)
Log Message:
-----------
Update cmake branch to r41598
Modified Paths:
--------------
brlcad/branches/cmake/sh/conversion.sh
brlcad/branches/cmake/src/libbn/Makefile.am
brlcad/branches/cmake/src/librt/uvpoints.cpp
Added Paths:
-----------
brlcad/branches/cmake/src/libbn/bntester.c
brlcad/branches/cmake/src/libbn/bntester.dat
Modified: brlcad/branches/cmake/sh/conversion.sh
===================================================================
--- brlcad/branches/cmake/sh/conversion.sh 2010-12-14 16:07:41 UTC (rev
41598)
+++ brlcad/branches/cmake/sh/conversion.sh 2010-12-14 16:13:36 UTC (rev
41599)
@@ -148,46 +148,44 @@
####################
# process the argument list for commands
-for arg in $ARGS ; do
+while test $# -gt 0 ; do
+ arg="$1"
case "x$arg" in
x*[hH])
HELP=1
- shift
;;
x*[hH][eE][lL][pP])
HELP=1
- shift
;;
x*[iI][nN][sS][tT][rR][uU][cC][tT]*)
INSTRUCTIONS=1
- shift
;;
x*[qQ][uU][iI][eE][tT])
QUIET=1
- shift
;;
x*[vV][eE][rR][bB][oO][sS][eE])
VERBOSE=1
- shift
;;
x*=*)
VAR=`echo $arg | sed 's/=.*//g' | sed 's/^[-]*//g'`
if test ! "x$VAR" = "x" ; then
VAL=`echo $arg | sed 's/.*=//g'`
- CMD="$VAR=$VAL"
+ CMD="$VAR=\"$VAL\""
eval $CMD
export $VAR
fi
- shift
;;
x*)
+ echo "Ignoring unrecognized option [$arg]"
;;
esac
+ shift
done
# validate and clean up options (all default to 0)
booleanize HELP INSTRUCTIONS VERBOSE
+
###
# handle instructions before main processing
###
@@ -230,11 +228,12 @@
The OBJECTS option allows you to specify which objects you want to
convert. Any of the parameters recognized by the GED 'search' command
can be used. See the 'search' manual page for details on all
-available parameters. For example, to only convert regions:
-OBJECTS="-type regions" ; to only convert top-level objects:
-OBJECTS="-depth=0" ; to convert everything at or below the region
-level: OBJECTS="-below -type regions -or -type regions"
+available parameters. Examples:
+OBJECTS="-type region" # only convert regions
+OBJECTS="-not -type comb" # only convert primitives
+OBJECTS="-depth=0" # only convert top-level objects
+
The MAXTIME option specifies how many seconds are allowed to elapse
before the conversion is aborted. Some conversions can take days or
months (or infinite in the case of a bug), so this places an upper
@@ -263,10 +262,26 @@
echo " verbose"
echo ""
echo "Available options:"
- echo " GED=/path/to/geometry/editor (default mged)"
- echo " SEARCH=/path/to/new/editor (default mged)"
- echo " OBJECTS=params (default "" for all objects)"
- echo " MAXTIME=#seconds (default 300)"
+ if test "x$GED" = "x" ; then
+ echo " GED=/path/to/mged (default mged)"
+ else
+ echo " GED=/path/to/mged (using $GED)"
+ fi
+ if test "x$SEARCH" = "x" ; then
+ echo " SEARCH=/path/to/search-enabled/mged (default mged)"
+ else
+ echo " SEARCH=/path/to/search-enabled/mged (using $SEARCH)"
+ fi
+ if test "x$OBJECTS" = "x" ; then
+ echo " OBJECTS=\"search params\" (default \"\" for all objects)"
+ else
+ echo " OBJECTS=\"search params\" (using \"$OBJECTS\")"
+ fi
+ if test "x$MAXTIME" = "x" ; then
+ echo " MAXTIME=#seconds (default 300)"
+ else
+ echo " MAXTIME=#seconds (using $MAXTIME)"
+ fi
echo ""
echo "BRL-CAD is a powerful cross-platform open source solid modeling
system."
echo "For more information about BRL-CAD, see http://brlcad.org"
Modified: brlcad/branches/cmake/src/libbn/Makefile.am
===================================================================
--- brlcad/branches/cmake/src/libbn/Makefile.am 2010-12-14 16:07:41 UTC (rev
41598)
+++ brlcad/branches/cmake/src/libbn/Makefile.am 2010-12-14 16:13:36 UTC (rev
41599)
@@ -2,6 +2,8 @@
lib_LTLIBRARIES = libbn.la
noinst_LTLIBRARIES = libbn_nil.la
+noinst_PROGRAMS = bntester
+
man_MANS = libplot3.3
libbn_nil_la_SOURCES = \
@@ -41,6 +43,11 @@
libbn_nil.la \
${BN_LIBS}
+bntester_SOURCES = bntester.c
+bntester_LDADD = \
+ libbn.la \
+ ${BN_LIBS}
+
AM_CPPFLAGS = ${TCL_CPPFLAGS}
AM_CFLAGS = ${STRICT_FLAGS}
@@ -53,3 +60,12 @@
DEPENDS = src/libbu
include $(top_srcdir)/misc/Makefile.defs
+
+FAST_OBJECTS = \
+ $(libbn_nil_la_OBJECTS) \
+ $(libbn_la_OBJECTS) \
+ $(lib_LTLIBRARIES) \
+ $(noinst_LTLIBRARIES) \
+ $(bntester_OBJECTS) \
+ $(noinst_PROGRAMS)
+
Copied: brlcad/branches/cmake/src/libbn/bntester.c (from rev 41598,
brlcad/trunk/src/libbn/bntester.c)
===================================================================
--- brlcad/branches/cmake/src/libbn/bntester.c (rev 0)
+++ brlcad/branches/cmake/src/libbn/bntester.c 2010-12-14 16:13:36 UTC (rev
41599)
@@ -0,0 +1,50 @@
+/* B N T E S T E R . C
+ * BRL-CAD
+ *
+ * Copyright (c) 2004-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.
+ */
+
+#include "common.h"
+
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+
+#include "bu.h"
+#include "vmath.h"
+#include "bn.h"
+
+
+int
+main(int argc, char **argv)
+{
+
+ bu_log("bntester\n");
+
+ exit(0);
+}
+
+/** @} */
+/*
+ * Local Variables:
+ * mode: C
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
Copied: brlcad/branches/cmake/src/libbn/bntester.dat (from rev 41598,
brlcad/trunk/src/libbn/bntester.dat)
===================================================================
--- brlcad/branches/cmake/src/libbn/bntester.dat
(rev 0)
+++ brlcad/branches/cmake/src/libbn/bntester.dat 2010-12-14 16:13:36 UTC
(rev 41599)
@@ -0,0 +1 @@
+# test data for bntester
Modified: brlcad/branches/cmake/src/librt/uvpoints.cpp
===================================================================
--- brlcad/branches/cmake/src/librt/uvpoints.cpp 2010-12-14 16:07:41 UTC
(rev 41598)
+++ brlcad/branches/cmake/src/librt/uvpoints.cpp 2010-12-14 16:13:36 UTC
(rev 41599)
@@ -35,51 +35,50 @@
using namespace std;
+/* Number of subdivisions to perform */
+#define MAX_TREE_DEPTH 6
+#define TREE_DEBUG 0
+int rejected = 0;
+int counting = 0;
+
/* For memory management stuff see the tutorial at
*
http://www.ibm.com/developerworks/aix/tutorials/au-memorymanager/section9.html
*/
class MemoryManager
{
- private:
- std::list<void*> QuadNodePtrList;
- std::vector<void*> MemoryPoolList;
- public:
- MemoryManager( ) {}
- ~MemoryManager( ) {}
- void* allocate(size_t);
- void free(void*);
+ private:
+ std::list<void*> QuadNodePtrList;
+ std::vector<void*> MemoryPoolList;
+ public:
+ MemoryManager( ) {}
+ ~MemoryManager( ) {}
+ void* allocate(size_t);
+ void free(void*);
};
void* MemoryManager::allocate(size_t size)
{
- void* base = 0;
- if (QuadNodePtrList.empty()) {
- base = new char[size * POOL_SIZE];
- MemoryPoolList.push_back(base);
- for(int i = 0; i < POOL_SIZE; ++i) {
-
QuadNodePtrList.push_front(&(static_cast<char*>(base)[i*size]));
- }
- }
- void* blockPtr = QuadNodePtrList.front();
-/* *((static_cast<QuadNode*>(blockPtr)) + sizeof(QuadNode) - 2) =
sizeof(QuadNode);
- *((static_cast<QuadNode*>(blockPtr)) + sizeof(QuadNode) - 1) = 0;*/
- QuadNodePtrList.pop_front();
- return blockPtr;
+ void* base = 0;
+ if (QuadNodePtrList.empty()) {
+ base = new char[size * POOL_SIZE];
+ MemoryPoolList.push_back(base);
+ for(int i = 0; i < POOL_SIZE; ++i) {
+
QuadNodePtrList.push_front(&(static_cast<char*>(base)[i*size]));
+ }
+ }
+ void* blockPtr = QuadNodePtrList.front();
+/* *((static_cast<QuadNode*>(blockPtr)) + sizeof(QuadNode) - 2) =
sizeof(QuadNode);
+ *((static_cast<QuadNode*>(blockPtr)) + sizeof(QuadNode) - 1) = 0;*/
+ QuadNodePtrList.pop_front();
+ return blockPtr;
}
void MemoryManager::free(void* object)
{
- QuadNodePtrList.push_front(object);
+ QuadNodePtrList.push_front(object);
}
MemoryManager QuadMemoryManager;
-/* Number of subdivisions to perform */
-#define MAX_TREE_DEPTH 6
-
-int rejected = 0;
-int counting = 0;
-using namespace std;
-
/**
* UVKey Class - minimal class for holding UV space coordinate keys
*/
@@ -148,14 +147,14 @@
size_t PV[9];
int depth;
QuadNode *Children[4];
- inline void* operator new(size_t size)
- {
- return QuadMemoryManager.allocate(sizeof(QuadNode));
- }
- inline void operator delete(void* object)
- {
- QuadMemoryManager.free(object);
- }
+ inline void* operator new(size_t size)
+ {
+ return QuadMemoryManager.allocate(sizeof(QuadNode));
+ }
+ inline void operator delete(void* object)
+ {
+ QuadMemoryManager.free(object);
+ }
};
int ints_to_key(string *cppstr, int left, int right)
@@ -164,7 +163,7 @@
char maxkeystr[20];
char finalstring[20];
int max_key_length;
- int max_key = pow(2, MAX_TREE_DEPTH + 2);
+ int max_key = pow(2, MAX_TREE_DEPTH + 1);
sprintf(maxkeystr, "%d", max_key);
max_key_length = strlen(maxkeystr);
sprintf(formatstring, "%%\'0%dd%%\'0%dd", max_key_length,
max_key_length);
@@ -237,18 +236,19 @@
Children[0]->PV[2] = PV[4];
Children[0]->PU[3] = PU[0];
Children[0]->PV[3] = PV[4];
- Children[0]->PU[4] = (Children[0]->PU[1] -
Children[0]->PU[0])/2 + Children[0]->PU[0];
- Children[0]->PV[4] = (Children[0]->PV[2] -
Children[0]->PV[1])/2 + Children[0]->PV[0];
- Children[0]->PU[5] = (Children[0]->PU[1] -
Children[0]->PU[0])/4 + Children[0]->PU[0];
- Children[0]->PV[5] = (Children[0]->PV[3] -
Children[0]->PV[0])/4 + Children[0]->PV[0];
+ Children[0]->PU[4] = PU[5];
+ Children[0]->PV[4] = PV[5];
+ Children[0]->PU[5] = (Children[0]->PU[4] -
Children[0]->PU[0])/2 + Children[0]->PU[0];
+ Children[0]->PV[5] = (Children[0]->PV[4] -
Children[0]->PV[0])/2 + Children[0]->PV[0];
Children[0]->PU[6] = Children[0]->PU[5];
- Children[0]->PV[6] = 3*(Children[0]->PV[3] -
Children[0]->PV[0])/4 + Children[0]->PV[0];
- Children[0]->PU[7] = 3*(Children[0]->PU[1] -
Children[0]->PU[0])/4 + Children[0]->PU[0];
+ Children[0]->PV[6] = 3*(Children[0]->PV[4] -
Children[0]->PV[0])/2 + Children[0]->PV[0];
+ Children[0]->PU[7] = 3*(Children[0]->PU[4] -
Children[0]->PU[0])/2 + Children[0]->PU[0];
Children[0]->PV[7] = Children[0]->PV[5];
Children[0]->PU[8] = Children[0]->PU[7];
Children[0]->PV[8] = Children[0]->PV[6];
Children[0]->AppendKeys(keys);
- /* cout << "Q0 Depth: " << depth + 1 << "\n";
+#if TREE_DEBUG
+ cout << "Q0 Depth: " << depth + 1 << "\n";
cout << "PU: {";
for( int i = 0; i < 9; i++ ) {
cout << Children[0]->PU[i] << ",";
@@ -258,7 +258,8 @@
for( int i = 0; i < 9; i++ ) {
cout << Children[0]->PV[i] << ",";
}
- cout << "}\n";*/
+ cout << "}\n";
+#endif
if (Children[0]->depth < MAX_TREE_DEPTH)
Children[0]->SubDivide();
@@ -275,18 +276,19 @@
Children[1]->PV[2] = PV[4];
Children[1]->PU[3] = PU[4];
Children[1]->PV[3] = PV[4];
- Children[1]->PU[4] = (Children[1]->PU[1] -
Children[1]->PU[0])/2 + Children[1]->PU[0];
- Children[1]->PV[4] = (Children[1]->PV[2] -
Children[1]->PV[1])/2 + Children[1]->PV[0];
- Children[1]->PU[5] = (Children[1]->PU[1] -
Children[1]->PU[0])/4 + Children[1]->PU[0];
- Children[1]->PV[5] = (Children[1]->PV[3] -
Children[1]->PV[0])/4 + Children[1]->PV[0];
+ Children[1]->PU[4] = PU[7];
+ Children[1]->PV[4] = PV[7];
+ Children[1]->PU[5] = (Children[1]->PU[4] -
Children[1]->PU[0])/2 + Children[1]->PU[0];
+ Children[1]->PV[5] = (Children[1]->PV[4] -
Children[1]->PV[0])/2 + Children[1]->PV[0];
Children[1]->PU[6] = Children[1]->PU[5];
- Children[1]->PV[6] = 3*(Children[1]->PV[3] -
Children[1]->PV[0])/4 + Children[1]->PV[0];
- Children[1]->PU[7] = 3*(Children[1]->PU[1] -
Children[1]->PU[0])/4 + Children[1]->PU[0];
+ Children[1]->PV[6] = 3*(Children[1]->PV[4] -
Children[1]->PV[0])/2 + Children[1]->PV[0];
+ Children[1]->PU[7] = 3*(Children[1]->PU[4] -
Children[1]->PU[0])/2 + Children[1]->PU[0];
Children[1]->PV[7] = Children[1]->PV[5];
Children[1]->PU[8] = Children[1]->PU[7];
Children[1]->PV[8] = Children[1]->PV[6];
Children[1]->AppendKeys(keys);
-/* cout << "Q1 Depth: " << depth + 1 << "\n";
+#if TREE_DEBUG
+ cout << "Q1 Depth: " << depth + 1 << "\n";
cout << "PU: {";
for( int i = 0; i < 9; i++ ) {
cout << Children[1]->PU[i] << ",";
@@ -296,7 +298,8 @@
for( int i = 0; i < 9; i++ ) {
cout << Children[1]->PV[i] << ",";
}
- cout << "}\n";*/
+ cout << "}\n";
+#endif
if (Children[1]->depth < MAX_TREE_DEPTH)
Children[1]->SubDivide();
@@ -312,18 +315,19 @@
Children[2]->PV[2] = PV[2];
Children[2]->PU[3] = PU[4];
Children[2]->PV[3] = PV[2];
- Children[2]->PU[4] = (Children[2]->PU[1] -
Children[2]->PU[0])/2 + Children[2]->PU[0];
- Children[2]->PV[4] = (Children[2]->PV[2] -
Children[2]->PV[1])/2 + Children[2]->PV[0];
- Children[2]->PU[5] = (Children[2]->PU[1] -
Children[2]->PU[0])/4 + Children[2]->PU[0];
- Children[2]->PV[5] = (Children[2]->PV[3] -
Children[2]->PV[0])/4 + Children[2]->PV[0];
+ Children[2]->PU[4] = PU[8];
+ Children[2]->PV[4] = PV[8];
+ Children[2]->PU[5] = (Children[2]->PU[4] -
Children[2]->PU[0])/2 + Children[2]->PU[0];
+ Children[2]->PV[5] = (Children[2]->PV[4] -
Children[2]->PV[0])/2 + Children[2]->PV[0];
Children[2]->PU[6] = Children[2]->PU[5];
- Children[2]->PV[6] = 3*(Children[2]->PV[3] -
Children[2]->PV[0])/4 + Children[2]->PV[0];
- Children[2]->PU[7] = 3*(Children[2]->PU[1] -
Children[2]->PU[0])/4 + Children[2]->PU[0];
+ Children[2]->PV[6] = 3*(Children[2]->PV[4] -
Children[2]->PV[0])/2 + Children[2]->PV[0];
+ Children[2]->PU[7] = 3*(Children[2]->PU[4] -
Children[2]->PU[0])/2 + Children[2]->PU[0];
Children[2]->PV[7] = Children[2]->PV[5];
Children[2]->PU[8] = Children[2]->PU[7];
Children[2]->PV[8] = Children[2]->PV[6];
Children[2]->AppendKeys(keys);
-/* cout << "Q2 Depth: " << depth + 1 << "\n";
+#if TREE_DEBUG
+ cout << "Q2 Depth: " << depth + 1 << "\n";
cout << "PU: {";
for( int i = 0; i < 9; i++ ) {
cout << Children[2]->PU[i] << ",";
@@ -333,7 +337,8 @@
for( int i = 0; i < 9; i++ ) {
cout << Children[2]->PV[i] << ",";
}
- cout << "}\n";*/
+ cout << "}\n";
+#endif
if (Children[2]->depth < MAX_TREE_DEPTH)
Children[2]->SubDivide();
@@ -348,20 +353,21 @@
Children[3]->PV[1] = PV[4];
Children[3]->PU[2] = PU[4];
Children[3]->PV[2] = PV[3];
- Children[3]->PU[3] = PV[3];
+ Children[3]->PU[3] = PU[3];
Children[3]->PV[3] = PV[3];
- Children[3]->PU[4] = (Children[3]->PU[1] -
Children[3]->PU[0])/2 + Children[3]->PU[0];
- Children[3]->PV[4] = (Children[3]->PV[2] -
Children[3]->PV[1])/2 + Children[3]->PV[0];
- Children[3]->PU[5] = (Children[3]->PU[1] -
Children[3]->PU[0])/4 + Children[3]->PU[0];
- Children[3]->PV[5] = (Children[3]->PV[3] -
Children[3]->PV[0])/4 + Children[3]->PV[0];
+ Children[3]->PU[4] = PU[6];
+ Children[3]->PV[4] = PV[6];
+ Children[3]->PU[5] = (Children[3]->PU[4] -
Children[3]->PU[0])/2 + Children[3]->PU[0];
+ Children[3]->PV[5] = (Children[3]->PV[4] -
Children[3]->PV[0])/2 + Children[3]->PV[0];
Children[3]->PU[6] = Children[3]->PU[5];
- Children[3]->PV[6] = 3*(Children[3]->PV[3] -
Children[3]->PV[0])/4 + Children[3]->PV[0];
- Children[3]->PU[7] = 3*(Children[3]->PU[1] -
Children[3]->PU[0])/4 + Children[3]->PU[0];
+ Children[3]->PV[6] = 3*(Children[3]->PV[4] -
Children[3]->PV[0])/2 + Children[3]->PV[0];
+ Children[3]->PU[7] = 3*(Children[3]->PU[4] -
Children[3]->PU[0])/2 + Children[3]->PU[0];
Children[3]->PV[7] = Children[3]->PV[5];
Children[3]->PU[8] = Children[3]->PU[7];
Children[3]->PV[8] = Children[3]->PV[6];
Children[3]->AppendKeys(keys);
-/* cout << "Q3 Depth: " << depth + 1 << "\n";
+#if TREE_DEBUG
+ cout << "Q3 Depth: " << depth + 1 << "\n";
cout << "PU: {";
for( int i = 0; i < 9; i++ ) {
cout << Children[3]->PU[i] << ",";
@@ -371,7 +377,8 @@
for( int i = 0; i < 9; i++ ) {
cout << Children[3]->PV[i] << ",";
}
- cout << "}\n";*/
+ cout << "}\n";
+#endif
if (Children[3]->depth < MAX_TREE_DEPTH)
Children[3]->SubDivide();
@@ -404,24 +411,25 @@
root->keys = keys;
root->PU[0] = 0;
root->PV[0] = 0;
- root->PU[1] = pow(2, MAX_TREE_DEPTH + 2);
+ root->PU[1] = pow(2, MAX_TREE_DEPTH + 1);
root->PV[1] = 0;
- root->PU[2] = pow(2, MAX_TREE_DEPTH + 2);
- root->PV[2] = pow(2, MAX_TREE_DEPTH + 2);
+ root->PU[2] = pow(2, MAX_TREE_DEPTH + 1);
+ root->PV[2] = pow(2, MAX_TREE_DEPTH + 1);
root->PU[3] = 0;
- root->PV[3] = pow(2, MAX_TREE_DEPTH + 2);
- root->PU[4] = pow(2, MAX_TREE_DEPTH + 2)/2;
- root->PV[4] = pow(2, MAX_TREE_DEPTH + 2)/2;
- root->PU[5] = pow(2, MAX_TREE_DEPTH + 2)/4;
- root->PV[5] = pow(2, MAX_TREE_DEPTH + 2)/4;
- root->PU[6] = pow(2, MAX_TREE_DEPTH + 2)/4;
- root->PV[6] = 3*pow(2, MAX_TREE_DEPTH + 2)/4;
- root->PU[7] = 3*pow(2, MAX_TREE_DEPTH + 2)/4;
- root->PV[7] = pow(2, MAX_TREE_DEPTH + 2)/4;
- root->PU[8] = 3*pow(2, MAX_TREE_DEPTH + 2)/4;
- root->PV[8] = 3*pow(2, MAX_TREE_DEPTH + 2)/4;
+ root->PV[3] = pow(2, MAX_TREE_DEPTH + 1);
+ root->PU[4] = pow(2, MAX_TREE_DEPTH + 1)/2;
+ root->PV[4] = pow(2, MAX_TREE_DEPTH + 1)/2;
+ root->PU[5] = pow(2, MAX_TREE_DEPTH + 1)/4;
+ root->PV[5] = pow(2, MAX_TREE_DEPTH + 1)/4;
+ root->PU[6] = pow(2, MAX_TREE_DEPTH + 1)/4;
+ root->PV[6] = 3*pow(2, MAX_TREE_DEPTH + 1)/4;
+ root->PU[7] = 3*pow(2, MAX_TREE_DEPTH + 1)/4;
+ root->PV[7] = pow(2, MAX_TREE_DEPTH + 1)/4;
+ root->PU[8] = 3*pow(2, MAX_TREE_DEPTH + 1)/4;
+ root->PV[8] = 3*pow(2, MAX_TREE_DEPTH + 1)/4;
for( int i = 0; i < 9; i++ ) {
counting++;
+ cout << root->PU[i] << "," << root->PV[i] << "\n";
ints_to_key(&keynum, root->PU[i], root->PV[i]);
item = keys->find(keynum);
if(item == keys->end()) {
@@ -435,7 +443,7 @@
int main()
{
int matsize;
- matsize = pow(2, MAX_TREE_DEPTH + 2) + 1;
+ matsize = pow(2, MAX_TREE_DEPTH + 1) + 1;
vector<vector<int> > matitems ( matsize , vector<int> ( matsize ) );
int k = 0;
@@ -447,9 +455,9 @@
matitems[i][j] = k++;
}
- for ( int i = 0; i < matsize; i++ ) {
+ for ( int i = matsize - 1; i >= 0; i-- ) {
for ( int j = 0; j < matsize; j++ )
- cout<< setw ( 3 ) << i << j <<' ';
+ cout<< setw ( MAX_TREE_DEPTH ) << setfill( '0' ) << j
<< "," << setw ( MAX_TREE_DEPTH ) << setfill( '0' ) << i <<' ';
cout<<'\n';
}
cout<<'\n';
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits