mtsMicroScribeDigitizer::mtsMicroScribeDigitizer(const mtsTaskPeriodicConstructorArg &arg)
    : mtsTaskPeriodic(arg),
      DeviceConnected(false)
{
    CheckPeriod(arg.Period);

    InitComponent();
}
mtsMicroScribeDigitizer::mtsMicroScribeDigitizer(const std::string & taskName, const double period)
    : mtsTaskPeriodic(taskName, period, false, 5000),
      DeviceConnected(false)
{
    CheckPeriod(period);

    InitComponent();
}
/*!
    构造函数
    @para[in]  QWidget * parent  
    @return  
*/
QPatientInfoWidget::QPatientInfoWidget(QWidget *parent)
	: QTreeWidget(parent)
	, m_bkgrdBrushPtr(NULL)
{
	InitComponent();

	m_bkgrdBrushPtr = new QBrush(QColor(Qt::white));
	m_bkgrdBrushPtr->setStyle(Qt::SolidPattern);
}
PhysicalJointFixedComponent::PhysicalJointFixedComponent(physics::IPhysicManager* phManager):m_joint(0),m_removeNodeOnDestroy(0)
{
	m_phManager=phManager;
	InitComponent();
}
예제 #5
0
void ProjectApplication::OnInit() {
    
    _nextFrameCmpToStart = "";
    
    ((ProjectController*)Ctrl())->SetApplication(this);
    
    // register effects
    
    // simple colored quad
    H2OglEffectDescription colorDescr = H2OglEffectDescription("ColoredVertex", "ColoredFragment");
    Renderer()->RegisterEffect(EFFECT_SIMPLE, new H2OglColoredEffect(), &colorDescr);
    
    // boss filter
//    H2OglEffectDescription bossFilterDescr = H2OglEffectDescription("EdgeFilterVertex", "EdgeFilterFragment");
//    Renderer()->RegisterEffect(EFFECT_BOSS_FILTER, new H2OglBossEffect(), &bossFilterDescr);
    
    // textured quad
    H2OglEffectDescription texturedDescr = H2OglEffectDescription("TextureVertex", "TextureFragment");
    Renderer()->RegisterEffect(EFFECT_TEXTURED, new H2OglTexturedEffect(), &texturedDescr);
    
    // simple textured quad
    H2OglEffectDescription simpleTexturedDescr = H2OglEffectDescription("SimpleTextureVertex", "SimpleTextureFragment");
    Renderer()->RegisterEffect(EFFECT_SIMPLE_TEXTURED, new H2OglSimpleTexturedEffect(), &simpleTexturedDescr);
    
    // colored batch
    H2OglEffectDescription coloredBatchDescr = H2OglEffectDescription("ColoredBatchVertex", "ColoredBatchFragment");
    Renderer()->RegisterEffect(EFFECT_COLORED_BATCH, new H2OglTexturedBatchEffect(), &coloredBatchDescr);
    
    // textured batch
    H2OglEffectDescription texturedBatchDescr = H2OglEffectDescription("TexturedBatchVertex", "TexturedBatchFragment");
    Renderer()->RegisterEffect(EFFECT_TEXTURED_BATCH, new H2OglTexturedBatchEffect(), &texturedBatchDescr);
    
    // simple textured batch
    H2OglEffectDescription simpleTexBatchDescr = H2OglEffectDescription("FastTexturedBatchVertex", "FastTexturedBatchFragment");
    Renderer()->RegisterEffect(EFFECT_SIMPLE_TEX_BATCH, new H2OglSimpleTexturedBatchEffect(), &simpleTexBatchDescr);
    
    // hBlur
//    H2OglEffectDescription hBlurDescr = H2OglEffectDescription("BlurHVertex", "BlurHFragment");
//    Renderer()->RegisterEffect(EFFECT_H_BLUR, new H2OglTexturedEffect(), &hBlurDescr);
    
    // vBlur
//    H2OglEffectDescription vBlurDescr = H2OglEffectDescription("BlurVVertex", "BlurVFragment");
//    Renderer()->RegisterEffect(EFFECT_V_BLUR, new H2OglTexturedEffect(), &vBlurDescr);
    
    // framebuffer
    H2OglFramebufferEffect* fbe = new H2OglFramebufferEffect();
    fbe->DeferredEffect = Renderer()->Effect(EFFECT_SIMPLE_TEXTURED);
    Renderer()->RegisterEffect(EFFECT_FRAMEBUFFER, fbe, NULL);
    
    // gaussian blur
    H2OglEffectDescription gBlurDescr = H2OglEffectDescription("GaussBlurVertex", "GaussBlurFragment");
    Renderer()->RegisterEffect(EFFECT_GAUSSIAN_BLUR, new H2OglGaussianBlurEffect(), &gBlurDescr);
    
    // deferred blur
    H2OglDeferredBlurEffect* dbe = new H2OglDeferredBlurEffect();
    dbe->PassBlurEffect = Renderer()->Effect(EFFECT_GAUSSIAN_BLUR);
    dbe->PassSimpleTexEffect = Renderer()->Effect(EFFECT_SIMPLE_TEXTURED);
    dbe->PassTextureEffect = Renderer()->Effect(EFFECT_TEXTURED);
    Renderer()->RegisterEffect(EFFECT_DEFERRED_BLUR, dbe, NULL);
    
    //    Renderer()->SetDefaultFboEffect(EFFECT_TEXTURED);

    // create fbo's
    H2AlphaState* asoneone = Renderer()->GetAlphaState(H2AlphaState::SBF_ONE, H2AlphaState::DBF_ONE);
    H2AlphaState* asonezero = Renderer()->GetAlphaState(H2AlphaState::SBF_ONE, H2AlphaState::DBF_ZERO);
    Renderer()->CreateFBO(IH2RenderEngine::FBO_4, IH2RenderEngine::FBO_SIZE_FULL, asonezero);
    Renderer()->CreateFBO(IH2RenderEngine::FBO_1, IH2RenderEngine::FBO_SIZE_QUARTER, asoneone);
    Renderer()->CreateFBO(IH2RenderEngine::FBO_2, IH2RenderEngine::FBO_SIZE_QUARTER, asoneone);
    Renderer()->CreateFBO(IH2RenderEngine::FBO_3, IH2RenderEngine::FBO_SIZE_QUARTER, asoneone);
    
    
    Renderer()->ValidateEngine();
    
    // init components
    InitComponent(CMP_TEMPLATE, &_templateComponent);
    
}