Exemplo n.º 1
0
int CUndoMotion::ClearData()
{
	DestroyObjs();
	InitParams();

	return 0;
}
Exemplo n.º 2
0
int main()
{
	InitParams();
	InitRad(&params);
	DoRad();
	CleanUpRad();
}
Exemplo n.º 3
0
CMultiWave::CMultiWave( int srcflag3d, int srcreverbflag )
{
	InitParams();
	flag3d = srcflag3d;
	flagreverb = srcreverbflag;
	
}
Exemplo n.º 4
0
HRESULT CParamsManager::CopyParamsFromSource( CParamsManager * pSource)

{
    HRESULT hr = S_OK;
    DWORD dwIndex;

    for (dwIndex = 0; dwIndex < m_cTimeFormats; dwIndex++)
    {
        if (pSource->m_guidCurrentTimeFormat == m_pguidTimeFormats[dwIndex])
        {
            break;
        }
    }
    
    
    hr = InitParams(pSource->m_cTimeFormats, pSource->m_pguidTimeFormats, dwIndex, pSource->m_mptdCurrentTimeData, pSource->m_cParams,pSource->m_pParamInfos);
    if (SUCCEEDED(hr))
    {
        for (dwIndex = 0; dwIndex < m_cParams; dwIndex++)
        {
            CCurveItem *pCurve = pSource->m_pCurveLists[dwIndex].GetHead();
            for (;pCurve;pCurve = pCurve->GetNext())
            {
	            CCurveItem *pNew = new CCurveItem;
                if (!pNew) 
                {
                    return E_OUTOFMEMORY;
                }
                pNew->m_Envelope = pCurve->m_Envelope;
                m_pCurveLists[dwIndex].AddTail(pNew);
            }
        }
    }
    return hr;
}
Exemplo n.º 5
0
cRenderQueue::cRenderQueue(cImage *_image, RenderedImage *widget) : QObject()
{
	image = _image;
	imageWidget = widget;
	queuePar = new cParameterContainer;
	queueParFractal = new cFractalContainer;
	queueAnimFrames = new cAnimationFrames;
	queueKeyframes = new cKeyframes;

	queuePar->SetContainerName("main");
	InitParams(queuePar);
	for(int i=0; i<NUMBER_OF_FRACTALS; i++)
	{
		queueParFractal->at(i).SetContainerName(QString("fractal") + QString::number(i));
		InitFractalParams(&queueParFractal->at(i));
	}

	queueFlightAnimation = new cFlightAnimation(gMainInterface, queueAnimFrames, image, imageWidget, queuePar, queueParFractal, this);
	queueKeyframeAnimation = new cKeyframeAnimation(gMainInterface, queueKeyframes, image, imageWidget, queuePar, queueParFractal, this);
	QObject::connect(queueFlightAnimation, SIGNAL(updateProgressAndStatus(const QString&, const QString&, double, cProgressText::enumProgressType)),
									 this, SIGNAL(updateProgressAndStatus(const QString&, const QString&, double, cProgressText::enumProgressType)));
	QObject::connect(queueFlightAnimation, SIGNAL(updateProgressHide(cProgressText::enumProgressType)),
									 this, SIGNAL(updateProgressHide(cProgressText::enumProgressType)));
	QObject::connect(queueFlightAnimation, SIGNAL(updateStatistics(cStatistics)),
									 this, SIGNAL(updateStatistics(cStatistics)));
	QObject::connect(queueKeyframeAnimation, SIGNAL(updateProgressAndStatus(const QString&, const QString&, double, cProgressText::enumProgressType)),
									 this, SIGNAL(updateProgressAndStatus(const QString&, const QString&, double, cProgressText::enumProgressType)));
	QObject::connect(queueKeyframeAnimation, SIGNAL(updateProgressHide(cProgressText::enumProgressType)),
									 this, SIGNAL(updateProgressHide(cProgressText::enumProgressType)));
	QObject::connect(queueKeyframeAnimation, SIGNAL(updateStatistics(cStatistics)),
									 this, SIGNAL(updateStatistics(cStatistics)));
}
H223LowerLayer::H223LowerLayer(int32 aPortTag, TPVLoopbackMode aLoopbackMode)
        :   PvmfPortBaseImpl(aPortTag, this),
        OsclTimerObject(OsclActiveObject::EPriorityHigh, "H223AO"),
        iTimerIntervalNum(0),
        iMinTimerResolution(TIMER_RES),
        iObserver(NULL),
        iMemFragmentAlloc(NULL),
        iDispatchPacketAlloc(NULL),
        iMediaDataImplMemAlloc(NULL),
        iMediaMsgPoolAlloc(NULL),
        iSendPduSz(0),
        iPduSize(H223_DEFAULT_PDU_SIZE),
        iStuffingSize(0),
        iTimer("H223LL"),
        iLoopbackMode(aLoopbackMode),
        iTimerCnt(0),
        iBytesSent(0),
        iMediaDataAlloc(&iMemAlloc),
        iLogger(NULL),
        iDemuxBuffer(NULL),
        iDemuxBufferPos(NULL),
        iIdleSyncCheckBuffer(NULL)
{
    iLogger = PVLogger::GetLoggerObject("3g324m.h223.lowerlayer");
    AddToScheduler();
    InitParams();
    ResetStats();
}
Exemplo n.º 7
0
TV::TV(unsigned width, unsigned height, unsigned coils, unsigned frames,
       BaseOperator *mrOp)
  : PDRecon(width, height, 0, coils, frames, mrOp)
{
  InitParams();
  InitTempVectors();
}
mfxStatus QSV_Encoder_Internal::Open(qsv_param_t * pParams)
{
	mfxStatus sts = MFX_ERR_NONE;

	if (m_bUseD3D11)
		// Use D3D11 surface
		sts = Initialize(m_impl, m_ver, &m_session, &m_mfxAllocator);
	else
		// Use system memory
		sts = Initialize(m_impl, m_ver, &m_session, NULL);

	MSDK_CHECK_RESULT(sts, MFX_ERR_NONE, sts);

	m_pmfxENC = new MFXVideoENCODE(m_session);

	InitParams(pParams);

	sts = m_pmfxENC->Query(&m_mfxEncParams, &m_mfxEncParams);
	MSDK_IGNORE_MFX_STS(sts, MFX_WRN_INCOMPATIBLE_VIDEO_PARAM);
	MSDK_CHECK_RESULT(sts, MFX_ERR_NONE, sts);

	sts = AllocateSurfaces();
	MSDK_CHECK_RESULT(sts, MFX_ERR_NONE, sts);

	sts = m_pmfxENC->Init(&m_mfxEncParams);
	MSDK_CHECK_RESULT(sts, MFX_ERR_NONE, sts);

	sts = GetVideoParam();
	MSDK_CHECK_RESULT(sts, MFX_ERR_NONE, sts);

	sts = InitBitstream();
	MSDK_CHECK_RESULT(sts, MFX_ERR_NONE, sts);

	return sts;
}
Exemplo n.º 9
0
int CCameraAnim::DestroyObjs()
{
	int camno;
	for( camno = 0; camno < CAMERANUMMAX; camno++ ){
		CCameraKey* delck = m_firstkey[ camno ];
		CCameraKey* nextck = 0;
		while( delck ){
			nextck = delck->next;
			delete delck;
			delck = nextck;
		}
	}

	CCameraSWKey* delcswk = m_firstsw;
	CCameraSWKey* nextcswk = 0;
	while( delcswk ){
		nextcswk = delcswk->next;
		delete delcswk;
		delcswk = nextcswk;
	}

	InitParams();

	return 0;
}
Exemplo n.º 10
0
bool APerlinNoise2D::Init(int nBufferWidth, int nBufferHeight, float vAmplitude, int nWaveLength, float vPersistence, int nOctaveNum, ADWORD dwRandSeed)
{
  // First try to release old resource;
  Release();

  int  i, x, y, k;

  m_dwSeed = dwRandSeed;

  // generate loop back smoothed random buffer
  if( nBufferWidth <= 0 || nBufferHeight <= 0 )
    return false;

  m_nBufferWidth = nBufferWidth;
  m_nBufferHeight = nBufferHeight;
  float * pValues = (float *) a_malloc(sizeof(float) * m_nBufferWidth * m_nBufferHeight);
  if( NULL == pValues )
    return false;

  m_pValues = (NOISEVALUE *) a_malloc(sizeof(NOISEVALUE) * m_nBufferWidth * m_nBufferHeight);
  if( NULL == m_pValues )
    return false;

  for(k=0; k<3; k++)
  {
    // First create random number buffer;
    for(i=0; i<m_nBufferWidth * m_nBufferHeight; i++)
      pValues[i] = RandFloat();
    
    // Now smooth the random number buffer;
    for(x=0; x<m_nBufferWidth; x++)
    {
      for(y=0; y<m_nBufferHeight; y++)
      {
        int n = y * m_nBufferWidth + x;

        int nLastX, nNextX, nLastY, nNextY;
        nLastX = x - 1;
        if( nLastX < 0 ) nLastX += m_nBufferWidth;
        nNextX = x + 1;
        if( nNextX >= m_nBufferWidth ) nNextX -= m_nBufferWidth;

        nLastY = y - 1;
        if( nLastY < 0 ) nLastY += m_nBufferHeight;
        nNextY = y + 1;
        if( nNextY >= m_nBufferHeight ) nNextY -= m_nBufferHeight;

#define NOISEVALUEFUNC2D(x, y) (pValues[(y) * m_nBufferWidth + (x)])
        m_pValues[n].v[k] = 
          1.0f / 16.0f * (NOISEVALUEFUNC2D(nLastX, nLastY) + NOISEVALUEFUNC2D(nLastX, nNextY) + NOISEVALUEFUNC2D(nNextX, nLastY) + NOISEVALUEFUNC2D(nNextX, nNextY)) + 
          1.0f / 8.0f * (NOISEVALUEFUNC2D(x, nLastY) + NOISEVALUEFUNC2D(x, nNextY) + NOISEVALUEFUNC2D(nLastX, y) + NOISEVALUEFUNC2D(nNextX, y)) + 
          1.0f / 4.0f * (NOISEVALUEFUNC2D(x, y));
      }
    }
  }

  a_free(pValues);
  return InitParams(vAmplitude, nWaveLength, vPersistence, nOctaveNum);
}
Exemplo n.º 11
0
/**
 * Sets its default value for each benchmark parameter for the GenBench function.
 *
 * @param PB a pointer to a structure containing benchmark parameters for this session
 */
