// ??? We should allow the user to set a compare function on skv_store_t // ??? Default behaviour should be lexicographical order bool operator<( const skv_store_t& aStore ) const { BegLogLine( SKV_STORE_T_LOG ) << "skv_store_t::operator<():: Entering " << EndLogLine; int MinDataSize = min( mSize(), aStore.mSize() ); AssertLogLine( mData != NULL ) << "skv_store_t::operator<():: ERROR: " << " mData != NULL " << EndLogLine; AssertLogLine( aStore.mData != NULL ) << "skv_store_t::operator<():: ERROR: " << " aStore.mData != NULL " << EndLogLine; int rc = memcmp( mData, aStore.mData, MinDataSize ); BegLogLine( SKV_STORE_T_LOG ) << "skv_store_t::operator<():: " << " MinDataSize: " << MinDataSize << " mSize: " << mSize() << " aStore.mSize: " << aStore.mSize() << " rc: " << rc << EndLogLine; return ( rc < 0 ); }
CScrollerView::CScrollerView(int index) : CView (size) { // init some stuff if(index<0 || index>=kNumScrollers) { index = 0; } mFrame = 0; mParam = 0; mType = stData[index].type; // get bitmap for hitmap and adjust target location const info *scinf = &stInfo[mType]; mHitmap = new CBitmap(scinf->idbhm); mSize(0, 0, mHitmap->getWidth(), mHitmap->getHeight()); mSize.offset(stData[index].left - scinf->hmleft, stData[index].top - scinf->hmtop); mHmLeft = scinf->hmleft; mHmTop = scinf->hmtop; size = mSize; // get bitmap for ledbars mLedbmp = new CBitmap(scinf->idbled); mLedbarValue = 33; mVert = scinf->vert; // get the according display mDisplay = new CDisplay(stData[index].display); mDisplayMouse = false; }
// ??? We should allow the user to set a compare function on skv_store_t // ??? Default behaviour should be lexicographical order bool operator==( const skv_store_t& aStore ) const { BegLogLine( SKV_STORE_T_LOG ) << "skv_store_t::operator==():: Entering " << EndLogLine; AssertLogLine( mData != NULL ) << "skv_store_t::operator==():: ERROR: " << " mData != NULL " << EndLogLine; AssertLogLine( aStore.mData != NULL ) << "skv_store_t::operator==():: ERROR: " << " aStore.mData != NULL " << EndLogLine; if( mSize() == aStore.mSize() ) { return (memcmp( mData, aStore.mData, mSize() ) == 0); } else return 0; }
CDisplayView::CDisplayView(int index) : CTextEdit(size,0,0) { listener = this; if(!stFonts) { stFonts = new td_fontrsc[kNumFtTypes]; for(int i=0; i<kNumFtTypes; i++) { stFonts[i].font = new CBitmap(stFont[i].resid); stFonts[i].font->setTransparentColor(kTransparent); stFonts[i].refcount = 0; } } // init some working stuff index = (index>=0 && index<kNumDisplays) ? index:0; mSize(0, 0, stData[index].width,stData[index].height); mSize.offset(stData[index].left, stData[index].top); size = mSize; memset(mText, 0, sizeof(mText)); mParentView = 0; mFrame = 0; m1stSight = true; mDrawText = false; mEdit = stData[index].edit; // get bitmap for charset int fn = stData[index].fontnum; fn = (fn>=0 && fn<kNumFtTypes) ? fn:0; mFontNum = fn; mFontBmp = stFonts[fn].font; stFonts[mFontNum].refcount++; mCharWidth = stFont[fn].charwidth; mCharOfs = stFont[fn].charofs; mPaintWidth = stFont[fn].paintwidth; mCharsfit = stData[index].chars; mXAlign = stData[index].x_align; mYAlign = stData[index].y_align; CFrame *tempframe = new CFrame(size,"temp",this); int wdth = mPaintWidth*(mCharsfit-1) + mCharWidth-mCharOfs-1; mDsplBmp = new CBitmap(*tempframe, wdth, mFontBmp->getHeight()); }
Eigen::Matrix3d BoxShape::computeInertia(double _mass) const { Eigen::Matrix3d inertia = Eigen::Matrix3d::Identity(); inertia(0, 0) = _mass / 12.0 * (mSize(1) * mSize(1) + mSize(2) * mSize(2)); inertia(1, 1) = _mass / 12.0 * (mSize(0) * mSize(0) + mSize(2) * mSize(2)); inertia(2, 2) = _mass / 12.0 * (mSize(0) * mSize(0) + mSize(1) * mSize(1)); return inertia; }
int GetSize() { return mSize(); }