Commit 2b6ef96d authored by Matthias Möller's avatar Matthias Möller
Browse files

fixes some cpp check warnings

refs #1403

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free-Staging@16367 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a16779e6
...@@ -90,9 +90,9 @@ template< class C > ConstArray< C > GetPointer( const std::vector< C >& v ){ ret ...@@ -90,9 +90,9 @@ template< class C > ConstArray< C > GetPointer( const std::vector< C >& v ){ ret
#define DeletePointer( ... ) { if( __VA_ARGS__ ) delete[] __VA_ARGS__ , __VA_ARGS__ = NULL; } #define DeletePointer( ... ) { if( __VA_ARGS__ ) delete[] __VA_ARGS__ , __VA_ARGS__ = NULL; }
template< class C > C* NewPointer( size_t size , const char* name=NULL ){ return new C[size]; } template< class C > C* NewPointer( size_t size , const char* name=NULL ){ return new C[size]; }
template< class C > C* AllocPointer( size_t size , const char* name=NULL ){ return (C*) malloc( sizeof(C) * size ); } template< class C > C* AllocPointer( size_t size , const char* name=NULL ){ return static_cast<C*> (malloc( sizeof(C) * size )); }
template< class C > C* AlignedAllocPointer( size_t size , size_t alignment , const char* name=NULL ){ return (C*)aligned_malloc( sizeof(C) * size , alignment ); } template< class C > C* AlignedAllocPointer( size_t size , size_t alignment , const char* name=NULL ){ return static_cast<C*>(aligned_malloc( sizeof(C) * size , alignment )); }
template< class C > C* ReAllocPointer( C* c , size_t size , const char* name=NULL ){ return (C*) realloc( c , sizeof(C) * size ); } template< class C > C* ReAllocPointer( C* c , size_t size , const char* name=NULL ){ return static_cast<C*> (realloc( c , sizeof(C) * size )); }
template< class C > C* NullPointer( void ){ return NULL; } template< class C > C* NullPointer( void ){ return NULL; }
......
...@@ -33,106 +33,106 @@ DAMAGE. ...@@ -33,106 +33,106 @@ DAMAGE.
#include "PPolynomial.h" #include "PPolynomial.h"
#include "Array.h" #include "Array.h"
template< unsigned int Degree > template< int Degree >
struct BSplineElementCoefficients struct BSplineElementCoefficients
{ {
int coeffs[Degree+1]; int coeffs[Degree+1];
BSplineElementCoefficients( void ) { memset( coeffs , 0 , sizeof( int ) * ( Degree+1 ) ); } BSplineElementCoefficients( void ) { memset( coeffs , 0 , sizeof( int ) * ( Degree+1 ) ); }
int& operator[]( int idx ){ return coeffs[idx]; } int& operator[]( unsigned int idx ){ if (idx <= Degree) return coeffs[idx]; return coeffs[0];}
const int& operator[]( int idx ) const { return coeffs[idx]; } const int& operator[]( unsigned int idx ) const {if (idx <= Degree) return coeffs[idx]; return coeffs[0];}
}; };
template< int Degree > template< int Degree >
struct BSplineElements : public std::vector< BSplineElementCoefficients< Degree > > struct BSplineElements : public std::vector< BSplineElementCoefficients< Degree > >
{ {
static const int _off = (Degree+1)/2; static const int _off = (Degree+1)/2;
void _addLeft ( int offset , int boundary ); void _addLeft ( int offset , int boundary );
void _addRight( int offset , int boundary ); void _addRight( int offset , int boundary );
public: public:
enum enum
{ {
NONE = 0, NONE = 0,
DIRICHLET = -1, DIRICHLET = -1,
NEUMANN = 1 NEUMANN = 1
}; };
// Coefficients are ordered as "/" "-" "\" // Coefficients are ordered as "/" "-" "\"
int denominator; int denominator;
BSplineElements( void ) { denominator = 1; } BSplineElements( void ) { denominator = 1; }
BSplineElements( int res , int offset , int boundary=NONE , int inset=0 ); BSplineElements( int res , int offset , int boundary=NONE , int inset=0 );
void upSample( BSplineElements& high ) const; void upSample( BSplineElements& high ) const;
void differentiate( BSplineElements< Degree-1 >& d ) const; void differentiate( BSplineElements< Degree-1 >& d ) const;
void print( FILE* fp=stdout ) const void print( FILE* fp=stdout ) const
{ {
for( int i=0 ; i< this->size() ; i++ ) for( int i=0 ; i< this->size() ; i++ )
{ {
printf( "%d]" , i ); printf( "%d]" , i );
for( int j=0 ; j<=Degree ; j++ ) printf( " %d" , (*this)[i][j] ); for( int j=0 ; j<=Degree ; j++ ) printf( " %d" , (*this)[i][j] );
printf( " (%d)\n" , denominator ); printf( " (%d)\n" , denominator );
} }
} }
}; };
template< int Degree , class Real > template< int Degree , class Real >
class BSplineData class BSplineData
{ {
bool useDotRatios; bool useDotRatios;
int boundaryType; int boundaryType;
public: public:
struct BSplineComponents struct BSplineComponents
{ {
Polynomial< Degree > polys[Degree+1]; Polynomial< Degree > polys[Degree+1];
Polynomial< Degree >& operator[] ( int idx ) { return polys[idx]; } Polynomial< Degree >& operator[] ( unsigned int idx ) { return polys[idx]; }
const Polynomial< Degree >& operator[] ( int idx ) const { return polys[idx]; } const Polynomial< Degree >& operator[] ( unsigned int idx ) const { return polys[idx]; }
void printnl( void ) const { for( int d=0 ; d<=Degree ; d++ ) polys[d].printnl(); } void printnl( void ) const { for( int d=0 ; d<=Degree ; d++ ) polys[d].printnl(); }
BSplineComponents scale( double s ) const { BSplineComponents b ; for( int d=0 ; d<=Degree ; d++ ) b[d] = polys[d].scale(s) ; return b; } BSplineComponents scale( double s ) const { BSplineComponents b ; for( unsigned int d=0 ; d<=Degree ; d++ ) b[d] = polys[d].scale(s) ; return b; }
BSplineComponents shift( double s ) const { BSplineComponents b ; for( int d=0 ; d<=Degree ; d++ ) b[d] = polys[d].shift(s) ; return b; } BSplineComponents shift( double s ) const { BSplineComponents b ; for( unsigned int d=0 ; d<=Degree ; d++ ) b[d] = polys[d].shift(s) ; return b; }
}; };
const static int VV_DOT_FLAG = 1; const static int VV_DOT_FLAG = 1;
const static int DV_DOT_FLAG = 2; const static int DV_DOT_FLAG = 2;
const static int DD_DOT_FLAG = 4; const static int DD_DOT_FLAG = 4;
const static int VALUE_FLAG = 1; const static int VALUE_FLAG = 1;
const static int D_VALUE_FLAG = 2; const static int D_VALUE_FLAG = 2;
int depth , functionCount , sampleCount; int depth , functionCount , sampleCount;
Pointer( Real ) vvDotTable; Pointer( Real ) vvDotTable;
Pointer( Real ) dvDotTable; Pointer( Real ) dvDotTable;
Pointer( Real ) ddDotTable; Pointer( Real ) ddDotTable;
Pointer( Real ) valueTables; Pointer( Real ) valueTables;
Pointer( Real ) dValueTables; Pointer( Real ) dValueTables;
PPolynomial< Degree > baseFunction , leftBaseFunction , rightBaseFunction , leftRightBaseFunction; PPolynomial< Degree > baseFunction , leftBaseFunction , rightBaseFunction , leftRightBaseFunction;
PPolynomial< Degree-1 > dBaseFunction , dLeftBaseFunction , dRightBaseFunction , dLeftRightBaseFunction; PPolynomial< Degree-1 > dBaseFunction , dLeftBaseFunction , dRightBaseFunction , dLeftRightBaseFunction;
BSplineComponents baseBSpline , leftBSpline , rightBSpline , leftRightBSpline; BSplineComponents baseBSpline , leftBSpline , rightBSpline , leftRightBSpline;
Pointer( PPolynomial< Degree > ) baseFunctions; Pointer( PPolynomial< Degree > ) baseFunctions;
Pointer( BSplineComponents ) baseBSplines; Pointer( BSplineComponents ) baseBSplines;
BSplineData(void); BSplineData(void);
~BSplineData(void); ~BSplineData(void);
virtual void setDotTables( int flags , bool inset=false ); virtual void setDotTables( int flags , bool inset=false );
virtual void clearDotTables( int flags ); virtual void clearDotTables( int flags );
virtual void setValueTables( int flags , double smooth=0 ); virtual void setValueTables( int flags , double smooth=0 );
virtual void setValueTables( int flags , double valueSmooth , double normalSmooth ); virtual void setValueTables( int flags , double valueSmooth , double normalSmooth );
virtual void clearValueTables( void ); virtual void clearValueTables( void );
void setSampleSpan( int idx , int& start , int& end , double smooth=0 ) const; void setSampleSpan( int idx , int& start , int& end , double smooth=0 ) const;
/******************************************************** /********************************************************
* Sets the translates and scales of the basis function * Sets the translates and scales of the basis function
* up to the prescribed depth * up to the prescribed depth
* <maxDepth> the maximum depth * <maxDepth> the maximum depth
* <useDotRatios> specifies if dot-products of derivatives * <useDotRatios> specifies if dot-products of derivatives
* should be pre-divided by function integrals * should be pre-divided by function integrals
* <reflectBoundary> spcifies if function space should be * <reflectBoundary> spcifies if function space should be
* forced to be reflectively symmetric across the boundary * forced to be reflectively symmetric across the boundary
********************************************************/ ********************************************************/
void set( int maxDepth , bool useDotRatios=true , int boundaryType=BSplineElements< Degree >::NONE ); void set( int maxDepth , bool useDotRatios=true , int boundaryType=BSplineElements< Degree >::NONE );
inline int Index( int i1 , int i2 ) const; inline int Index( int i1 , int i2 ) const;
static inline int SymmetricIndex( int i1 , int i2 ); static inline int SymmetricIndex( int i1 , int i2 );
static inline int SymmetricIndex( int i1 , int i2 , int& index ); static inline int SymmetricIndex( int i1 , int i2 , int& index );
}; };
template< int Degree1 , int Degree2 > void SetBSplineElementIntegrals( double integrals[Degree1+1][Degree2+1] ); template< int Degree1 , int Degree2 > void SetBSplineElementIntegrals( double integrals[Degree1+1][Degree2+1] );
......
...@@ -164,6 +164,9 @@ CoredFileMeshData::CoredFileMeshData( void ) ...@@ -164,6 +164,9 @@ CoredFileMeshData::CoredFileMeshData( void )
oocPointFile = new BufferedReadWriteFile(); oocPointFile = new BufferedReadWriteFile();
polygonFile = new BufferedReadWriteFile(); polygonFile = new BufferedReadWriteFile();
memset(pointFileName,0,sizeof(char)*1024);
memset(polygonFileName,0,sizeof(char)*1024);
} }
CoredFileMeshData::~CoredFileMeshData( void ) CoredFileMeshData::~CoredFileMeshData( void )
{ {
......
...@@ -29,8 +29,10 @@ DAMAGE. ...@@ -29,8 +29,10 @@ DAMAGE.
#ifndef GEOMETRY_INCLUDED #ifndef GEOMETRY_INCLUDED
#define GEOMETRY_INCLUDED #define GEOMETRY_INCLUDED
#include <math.h> #include <cmath>
#include <vector> #include <vector>
#include <cstdio>
#include <cstdlib>
#include "Hash.h" #include "Hash.h"
template<class Real> template<class Real>
...@@ -308,11 +310,11 @@ public: ...@@ -308,11 +310,11 @@ public:
{ {
Point3D< float > start , end; Point3D< float > start , end;
float value; float value;
Vertex( void ) { ; } Vertex( void ):value(0.f) { ; }
Vertex( Point3D< float > s , Point3D< float > e , float v ) { start = s , end = e , value = v; } Vertex( Point3D< float > s , Point3D< float > e , float v ):start(s),end(e),value(v) { }
Vertex( Point3D< float > s , Point3D< float > e , Point3D< float > p ) Vertex( Point3D< float > s , Point3D< float > e , Point3D< float > p ):
start(s),end(e)
{ {
start = s , end = e;
// < p , e-s > = < s + v*(e-s) , e-s > // < p , e-s > = < s + v*(e-s) , e-s >
// < p , e-s > - < s , e-s > = v || e-s || ^2 // < p , e-s > - < s , e-s > = v || e-s || ^2
// v = < p-s , e-s > / || e-s ||^2 // v = < p-s , e-s > / || e-s ||^2
......
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
#include <hash_map> #include <hash_map>
using stdext::hash_map; using stdext::hash_map;
#else // !WIN32 #else // !WIN32
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)>= 40300 //gcc >= 4.3
#include <tr1/unordered_map>
#define hash_map std::tr1::unordered_map
#else //GCC_VERSION < 40300
#include <ext/hash_map> #include <ext/hash_map>
using namespace __gnu_cxx; using namespace __gnu_cxx;
...@@ -24,6 +30,7 @@ namespace __gnu_cxx ...@@ -24,6 +30,7 @@ namespace __gnu_cxx
size_t operator()(const unsigned long long __x) const { return __x; } size_t operator()(const unsigned long long __x) const { return __x; }
}; };
} }
#endif // gcc >= 4.3
#endif // WIN32 #endif // WIN32
#endif // HASH_INCLUDED #endif // HASH_INCLUDED
...@@ -34,46 +34,46 @@ DAMAGE. ...@@ -34,46 +34,46 @@ DAMAGE.
#include <Windows.h> #include <Windows.h>
class MemoryInfo{ class MemoryInfo{
public: public:
size_t TotalPhysicalMemory; size_t TotalPhysicalMemory;
size_t FreePhysicalMemory; size_t FreePhysicalMemory;
size_t TotalSwapSpace; size_t TotalSwapSpace;
size_t FreeSwapSpace; size_t FreeSwapSpace;
size_t TotalVirtualAddressSpace; size_t TotalVirtualAddressSpace;
size_t FreeVirtualAddressSpace; size_t FreeVirtualAddressSpace;
size_t PageSize; size_t PageSize;
void set(void){ void set(void){
MEMORYSTATUSEX Mem; MEMORYSTATUSEX Mem;
SYSTEM_INFO Info; SYSTEM_INFO Info;
ZeroMemory( &Mem, sizeof(Mem)); ZeroMemory( &Mem, sizeof(Mem));
ZeroMemory( &Info, sizeof(Info)); ZeroMemory( &Info, sizeof(Info));
Mem.dwLength = sizeof(Mem); Mem.dwLength = sizeof(Mem);
::GlobalMemoryStatusEx( &Mem ); ::GlobalMemoryStatusEx( &Mem );
::GetSystemInfo( &Info ); ::GetSystemInfo( &Info );
TotalPhysicalMemory = (size_t)Mem.ullTotalPhys; TotalPhysicalMemory = (size_t)Mem.ullTotalPhys;
FreePhysicalMemory = (size_t)Mem.ullAvailPhys; FreePhysicalMemory = (size_t)Mem.ullAvailPhys;
TotalSwapSpace = (size_t)Mem.ullTotalPageFile; TotalSwapSpace = (size_t)Mem.ullTotalPageFile;
FreeSwapSpace = (size_t)Mem.ullAvailPageFile; FreeSwapSpace = (size_t)Mem.ullAvailPageFile;
TotalVirtualAddressSpace = (size_t)Mem.ullTotalVirtual; TotalVirtualAddressSpace = (size_t)Mem.ullTotalVirtual;
FreeVirtualAddressSpace = (size_t)Mem.ullAvailVirtual; FreeVirtualAddressSpace = (size_t)Mem.ullAvailVirtual;
PageSize = (size_t)Info.dwPageSize; PageSize = (size_t)Info.dwPageSize;
} }
size_t usage(void) const {return TotalVirtualAddressSpace-FreeVirtualAddressSpace;} size_t usage(void) const {return TotalVirtualAddressSpace-FreeVirtualAddressSpace;}
static size_t Usage(void){ static size_t Usage(void){
MEMORY_BASIC_INFORMATION mbi; MEMORY_BASIC_INFORMATION mbi;
size_t dwMemUsed = 0; size_t dwMemUsed = 0;
PVOID pvAddress = 0; PVOID pvAddress = 0;
memset(&mbi, 0, sizeof(MEMORY_BASIC_INFORMATION)); memset(&mbi, 0, sizeof(MEMORY_BASIC_INFORMATION));
while(VirtualQuery(pvAddress, &mbi, sizeof(MEMORY_BASIC_INFORMATION)) == sizeof(MEMORY_BASIC_INFORMATION)){ while(VirtualQuery(pvAddress, &mbi, sizeof(MEMORY_BASIC_INFORMATION)) == sizeof(MEMORY_BASIC_INFORMATION)){
if(mbi.State == MEM_COMMIT && mbi.Type == MEM_PRIVATE){dwMemUsed += mbi.RegionSize;} if(mbi.State == MEM_COMMIT && mbi.Type == MEM_PRIVATE){dwMemUsed += mbi.RegionSize;}
pvAddress = ((BYTE*)mbi.BaseAddress) + mbi.RegionSize; pvAddress = ((BYTE*)mbi.BaseAddress) + mbi.RegionSize;
} }
return dwMemUsed; return dwMemUsed;
} }
}; };
#else // !WIN32 #else // !WIN32
...@@ -88,23 +88,23 @@ class MemoryInfo ...@@ -88,23 +88,23 @@ class MemoryInfo
public: public:
static size_t Usage(void) static size_t Usage(void)
{ {
FILE* f = fopen("/proc/self/stat","rb"); FILE* f = fopen("/proc/self/stat","rb");
int d; int d;
long ld; long ld;
unsigned long lu; unsigned long lu;
unsigned long long llu; unsigned long long llu;
char tmp[256]; char tmp[256];
char* s = &tmp[0]; char* s = &tmp[0];
char c; char c;
int pid; int pid;
unsigned long vm; unsigned long vm;
int n = fscanf(f, "%d %s %c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu" fscanf(f, "%d %255s %c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu"
,&pid ,s ,&c ,&d ,&d ,&d ,&d ,&d ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&ld ,&ld ,&ld ,&ld ,&d ,&ld ,&llu ,&vm ,&ld ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&d ,&d ,&lu ,&lu ); ,&pid ,s ,&c ,&d ,&d ,&d ,&d ,&d ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&ld ,&ld ,&ld ,&ld ,&d ,&ld ,&llu ,&vm ,&ld ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&lu ,&d ,&d ,&lu ,&lu );
fclose(f); fclose(f);
/* /*
pid %d pid %d
comm %s comm %s
...@@ -148,8 +148,8 @@ processor %d ...@@ -148,8 +148,8 @@ processor %d
rt_priority %lu (since kernel 2.5.19) rt_priority %lu (since kernel 2.5.19)
policy %lu (since kernel 2.5.19) policy %lu (since kernel 2.5.19)
*/ */
return vm; return vm;
} }
}; };
#else // __APPLE__: has no "/proc" pseudo-file system #else // __APPLE__: has no "/proc" pseudo-file system
...@@ -182,7 +182,7 @@ class MemoryInfo ...@@ -182,7 +182,7 @@ class MemoryInfo
public: public:
static size_t Usage(void) static size_t Usage(void)
{ {
unsigned long rss, vs, psize; unsigned long rss, vs;
task_t task = MACH_PORT_NULL; task_t task = MACH_PORT_NULL;
if (task_for_pid(current_task(), getpid(), &task) != KERN_SUCCESS) if (task_for_pid(current_task(), getpid(), &task) != KERN_SUCCESS)
......
...@@ -245,7 +245,7 @@ class Octree ...@@ -245,7 +245,7 @@ class Octree
Point3D< Real > position; Point3D< Real > position;
Real coarserValue; Real coarserValue;
Real weight; Real weight;
PointData( Point3D< Real > p=Point3D< Real >() , Real w=0 ) { position = p , weight = w , coarserValue = Real(0); } PointData( Point3D< Real > p=Point3D< Real >() , Real w=0 ):position(p),coarserValue(Real(0)),weight(w){}
}; };
std::vector< PointData > _points; std::vector< PointData > _points;
......
...@@ -29,7 +29,7 @@ DAMAGE. ...@@ -29,7 +29,7 @@ DAMAGE.
#ifndef DOXY_IGNORE_THIS #ifndef DOXY_IGNORE_THIS
#include "Octree.h" #include "Octree.h"
#include "time.h" #include "Time.h"
#include "MemoryUsage.h" #include "MemoryUsage.h"
#include "PointStream.h" #include "PointStream.h"
#include "MAT.h" #include "MAT.h"
...@@ -140,7 +140,7 @@ void SortedTreeNodes::setCornerTable( CornerTableData& cData , const TreeOctNode ...@@ -140,7 +140,7 @@ void SortedTreeNodes::setCornerTable( CornerTableData& cData , const TreeOctNode
TreeOctNode* node = treeNodes[i]; TreeOctNode* node = treeNodes[i];
if( d<maxDepth && node->children ) continue; if( d<maxDepth && node->children ) continue;
const TreeOctNode::ConstNeighbors3& neighbors = neighborKey.getNeighbors( node , minDepth ); const TreeOctNode::ConstNeighbors3& neighbors = neighborKey.getNeighbors( node , minDepth );
for( unsigned int c=0 ; c<Cube::CORNERS ; c++ ) // Iterate over the cell's corners for( unsigned int c=0 ; c<Cube::CORNERS ; c++ ) // Iterate over the cell's corners
{ {
bool cornerOwner = true; bool cornerOwner = true;
int x , y , z; int x , y , z;
...@@ -211,7 +211,7 @@ void SortedTreeNodes::setCornerTable( CornerTableData& cData , const TreeOctNode ...@@ -211,7 +211,7 @@ void SortedTreeNodes::setCornerTable( CornerTableData& cData , const TreeOctNode
int& idx = cData[ treeNodes[i] ][c]; int& idx = cData[ treeNodes[i] ][c];
if( idx<0 ) if( idx<0 )
{ {
fprintf( stderr , "[ERROR] Found unindexed corner nodes[%d][%d] = %d (%d,%d)\n" , treeNodes[i]->nodeData.nodeIndex , c , idx , minDepth , maxDepth ); fprintf( stderr , "[ERROR] Found unindexed corner nodes[%d][%u] = %d (%d,%d)\n" , treeNodes[i]->nodeData.nodeIndex , c , idx , minDepth , maxDepth );
int _d , _off[3]; int _d , _off[3];
treeNodes[i]->depthAndOffset( _d , _off ); treeNodes[i]->depthAndOffset( _d , _off );
if( rootNode ) if( rootNode )
...@@ -254,7 +254,7 @@ int SortedTreeNodes::getMaxCornerCount( int depth , int maxDepth , int threads ) ...@@ -254,7 +254,7 @@ int SortedTreeNodes::getMaxCornerCount( int depth , int maxDepth , int threads )
if( d<maxDepth && node->children ) continue; if( d<maxDepth && node->children ) continue;
const TreeOctNode::ConstNeighbors3& neighbors = neighborKey.getNeighbors( node , depth ); const TreeOctNode::ConstNeighbors3& neighbors = neighborKey.getNeighbors( node , depth );
for( unsigned int c=0 ; c<Cube::CORNERS ; c++ ) // Iterate over the cell's corners for( unsigned int c=0 ; c<Cube::CORNERS ; c++ ) // Iterate over the cell's corners
{ {
bool cornerOwner = true; bool cornerOwner = true;
int x , y , z; int x , y , z;
...@@ -521,7 +521,11 @@ Octree<Degree>::Octree(void) ...@@ -521,7 +521,11 @@ Octree<Degree>::Octree(void)
radius = 0; radius = 0;
width = 0; width = 0;
postDerivativeSmooth = 0; postDerivativeSmooth = 0;
_minDepth = 0;
_constrainValues = false; _constrainValues = false;
_boundaryType = 0;
_scale = Real(0);
normals = NULL;
} }
template< int Degree > template< int Degree >
...@@ -626,11 +630,11 @@ Real Octree< Degree >::SplatOrientedPoint( const Point3D<Real>& position , const ...@@ -626,11 +630,11 @@ Real Octree< Degree >::SplatOrientedPoint( const Point3D<Real>& position , const
temp=&temp->children[cIndex]; temp=&temp->children[cIndex];
myWidth/=2; myWidth/=2;
if(cIndex&1) myCenter[0] += myWidth/2; if(cIndex&1) myCenter[0] += myWidth/2;
else myCenter[0] -= myWidth/2; else myCenter[0] -= myWidth/2;
if(cIndex&2) myCenter[1] += myWidth/2; if(cIndex&2) myCenter[1] += myWidth/2;
else myCenter[1] -= myWidth/2; else myCenter[1] -= myWidth/2;
if(cIndex&4) myCenter[2] += myWidth/2; if(cIndex&4) myCenter[2] += myWidth/2;
else myCenter[2] -= myWidth/2; else myCenter[2] -= myWidth/2;
} }
Real weight , depth; Real weight , depth;