当前位置: 首页>>代码示例>>C++>>正文


C++ dMemset函数代码示例

本文整理汇总了C++中dMemset函数的典型用法代码示例。如果您正苦于以下问题:C++ dMemset函数的具体用法?C++ dMemset怎么用?C++ dMemset使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dMemset函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: dMemset

Etherform::Etherform()
{
	//mTypeMask |= EtherformObjectType;
	delta.pos.set(0.0f,0.0f,0.0f);
	delta.rot.set(0.0f,0.0f,0.0f);
	delta.rotOffset.set(0.0f,0.0f,0.0f);
	delta.warpOffset.set(0.0f,0.0f,0.0f);
	delta.posVec.set(0.0f,0.0f,0.0f);
	delta.rotVec.set(0.0f,0.0f,0.0f);
	delta.warpTicks = 0;
	delta.dt = 1.0f;
	delta.move = NullMove;
	mPredictionCount = sMaxPredictionTicks;

	mRot.set(0, 0, 0);
	mVelocity.set(0.0f, 0.0f, 0.0f);

	dMemset( mLaserTrailList, 0, sizeof( mLaserTrailList ) );

   for (S32 j = 0; j < EtherformData::MaxJetEmitters; j++)
      mJetEmitter[j] = 0;

	mConvex.init(this);
	mWorkingQueryBox.minExtents.set(-1e9f, -1e9f, -1e9f);
	mWorkingQueryBox.maxExtents.set(-1e9f, -1e9f, -1e9f);
}
开发者ID:fr1tz,项目名称:terminal-overload,代码行数:26,代码来源:etherform.cpp

示例2: PROFILE_SCOPE

void Forest::getLocalWindTrees( const Point3F &camPos, F32 radius, Vector<TreePlacementInfo> *placementInfo )
{
   PROFILE_SCOPE( Forest_getLocalWindTrees );

   Vector<ForestItem> items;
   items.reserve( placementInfo->capacity() );
   mData->getItems( camPos, radius, &items );

   TreePlacementInfo treeInfo;
   dMemset( &treeInfo, 0, sizeof ( TreePlacementInfo ) );

   // Reserve some space in the output.
   placementInfo->reserve( items.size() );

   // Build an info struct for each returned item.
   Vector<ForestItem>::const_iterator iter = items.begin();
   for ( ; iter != items.end(); iter++ )
   {
      // Skip over any zero wind elements here and
      // just keep them out of the final list.
      treeInfo.dataBlock = iter->getData();
      if ( treeInfo.dataBlock->mWindScale < 0.001f )
         continue;

      treeInfo.pos = iter->getPosition();
      treeInfo.scale = iter->getScale();
      treeInfo.itemKey = iter->getKey();
      placementInfo->push_back( treeInfo );
   }
}
开发者ID:03050903,项目名称:Torque3D,代码行数:30,代码来源:forest.cpp

示例3: dMemset

AtlasImportOldCHUHelper::AtlasImportOldCHUHelper(const char *chuFile, AtlasFile *outFile)
{
   mChuFileName = chuFile;
   mChuFile     = NULL;
   mAtlasFile   = outFile;
   dMemset(&mHeader, 0, sizeof(mHeader));
}
开发者ID:dodong471520,项目名称:pap,代码行数:7,代码来源:atlasImportOldChu.cpp

示例4: quat

void ConvexShape::writeFields( Stream &stream, U32 tabStop )
{
   Parent::writeFields( stream, tabStop );

   // Now write all planes.

   stream.write(2, "\r\n");   

   S32 count = mSurfaces.size();
   if ( count > smMaxSurfaces )
   {
       Con::errorf( "ConvexShape has too many surfaces to save! Truncated value %d to maximum value of %d", count, smMaxSurfaces );
       count = smMaxSurfaces;
   }

   for ( U32 i = 0; i < count; i++ )
   {      
      const MatrixF &mat = mSurfaces[i];

		QuatF quat( mat );
		Point3F pos( mat.getPosition() );

      stream.writeTabs(tabStop);

      char buffer[1024];
      dMemset( buffer, 0, 1024 );      
      
      dSprintf( buffer, 1024, "surface = \"%g %g %g %g %g %g %g\";", 
         quat.x, quat.y, quat.z, quat.w, pos.x, pos.y, pos.z );      

      stream.writeLine( (const U8*)buffer );
   }
}
开发者ID:Acidburn0zzz,项目名称:Torque3D,代码行数:33,代码来源:convexShape.cpp

