Commit 8ecc707a authored by Libor's avatar Libor
Browse files

Fixed some compiler errors.

parent 8dde211d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
g++ -g -std=c++11 tnlRootNode_test.cpp tnlRootNode.h tnlRootNode_impl.h tnlArea2D.h tnlArea2D_impl.h tnlCircle2D.h tnlCircle2D_impl.h tnlIterator2D.h tnlIterator2D_impl.h tnlBitmaskArray.h tnlBitmaskArray_impl.h tnlBitmask.h tnlBitmask_impl.h -o test
g++ -g -std=c++11 tnlInternalNode.h tnlInternalNode_impl.h tnlLeafNode.h tnlLeafNode_impl.h tnlNode.h tnlNode_impl.h tnlVDBMath.h tnlRootNode_test.cpp tnlRootNode.h tnlRootNode_impl.h tnlArea2D.h tnlArea2D_impl.h tnlCircle2D.h tnlCircle2D_impl.h tnlIterator2D.h tnlIterator2D_impl.h tnlBitmaskArray.h tnlBitmaskArray_impl.h tnlBitmask.h tnlBitmask_impl.h -o test
+5 −2
Original line number Diff line number Diff line
@@ -2,14 +2,17 @@
#define _TNLINTERNALNODE_H_INCLUDED_

#include "tnlNode.h"
#include "tnlArea2D"
#include "tnlArea2D.h"
#include "tnlCircle2D.h"
#include "tnlBitmask.h"
#include "tnlBitmaskArray.h"

//template< int LogX, int LogY >
//class tnlNode;

template< int LogX,
          int LogY = LogX >
class tnlInternalNode : public tnlNode
class tnlInternalNode : public tnlNode< LogX, LogY >
{
public:
    tnlInternalNode( tnlArea2D* area,
+15 −13
Original line number Diff line number Diff line
@@ -2,13 +2,15 @@
#define _TNLINTERNALNODE_IMPL_H_INCLUDED_

#include "tnlInternalNode.h"
#include "tnlLeafNode.h"
#include "tnlArea2D.h"
#include "tnlCircle2D.h"
#include "tnlBitmask.h"
#include "tnlVDBMath.h"
#include "tnlIterator2D.h"

template< int LogX,
          int LogY = LogX >
          int LogY >
tnlInternalNode< LogX, LogY >::tnlInternalNode( tnlArea2D* area,
                                                tnlCircle2D* circle,
                                                tnlBitmask* coordinates,
@@ -21,13 +23,13 @@ tnlInternalNode< LogX, LogY >::tnlInternalNode( tnlArea2D* area,
}

template< int LogX,
          int LogY = LogX >
          int LogY >
void tnlInternalNode< LogX, LogY >::setNode( int splitX,
                                             int splitY,
                                             int depth )
{
    int depthX = splitX * tnlVDBMath::power( LogX, level );
    int depthY = splitY * tnlVDBMath::power( LogY, level );
    int depthX = splitX * tnlVDBMath::power( LogX, this->level );
    int depthY = splitY * tnlVDBMath::power( LogY, this->level );
    float stepX = ( float ) this->area->getLengthX() / depthX;
    float stepY = ( float ) this->area->getLengthY() / depthY;
    float startX = this->coordinates->getX() * stepX;
@@ -46,7 +48,7 @@ void tnlInternalNode< LogX, LogY >::setNode( int splitX,
}

template< int LogX,
          int LogY = LogX >
          int LogY >
void tnlInternalNode< LogX, LogY >::setChildren( int splitX,
                                                 int splitY,
                                                 int depth )
@@ -57,7 +59,7 @@ void tnlInternalNode< LogX, LogY >::setChildren( int splitX,
            this->children[ i ] = NULL;
        else if( this->level < depth - 1 )
        {
            this->children[ i ] = new tnlInternalNode( this->area,
            this->children[ i ] = new tnlInternalNode< LogX, LogY >( this->area,
                                                                     this->circle,
                                                                     this->bitmaskArray->getIthBitmask( i ),
                                                                     this->level + 1 );
@@ -65,7 +67,7 @@ void tnlInternalNode< LogX, LogY >::setChildren( int splitX,
        }
        else
        {
            this->children[ i ] = new tnlLeafNode( this->area,
            this->children[ i ] = new tnlLeafNode< LogX, LogY >( this->area,
                                                                 this->circle,
                                                                 this->bitmaskArray->getIthBitmask( i ),
                                                                 this->level + 1 );
+2 −2
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@

template< unsigned size,
          int LogX,
          int LogY = LogX >
          int LogY >
tnlIterator2D< size, LogX, LogY >::tnlIterator2D( unsigned cellsX,
                                      unsigned cellsY,
                                      float stepX,
@@ -26,7 +26,7 @@ tnlIterator2D< size, LogX, LogY >::tnlIterator2D( unsigned cellsX,

template< unsigned size,
          int LogX,
          int LogY = LogX >
          int LogY >
void tnlIterator2D< size, LogX, LogY >::computeBitmaskArray( tnlBitmaskArray< size >* bitmaskArray,
                                                 tnlCircle2D* circle )
{
+5 −2
Original line number Diff line number Diff line
@@ -3,9 +3,12 @@

#include "tnlNode.h"

//template< int LogX, int LogY >
//class tnlNode;

template< int LogX,
          int LogY = LogX >
class tnlLeafNode : public tnlNode
class tnlLeafNode : public tnlNode< LogX, LogY >
{
public:
    tnlLeafNode( tnlArea2D* area,
@@ -20,6 +23,6 @@ public:
    ~tnlLeafNode();

private:
}
};

#endif // _TNLLEAFNODE_H_INCLUDED_
Loading