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


C++ dirty函数代码示例

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


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

示例1: dirty

void Transform::setIdentity()
{
    if (isStatic())
        return;

    _scale.set(1.0f, 1.0f, 1.0f);
    _rotation.setIdentity();
    _translation.set(0.0f, 0.0f, 0.0f);
    dirty(DIRTY_TRANSLATION | DIRTY_ROTATION | DIRTY_SCALE);
}
开发者ID:whztt07,项目名称:GamePlay,代码行数:10,代码来源:Transform.cpp

示例2: dirty

OSErr QuicktimeLiveImageStream::dataProcCallback(SGChannel c, Ptr p, long len, long *offset, long chRefCon, TimeValue time, short writeType, long refCon)
{
    OSErr err = noErr;

    //
    OSG_INFO << " Video " << refCon << std::endl;
    dirty();
    //
    return err;
}
开发者ID:hyyh619,项目名称:OpenSceneGraph-3.4.0,代码行数:10,代码来源:QuicktimeLiveImageStream.cpp

示例3: GP_ASSERT

void Transform::applyAnimationValueRotation(AnimationValue* value, unsigned int index, float blendWeight)
{
    if (isStatic())
        return;

    GP_ASSERT(value);
    Quaternion::slerp(_rotation.x, _rotation.y, _rotation.z, _rotation.w, value->getFloat(index), value->getFloat(index + 1), value->getFloat(index + 2), value->getFloat(index + 3), blendWeight,
                      &_rotation.x, &_rotation.y, &_rotation.z, &_rotation.w);
    dirty(DIRTY_ROTATION);
}
开发者ID:whztt07,项目名称:GamePlay,代码行数:10,代码来源:Transform.cpp

示例4: cleanIt

void NodeMonitor::cleanIt()
{
	if (dirty())
	{
		// We have to re-attach the callback.
		attachCallbacks();
	}

	fIsDirty = false;
}
开发者ID:BigRoy,项目名称:Maya-devkit,代码行数:10,代码来源:NodeMonitor.cpp

示例5: numRows

void KWMapEditor::addEntry() {
	int x = numRows();
	insertRows(x, 1);
	TQPushButton *b = new TQPushButton("X", this);
	connect(b, TQT_SIGNAL(clicked()), this, TQT_SLOT(erase()));
	setCellWidget(x, 0, b);
	ensureCellVisible(x, 1);
	setCurrentCell(x, 1);
	emit dirty();
}
开发者ID:Fat-Zer,项目名称:tdeutils,代码行数:10,代码来源:kwmapeditor.cpp

示例6: setCursor

void BoxItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
    if (m_resizing) {
        m_resizing = false;
        setCursor(Qt::ArrowCursor);
        emit dirty();
    }
    else
        QGraphicsRectItem::mouseReleaseEvent(event);
}
开发者ID:xmd-project,项目名称:prototype,代码行数:10,代码来源:boxitem.cpp

示例7: dirty

bool PropertyGroup::setFrame(int frame)
{
	bool ret = false;
	for(vector<PropertyBase*>::iterator it = properties_.begin(); it != properties_.end(); ++it) {
		ret |= (*it)->setFrame(frame);
	}
	if(ret) {
		dirty();
	}
	return ret;
}
开发者ID:saadahid,项目名称:ofxAE,代码行数:11,代码来源:ofxAEProperty.cpp

示例8: imp_

QgsProject::QgsProject()
    : imp_( new QgsProject::Imp )
{
  // Set some default project properties
  // XXX THESE SHOULD BE MOVED TO STATUSBAR RELATED SOURCE
  writeEntry( "PositionPrecision", "/Automatic", true );
  writeEntry( "PositionPrecision", "/DecimalPlaces", 2 );
  // XXX writeEntry() makes the project dirty, but it doesn't make sense
  // for a new project to be dirty, so let's clean it up
  dirty( false );
} // QgsProject ctor
开发者ID:HydroCouple,项目名称:FVHMComponent,代码行数:11,代码来源:qgsproject.cpp

示例9: _parent

GfxCanvasItem::GfxCanvasItem(GfxCanvasItem *p)
: _parent(p), _x(this), _y(this), _z(this),
    _scale(this), _visible(this), _dirty(false)
{
    Q_ASSERT(p);

    _scale.setValue(1.);
    _visible.setValue(1.);
    _parent->addChild(this);
    dirty();
}
开发者ID:Camelek,项目名称:qtmoko,代码行数:11,代码来源:gfxcanvas.cpp

示例10: dirty

GfxCanvasItem::~GfxCanvasItem()
{ 
    dirty();
    if(_parent) _parent->remChild(this);
    if(_dirty) 
        layer()->remDirty(this);

    QList<GfxCanvasItem *> children = _children;
    qDeleteAll(children);
    _dirty = false;
}
开发者ID:Camelek,项目名称:qtmoko,代码行数:11,代码来源:gfxcanvas.cpp

示例11: TQT_TQOBJECT