示例5: MonitorFromWindow

void Win32WindowManager::lowerCurtain()
{
   if(mCurtainWindow)
      return;

   // For now just grab monitor of the first window... we may need to
   // beef this up later on, maybe by passing in the window that's entering
   // leaving full-screen to lowerCurtain.
   HMONITOR hMon = MonitorFromWindow(mWindowListHead->getHWND(), MONITOR_DEFAULTTOPRIMARY);

   // Get the monitor's extents.
   MONITORINFO monInfo;
   dMemset(&monInfo, 0, sizeof MONITORINFO);
   monInfo.cbSize = sizeof MONITORINFO;

   GetMonitorInfo(hMon, &monInfo);
 
   mCurtainWindow = CreateWindow(Win32Window::getCurtainWindowClassName(), 
                           dT(""), (WS_POPUP | WS_MAXIMIZE | WS_VISIBLE),
                           monInfo.rcWork.left, monInfo.rcWork.top, 
                           monInfo.rcWork.right - monInfo.rcWork.left, 
                           monInfo.rcWork.bottom - monInfo.rcWork.top, 
                           NULL, NULL, NULL, NULL);

   if (!mOffscreenRender)
      SetWindowPos(mCurtainWindow, HWND_TOPMOST, 0, 0, 0, 0,  SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
}
开发者ID:campadrenalin,项目名称:terminal-overload,代码行数:27,代码来源:win32WindowMgr.cpp

示例6: dMemset

void LightManager::unregisterGlobalLight( LightInfo *light )
{
   mRegisteredLights.unregisterLight( light );

   // If this is the sun... clear the special light too.
   if ( light == mSpecialLights[slSunLightType] )
      dMemset( mSpecialLights, 0, sizeof( mSpecialLights ) );
}
开发者ID:campadrenalin,项目名称:terminal-overload,代码行数:8,代码来源:lightManager.cpp

示例7: mBufferFormat

ConditionerFeature::ConditionerFeature( const GFXFormat bufferFormat )
    :  mBufferFormat(bufferFormat)
{
    dMemset( mMethodDependency, 0, sizeof( mMethodDependency ) );

    smConditioners.push_back( this );
    smDirtyConditioners = true;
}
开发者ID:mray,项目名称:terminal-overload,代码行数:8,代码来源:conditionerFeature.cpp

示例8: mFlareEnabled

LightFlareData::LightFlareData()
 : mFlareEnabled( true ),
   mElementCount( 0 ),
   mScale( 1.0f ),
   mLOSMask( LosMask ),
   mOcclusionRadius( 0.0f ),
   mRenderReflectPass( true )
{
   dMemset( mElementRect, 0, sizeof( RectF ) * MAX_ELEMENTS );   
   dMemset( mElementScale, 0, sizeof( F32 ) * MAX_ELEMENTS );
   dMemset( mElementTint, 0, sizeof( ColorF ) * MAX_ELEMENTS );
   dMemset( mElementRotate, 0, sizeof( bool ) * MAX_ELEMENTS );
   dMemset( mElementUseLightColor, 0, sizeof( bool ) * MAX_ELEMENTS );   

   for ( U32 i = 0; i < MAX_ELEMENTS; i++ )   
      mElementDist[i] = -1.0f;   
}
开发者ID:fr1tz,项目名称:terminal-overload,代码行数:17,代码来源:lightFlareData.cpp

示例9: destructInPlace

void RenderPassData::reset()
{
    for( U32 i = 0; i < Material::MAX_TEX_PER_PASS; ++ i )
        destructInPlace( &mTexSlot[ i ] );

    dMemset( &mTexSlot, 0, sizeof(mTexSlot) );
    dMemset( &mTexType, 0, sizeof(mTexType) );

    mCubeMap = NULL;
    mNumTex = mNumTexReg = mStageNum = 0;
    mGlow = false;
    mBlendOp = Material::None;

    mFeatureData.clear();

    for (U32 i = 0; i < STATE_MAX; i++)
        mRenderStates[i] = NULL;
}
开发者ID:belzilep,项目名称:Torque3D,代码行数:18,代码来源:processedMaterial.cpp

示例10: AssertFatal

void GFXGLShaderConstBuffer::onShaderReload( GFXGLShader *shader )
{
   AssertFatal( shader == mShader, "GFXGLShaderConstBuffer::onShaderReload, mismatched shaders!" );

   delete[] mBuffer;
   mBuffer = new U8[mShader->mConstBufferSize];
   dMemset(mBuffer, 0, mShader->mConstBufferSize);
   mWasLost = true;
}
开发者ID:Adhdcrazzy,项目名称:Torque3D,代码行数:9,代码来源:gfxGLShader.cpp

示例11: dMemset

PlatformFont::CharInfo& EmscriptenFont::getCharInfo(const UTF16 character) const
{
    // Declare and clear out the CharInfo that will be returned.
    static PlatformFont::CharInfo characterInfo;
    dMemset(&characterInfo, 0, sizeof(characterInfo));

    // Return character information.
    return characterInfo;
}
开发者ID:1414648814,项目名称:Torque2D,代码行数:9,代码来源:EmscriptenFont.cpp

示例12: mMaterials

TerrCell::TerrCell()
   :  mMaterials( 0 ),
      mMaterial( NULL ),
      mIsInteriorOnly( false ),
      mTriCount( 0 ),
      mHasEmpty( false )
{
   dMemset( mChildren, 0, sizeof( mChildren ) );
}
开发者ID:fr1tz,项目名称:terminal-overload,代码行数:9,代码来源:terrCell.cpp

示例13: execute

   virtual void execute()
   {
#ifndef TORQUE_OS_XENON
      // do it
      struct hostent* hostent = gethostbyname(mRequest.remoteAddr);
      if (hostent == NULL)
      {
         // oh well!  leave the lookup data unmodified (h_length) should
         // still be -1 from initialization
         mRequest.complete = true;
      }
      else
      {
         // copy the stuff we need from the hostent 
         dMemset(mRequest.out_h_addr, 0, 
            sizeof(mRequest.out_h_addr));
         dMemcpy(mRequest.out_h_addr, hostent->h_addr, hostent->h_length);

         mRequest.out_h_length = hostent->h_length;
         mRequest.complete = true;
      }
#else
      XNDNS *pxndns = NULL;
      HANDLE hEvent = CreateEvent(NULL, false, false, NULL);
      XNetDnsLookup(mRequest.remoteAddr, hEvent, &pxndns);

      while(pxndns->iStatus == WSAEINPROGRESS) 
         WaitForSingleObject(hEvent, INFINITE);

      if(pxndns->iStatus == 0 && pxndns->cina > 0)
      {
         dMemset(mRequest.out_h_addr, 0, sizeof(mRequest.out_h_addr));

         // This is a suspect section. I need to revisit. [2/22/2010 Pat]
         dMemcpy(mRequest.out_h_addr, pxndns->aina, sizeof(IN_ADDR)); 
         mRequest.out_h_length = sizeof(IN_ADDR);
      }

      mRequest.complete = true;

      XNetDnsRelease(pxndns);
      CloseHandle(hEvent);
#endif
   }
开发者ID:Dwarf-King,项目名称:OmniEngine.Net,代码行数:44,代码来源:platformNetAsync.cpp

示例14: sfxFormatToWAVEFORMATEX

static void sfxFormatToWAVEFORMATEX( const SFXFormat& format, WAVEFORMATEX *wfx )
{
   dMemset( wfx, 0, sizeof( WAVEFORMATEX ) ); 
   wfx->wFormatTag = WAVE_FORMAT_PCM; 
   wfx->nChannels = format.getChannels();
   wfx->nSamplesPerSec = format.getSamplesPerSecond();
   wfx->wBitsPerSample = format.getBitsPerChannel();
   wfx->nBlockAlign = wfx->nChannels * wfx->wBitsPerSample / 8;
   wfx->nAvgBytesPerSec = wfx->nSamplesPerSec * wfx->nBlockAlign; 
}
开发者ID:campadrenalin,项目名称:terminal-overload,代码行数:10,代码来源:sfxXAudioVoice.cpp

示例15: dMemset

 bool UUID::fromString( const char* str )
 {
    if( parse_token( str, ( xuuid_t* ) this ) != 0 )
    {
       dMemset( this, 0, sizeof( UUID ) );
       return false;
    }
    
    return true;
 }
开发者ID:campadrenalin,项目名称:terminal-overload,代码行数:10,代码来源:uuid.cpp


注:本文中的dMemset函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。