static void
InitParamsGB (UflipParams *PB)
{
  InitParams (PB);
  strcpy (PB->expPlan, "ExpPlan.txt");
  strcpy (PB->expSelect, "ExpSel.txt");
  strcpy (PB->outName, "Bench"SCRIPT_EXTENSION);
}
Exemplo n.º 12
0
CSndAnim::CSndAnim( char* srcname, int srcmotkind )
{
	InitParams();
	if( srcname && *srcname ){
		strcpy_s( m_animname, 256, srcname );
	}
	m_motkind = srcmotkind;
}
Exemplo n.º 13
0
void Particles::Init()
{
	glBindVertexArray(arrayObject);
	InitParams();
	InitMemory();
	InitParticle();
	glBindVertexArray(0);
}
Exemplo n.º 14
0
int CMeshInfo::ResetParams()
{
	int ret;
	DestroyObjs();
	InitParams();
	ret = CreateObjs();
	return ret;
}
Exemplo n.º 15
0
CMeshInfo::CMeshInfo()
{
	int	ret;
	InitParams();
	ret = CreateObjs();
	if( ret )
		isinit = 0;
}
Exemplo n.º 16
0
int CRdbIniFile::DestroyObjs()
{
	CXMLIO::DestroyObjs();

	InitParams();

	return 0;
}
Exemplo n.º 17
0
int CSndAnim::DestroyObjs()
{
	DestroyAllKeys();
	DestroyFrameData();
	InitParams();

	return 0;
}
Exemplo n.º 18
0
void PreviewFileDialog::OnCurrentChanged(const QString & _filename)
{
	filename = _filename;
	QPixmap pixmap;
	if (QFileInfo(filename).suffix() == QString("fract") && checkbox->isChecked())
	{
		thumbWidget->show();
		preview->hide();
		cSettings parSettings(cSettings::formatFullText);
		parSettings.BeQuiet(true);
		if (parSettings.LoadFromFile(filename))
		{
			progressBar->show();
			cParameterContainer *par = new cParameterContainer;
			cFractalContainer *parFractal = new cFractalContainer;
			InitParams(par);
			for (int i = 0; i < NUMBER_OF_FRACTALS; i++)
				InitFractalParams(&parFractal->at(i));

			/****************** TEMPORARY CODE FOR MATERIALS *******************/

			InitMaterialParams(1, par);

			/*******************************************************************/

			if (parSettings.Decode(par, parFractal))
			{
				thumbWidget->AssignParameters(*par, *parFractal);
				thumbWidget->update();
			}
			else
			{
				preview->setText(" ");
				info->setText(" ");
			}
			delete par;
			delete parFractal;
		}
	}
	else
	{
		thumbWidget->hide();
		preview->show();
		pixmap.load(filename);
		if (pixmap.isNull() || !checkbox->isChecked())
		{
			preview->setText(" ");
			info->setText(" ");
		}
		else
		{
			preview->setPixmap(pixmap.scaled(200, 200, Qt::KeepAspectRatio, Qt::SmoothTransformation));
			QString text = QString::number(pixmap.width()) + QString(" x ")
					+ QString::number(pixmap.height());
			info->setText(text);
		}
	}
}
Exemplo n.º 19
0
void	CVecLine::ResetParams()
{
	// destroy
	DestroyObjs();

	// init
	InitParams();

}
Exemplo n.º 20
0
/**
 * Sets its default value for each benchmark parameter for the SeqFormat function.
 *
 * @param PB a pointer to a structure containing benchmark parameters for this session
 */
