QuOc

 

Public Member Functions | Private Attributes

qc::ScalarArray< _DataType, qc::QC_2D >::offsetCopier Class Reference

#include <scalarArray.h>

List of all members.

Public Member Functions

 offsetCopier (const int xOffset, const int yOffset, const int numX, const int numY)
DataType operator() (int x, int y, const ScalarArray< DataType, qc::QC_2D > &source)

Private Attributes

const int _xOffset
const int _yOffset
const int _numX
const int _numY

Detailed Description

template<typename _DataType>
class qc::ScalarArray< _DataType, qc::QC_2D >::offsetCopier

Definition at line 251 of file scalarArray.h.


Constructor & Destructor Documentation

template<typename _DataType >
qc::ScalarArray< _DataType, qc::QC_2D >::offsetCopier::offsetCopier ( const int  xOffset,
const int  yOffset,
const int  numX,
const int  numY 
) [inline]

Definition at line 253 of file scalarArray.h.

    : _xOffset ( xOffset ), _yOffset ( yOffset ), _numX ( numX ), _numY ( numY ) {
      if ( ( abs ( _xOffset ) > _numX ) || ( abs ( _yOffset ) > _numY ) ) {
  throw aol::Exception ( "offsetCopier: Offset larger than array!\n", __FILE__, __LINE__ );
      }
    }


Member Function Documentation

template<typename _DataType >
DataType qc::ScalarArray< _DataType, qc::QC_2D >::offsetCopier::operator() ( int  x,
int  y,
const ScalarArray< DataType, qc::QC_2D > &  source 
) [inline]

Definition at line 260 of file scalarArray.h.

                                                                                              {
      return source.get ( ( ( x - _xOffset ) >= 0 ) ? ( x - _xOffset ) % _numX : ( _numX + ( x - _xOffset ) ),
        ( ( y - _yOffset ) >= 0 ) ? ( y - _yOffset ) % _numY : ( _numY + ( y - _yOffset ) ) );
    }


Member Data Documentation

template<typename _DataType >
const int qc::ScalarArray< _DataType, qc::QC_2D >::offsetCopier::_numX [private]

Definition at line 266 of file scalarArray.h.

template<typename _DataType >
const int qc::ScalarArray< _DataType, qc::QC_2D >::offsetCopier::_numY [private]

Definition at line 266 of file scalarArray.h.

template<typename _DataType >
const int qc::ScalarArray< _DataType, qc::QC_2D >::offsetCopier::_xOffset [private]

Definition at line 266 of file scalarArray.h.

template<typename _DataType >
const int qc::ScalarArray< _DataType, qc::QC_2D >::offsetCopier::_yOffset [private]

Definition at line 266 of file scalarArray.h.


The documentation for this class was generated from the following file:

Generated on Fri Sep 9 2011 21:09:58 for QuocMesh by doxygen 1.7.1