void KWMapEditor::erase() {
	const TQObject *o = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()));
	for (int i = 0; i < numRows(); i++) {
		if (TQT_BASE_OBJECT_CONST(cellWidget(i, 0)) == TQT_BASE_OBJECT_CONST(o)) {
			removeRow(i);
			break;
		}
	}

	emit dirty();
}
开发者ID:Fat-Zer,项目名称:tdeutils,代码行数:11,代码来源:kwmapeditor.cpp

示例12: QObject

KSambaShare::KSambaShare()
    : QObject(0)
    , d_ptr(new KSambaSharePrivate(this))
{
    Q_D(const KSambaShare);
    if (QFile::exists(d->userSharePath)) {
        KDirWatch::self()->addDir(d->userSharePath, KDirWatch::WatchFiles);
        connect(KDirWatch::self(), SIGNAL(dirty(QString)), this,
                SLOT(_k_slotFileChange(QString)));
    }
}
开发者ID:emmanuel099,项目名称:kio,代码行数:11,代码来源:ksambashare.cpp

示例13: while

int QParam::updataAll(){
    QSet<SpaItemHd>::Iterator iterator = modifyedItem.begin();
    int r=Md::Ok;
    while(iterator!=modifyedItem.end()){
        r = updata(*iterator);
        if(r!=Md::Ok)
            break;
        iterator = modifyedItem.erase(iterator);
    }
    emit dirty(!modifyedItem.isEmpty());
    return Md::Ok ;
}
开发者ID:httpftpli,项目名称:mdimh,代码行数:12,代码来源:qparam.cpp

示例14: QObject

Picture::Picture(QObject *parent)
        : QObject(parent)
{
    m_defaultImage = KGlobal::dirs()->findResource("data", "plasma-applet-frame/picture-frame-default.jpg");
    m_checkDir = false;

    // listen for changes to the file we're displaying
    m_fileWatch = new KDirWatch(this);
    connect(m_fileWatch,SIGNAL(dirty(QString)),this,SLOT(reload()));
    connect(m_fileWatch,SIGNAL(created(QString)),this,SLOT(reload()));
    connect(m_fileWatch,SIGNAL(deleted(QString)),this,SLOT(reload()));
}
开发者ID:KDE,项目名称:kdeplasma-addons,代码行数:12,代码来源:picture.cpp

示例15: glGetProgramiv

/*!
 Add all the variables of this material object to the shader program "program".
 It expects that the program already exits and that the names in _glsl_names are used
 @param program - the glsl shader program integer id
 */
bool GLMaterial::addVariablesToProgram(GLuint program, int variable_index)
{

    if(program == -1)return false; // no program exits
    
    
    GLint params;
    glGetProgramiv( program, GL_LINK_STATUS, &params);
    if(params == GL_FALSE)
    {
        cerr << "[GLMaterial] Program " << program << " has not been linked. Materials cannot be added." << endl;
        return false;
    }
    
    
    // enable the program
    glUseProgram(program);
    
    glGetProgramiv( program, GL_ACTIVE_UNIFORMS, &params);
 

    GetVariableName(_glsl_struct, _glsl_names[0], variable_index);
    
    // get the location of a uniform variable. Note, the program must be linked at this position.
    _ambientColorPos = glGetUniformLocation(program, GetVariableName(_glsl_struct, _glsl_names[0], variable_index).c_str());
                        checkUniform(_ambientColorPos, _glsl_names[0]);
    
    _diffuseColorPos = glGetUniformLocation(program, GetVariableName(_glsl_struct, _glsl_names[1], variable_index).c_str());
                        checkUniform(_diffuseColorPos, _glsl_names[1]);
    
    _specularColorPos = glGetUniformLocation(program, GetVariableName(_glsl_struct, _glsl_names[2], variable_index).c_str());
                        checkUniform(_specularColorPos, _glsl_names[2]);
    
    _shininessIdx = glGetUniformLocation(program, GetVariableName(_glsl_struct, _glsl_names[3], variable_index).c_str());
                        checkUniform(_shininessIdx, _glsl_names[3]);

    _emissiveIdx = glGetUniformLocation(program, GetVariableName(_glsl_struct, _glsl_names[4], variable_index).c_str());
                        checkUniform(_emissiveIdx, _glsl_names[4]);
    
    _transparencyIdx = glGetUniformLocation(program, GetVariableName(_glsl_struct, _glsl_names[5], variable_index).c_str());
                    checkUniform(_transparencyIdx, _glsl_names[5]);
    
    // Send the material to your shader program
    /*glUniform3fv(_ambientColorPos, 1, &_ambient_material[0] );
    glUniform3fv(_diffuseColorPos, 1, &_diffuse_material[0]);
    glUniform3fv(_specularColorPos, 1, &_specular_material[0]);
    glUniform1f(_shininessIdx, _shininess);*/
    dirty(program);
    // disable the program
    // glUseProgram(0);
    
    return true;
}
开发者ID:shield10,项目名称:557.557.2015.FR,代码行数:58,代码来源:GLAppearance.cpp


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