Commit 7584118d authored by Libor's avatar Libor
Browse files

All working now.

parent e29966a6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -34,8 +34,8 @@ void tnlInternalNode< LogX, LogY >::setNode( int splitX,
                                             int splitY,
                                             int depth )
{
    int depthX = splitX * tnlVDBMath::power( LogX, this->level );
    int depthY = splitY * tnlVDBMath::power( LogY, this->level );
    int depthX = splitX * tnlVDBMath::power( LogX, this->level - 1 );
    int depthY = splitY * tnlVDBMath::power( LogY, this->level - 1 );
    float stepX = ( float ) this->area->getLengthX() / depthX;
    float stepY = ( float ) this->area->getLengthY() / depthY;
    float startX = this->X * stepX;
+2 −2
Original line number Diff line number Diff line
@@ -35,8 +35,8 @@ void tnlLeafNode< LogX, LogY >::setNode( int splitX,
                                         int depth )
{
    //std::cout << "tnlLeafNode::setNode" << std::endl;
    int depthX = splitX * tnlVDBMath::power( LogX, this->level );
    int depthY = splitY * tnlVDBMath::power( LogY, this->level );
    int depthX = splitX * tnlVDBMath::power( LogX, this->level - 1 );
    int depthY = splitY * tnlVDBMath::power( LogY, this->level - 1 );
    float stepX = ( float ) this->area->getLengthX() / depthX;
    float stepY = ( float ) this->area->getLengthY() / depthY;
    float startX = this->X * stepX;
+9 −4
Original line number Diff line number Diff line
@@ -62,8 +62,8 @@ void tnlRootNode< size, LogX, LogY >::createTree()
                this->children[ index ] = NULL;
            else if( this->level < this->depth - 1 )
            {
                int X = this->bitmaskArray->getIthBitmask( index )->getX() * LogX + j;
                int Y = this->bitmaskArray->getIthBitmask( index )->getY() * LogY + i;
                int X = j;
                int Y = i;
                this->children[ index ] = new tnlInternalNode< LogX, LogY >( this->area,
                                                                             this->circle,
                                                                             X,
@@ -73,8 +73,8 @@ void tnlRootNode< size, LogX, LogY >::createTree()
            }
            else
            {
                int X = this->bitmaskArray->getIthBitmask( index )->getX() * LogX + j;
                int Y = this->bitmaskArray->getIthBitmask( index )->getY() * LogY + i;
                int X = j;
                int Y = i;
                this->children[ index ] = new tnlLeafNode< LogX, LogY >( this->area,
                                                                         this->circle,
                                                                         X,
@@ -126,6 +126,11 @@ void tnlRootNode< size, LogX, LogY >::write()
          << ", starty=" <<setw( 10 ) << startY
          << ", endy=" << setw( 10 ) << endY
          << ", level=" << setw( 10 ) << i
          << std::endl;
        f << "rootSplitX=" << setw( 10 ) << this->nodesX
          << ", rootSplitY=" << setw( 10 ) << this->nodesY
          << ", LogX=" << setw( 10 ) << LogX
          << ", LogY=" << setw( 10 ) << LogY 
          << std::endl << std::endl;
        for( int j = 0; j < size; j++ )
        {
+2 −2
Original line number Diff line number Diff line
@@ -7,8 +7,8 @@ public:
    static int power( int number,
                      int exponent )
    {
        int result = number;
        for( int i = 1; i < exponent; i++ )
        int result = 1;
        for( int i = 0; i < exponent; i++ )
            result *= number;
        return result;
    }