static void
InitParamsSF (UflipParams *PB)
{
  InitParams (PB);
  PB->microBenchID = 0; /* Not really a micro bench */
  PB->expID        = 7; /* Exp 1 to 5 (3 times) allow determining startup, period, iocount */
  PB->runID        = 1; /* Only one run ! */
  strcpy (PB->comment, "SQF");
}
Exemplo n.º 21
0
MEPdfPartialB::MEPdfPartialB(RooRealVar *m_de, RooRealVar *m_mbc, const int mode, const int h0mode){
  cout << "MEPdfPartialB constructor..." << endl;
  de = m_de; mbc = m_mbc;
  cuts = new MyParams();
  ggflag = h0mode == 10 ? true : false;
  m_mode = mode; m_h0mode = h0mode;
  InitParams(mode,h0mode);
  FixAll();
  cout << "MEPdfPartialB constructor done." << endl;
}
Exemplo n.º 22
0
void SetCurrentSystemState(wmx_SystemState_t systemState)
{
	g_ndsWrapper_systemState = systemState;

	// Init the local params when we are in Initialized state
	if (systemState == Initialized)
	{
		InitParams();
	}
}
Exemplo n.º 23
0
////////////////////////////////
// CExtruede
////////////////////////////////
CExtrude::CExtrude()
{
	int ret;
	InitParams();
	ret = CreateObjs();
	if( ret ){
		DbgOut( "charpos2.cpp : CExtrude::CExtrude : CreateObj error !!!\n" );
		isinit = 0;
	}	
}
Exemplo n.º 24
0
int CLWOvmadelem::DestroyData()
{
	if( valueptr ){ 
		free( valueptr );
		valueptr = 0;
	}
	InitParams();

	return 0;
}
Exemplo n.º 25
0
CRevolved::CRevolved()
{
	int ret;
	InitParams();
	ret = CreateObjs();
	if( ret ){
		DbgOut( "planes.cpp : CRevolved::CRevolved : CreateObj error !!!\n" );
		isinit = 0;
	}	

}
Exemplo n.º 26
0
//////////////////////////
// CPolygon
//////////////////////////
CPolygon::CPolygon()
{
	int ret;
	InitParams();
	ret = CreateObjs();
	if( ret ){
		DbgOut( "charpos2.cpp : CPolygon::CPolygon : CreateObj error !!!\n" );
		isinit = 0;
	}	

}
Exemplo n.º 27
0
void Test::renderExamples()
{
	// this renders all example files in a resolution of 5x5 px
	// and benchmarks the runtime

	QString examplePath =
		QDir::toNativeSeparators(systemData.sharedDir + QDir::separator() + "examples");
	QDirIterator it(examplePath, QStringList() << "*.fract", QDir::Files);

	cParameterContainer *testPar = new cParameterContainer;
	cFractalContainer *testParFractal = new cFractalContainer;
	cAnimationFrames *testAnimFrames = new cAnimationFrames;
	cKeyframes *testKeyframes = new cKeyframes;

	testPar->SetContainerName("main");
	InitParams(testPar);
	/****************** TEMPORARY CODE FOR MATERIALS *******************/

	InitMaterialParams(1, testPar);

	/*******************************************************************/
	for (int i = 0; i < NUMBER_OF_FRACTALS; i++)
	{
		testParFractal->at(i).SetContainerName(QString("fractal") + QString::number(i));
		InitFractalParams(&testParFractal->at(i));
	}
	bool stopRequest = false;
	cImage *image = new cImage(testPar->Get<int>("image_width"), testPar->Get<int>("image_height"));
	cRenderingConfiguration config;
	config.DisableRefresh();
	config.DisableProgressiveRender();

	while (it.hasNext())
	{
		QString filename = it.next();
		cSettings parSettings(cSettings::formatFullText);
		parSettings.BeQuiet(true);
		parSettings.LoadFromFile(filename);
		parSettings.Decode(testPar, testParFractal, testAnimFrames, testKeyframes);
		testPar->Set("image_width", 5);
		testPar->Set("image_height", 5);
		cRenderJob *renderJob = new cRenderJob(testPar, testParFractal, image, &stopRequest);
		renderJob->Init(cRenderJob::still, config);
		QVERIFY2(renderJob->Execute(), "example render failed.");
		delete renderJob;
	}

	delete image;
	delete testKeyframes;
	delete testAnimFrames;
	delete testParFractal;
	delete testPar;
}
Exemplo n.º 28
0
int CBBox::TransformOnlyWorld( CBBox* srcbbx, D3DXMATRIX* matWorld )
{
	D3DXVECTOR3 befvert[8];

	befvert[0] = D3DXVECTOR3( srcbbx->maxx, srcbbx->maxy, srcbbx->maxz );
	befvert[1] = D3DXVECTOR3( srcbbx->maxx, srcbbx->miny, srcbbx->maxz );
	befvert[2] = D3DXVECTOR3( srcbbx->minx, srcbbx->miny, srcbbx->maxz );
	befvert[3] = D3DXVECTOR3( srcbbx->minx, srcbbx->maxy, srcbbx->maxz );

	befvert[4] = D3DXVECTOR3( srcbbx->maxx, srcbbx->maxy, srcbbx->minz );
	befvert[5] = D3DXVECTOR3( srcbbx->maxx, srcbbx->miny, srcbbx->minz );
	befvert[6] = D3DXVECTOR3( srcbbx->minx, srcbbx->miny, srcbbx->minz );
	befvert[7] = D3DXVECTOR3( srcbbx->minx, srcbbx->maxy, srcbbx->minz );

	D3DXVECTOR3 aftvert[8];

	InitParams();//!!!!!!!!!

	int vno;
	float x, y, z;
	for( vno = 0; vno < 8; vno++ ){
		D3DXVec3TransformCoord( aftvert + vno, befvert + vno, matWorld );
		x = aftvert[vno].x;
		y = aftvert[vno].y;
		z = aftvert[vno].z;

		if( x < minx ){
			minx = x;
		}
		if( x > maxx ){
			maxx = x;
		}

		if( y < miny ){
			miny = y;
		}
		if( y > maxy ){
			maxy = y;
		}

		if( z < minz ){
			minz = z;
		}
		if( z > maxz ){
			maxz = z;
		}
	}
	setflag = 1;


	return 0;
}
Exemplo n.º 29
0
CCameraAnim::CCameraAnim( char* srcname, int srcmotkind, CAMERAELEM* defcamptr, int* definterptr )
{
	InitParams();
	if( srcname && *srcname ){
		strcpy_s( m_animname, 256, srcname );
	}else{
		ZeroMemory( m_animname, sizeof( char ) * 256 );
	}

	m_motkind = srcmotkind;
	m_defcamptr = defcamptr;
	m_definterptr = definterptr;
}
Exemplo n.º 30
0
BOOL CStroeSet::OnInitDialog()
{
	CDialog::OnInitDialog();
	m_iOptFlag = 0;		//读取
	InitKeyMap();
	InitParams();
	InitListCtrl();		//初始化配置
	InitSqlCombo();
	GetDlgItem(IDC_COMBO_OPTTYPE)->MoveWindow(80,15,150,300);
	m_iOptFlag = 0;
	m_ComboSql.SetCurSel(0);
	InitSqlString();
	return TRUE;
}