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


C++ Datum::addElement方法代码示例

本文整理汇总了C++中Datum::addElement方法的典型用法代码示例。如果您正苦于以下问题:C++ Datum::addElement方法的具体用法?C++ Datum::addElement怎么用?C++ Datum::addElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Datum的用法示例。


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

示例1: getCurrentAnnounceDrawData

Datum FrameListStimulus::getCurrentAnnounceDrawData() {
    boost::mutex::scoped_lock locker(stim_lock);
    Datum announceData = BaseFrameListStimulus::getCurrentAnnounceDrawData();
    
    announceData.addElement(STIM_TYPE, "frame_list");
    announceData.addElement(STIMULUS_GROUP, stimulusGroup->getTag());
    
    return announceData;
}
开发者ID:davidcox,项目名称:mworks,代码行数:9,代码来源:FrameListStimulus.cpp

示例2: getCurrentAnnounceDrawData

// override of RectangleStimulus announce method -- allows trigger info to also be announced
Datum FixationPoint::getCurrentAnnounceDrawData() {
    
    //if (VERBOSE_EYE_CALIBRATORS> 1) mprintf("getting announce DRAW data for fixation point stimulus %s",tag );
    
    Datum announceData = RectangleStimulus::getCurrentAnnounceDrawData();
    
    announceData.addElement(STIM_TYPE,STIM_TYPE_POINT);
    
    // stuff from the trigger that is not in rectangle stimulus ...
    announceData.addElement("center_x", (double)(*centerx));
    announceData.addElement("center_y", (double)(*centery));
    announceData.addElement("width", (double)(*width));

    return (announceData);
}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例3: getCurrentAnnounceDrawData

Datum DynamicRandomDots::getCurrentAnnounceDrawData() {
	boost::mutex::scoped_lock locker(stim_lock);
	Datum announceData = StandardDynamicStimulus::getCurrentAnnounceDrawData();
	announceData.addElement(STIM_TYPE, "dynamic_random_dots");
	announceData.addElement("field_radius", fieldRadius);
	announceData.addElement("field_center_x", fieldCenterX);
	announceData.addElement("field_center_y", fieldCenterY);
	announceData.addElement("num_dots", (long)numDots);
	announceData.addElement("dot_size", dotSize);
    announceData.addElement(STIM_COLOR_R, colorR);
    announceData.addElement(STIM_COLOR_G, colorG);
    announceData.addElement(STIM_COLOR_B, colorB);
    announceData.addElement("alpha_multiplier", alpha);
	announceData.addElement("direction", direction->getValue().getFloat());
	announceData.addElement("speed", speed->getValue().getFloat());

	return announceData;
}
开发者ID:coxlab,项目名称:DynamicRandomDots,代码行数:18,代码来源:DynamicRandomDots.cpp

示例4: getCurrentAnnounceDrawData

Datum BaseFrameListStimulus::getCurrentAnnounceDrawData() {
    Datum announceData = StandardDynamicStimulus::getCurrentAnnounceDrawData();
    
    if (stimulusGroup) {
        announceData.addElement(STIMULUS_GROUP, stimulusGroup->getTag());
    }
    
    announceData.addElement(LOOP, loop->getValue());
    announceData.addElement("playing", Datum(isPlaying()));
    
    int frameNumber = getFrameNumber();
    announceData.addElement("current_frame", Datum((long)frameNumber));
    
    Datum currentStimulusAnnounceData(0L);
    if ((frameNumber >= 0) && (frameNumber < getNumFrames())) {
        currentStimulusAnnounceData = getStimulusForFrame(frameNumber)->getCurrentAnnounceDrawData();
    }
    announceData.addElement("current_stimulus", currentStimulusAnnounceData);
    
    return announceData;
}
开发者ID:mworks,项目名称:mworks,代码行数:21,代码来源:BaseFrameListStimulus.cpp

示例5: getAnnounceData

Datum StimulusDisplay::getAnnounceData(bool updateIsExplicit) {
    Datum stimAnnounce;
    
    if (!shouldAnnounceStimuli(updateIsExplicit)) {
        // No stim announcements, so just report the number of stimuli drawn
        stimAnnounce = Datum(long(stimAnnouncements.size()));
    } else {
        stimAnnounce = Datum(M_LIST, int(stimAnnouncements.size()));
        for (size_t i = 0; i < stimAnnouncements.size(); i++) {
            stimAnnounce.addElement(stimAnnouncements[i]);
        }
    }
    
	return stimAnnounce;
}
开发者ID:BramVerhoef,项目名称:mworks,代码行数:15,代码来源:StimulusDisplay.cpp

示例6: getCurrentAnnounceDrawData

Datum MovingDots::getCurrentAnnounceDrawData() {
    boost::mutex::scoped_lock locker(stim_lock);
    
    Datum announceData = StandardDynamicStimulus::getCurrentAnnounceDrawData();
    
    announceData.addElement(STIM_TYPE, "moving_dots");
    announceData.addElement(FIELD_RADIUS, currentFieldRadius);
    announceData.addElement(FIELD_CENTER_X, fieldCenterX->getValue().getFloat());
    announceData.addElement(FIELD_CENTER_Y, fieldCenterY->getValue().getFloat());
    announceData.addElement(DOT_DENSITY, dotDensity->getValue().getFloat());
    announceData.addElement(DOT_SIZE, dotSize->getValue().getFloat());
    announceData.addElement(STIM_COLOR_R, red->getValue().getFloat());
    announceData.addElement(STIM_COLOR_G, green->getValue().getFloat());
    announceData.addElement(STIM_COLOR_B, blue->getValue().getFloat());
    announceData.addElement(ALPHA_MULTIPLIER, alpha->getValue().getFloat());
    announceData.addElement(DIRECTION, direction->getValue().getFloat());
    announceData.addElement(SPEED, currentSpeed);
    announceData.addElement(COHERENCE, currentCoherence);
    announceData.addElement(LIFETIME, currentLifetime);
    announceData.addElement("num_dots", long(currentNumDots));
    announceData.addElement(RAND_SEED, randSeed);
    
    if (announceDots->getValue().getBool()) {
        Datum dotsData(reinterpret_cast<char *>(&(dotPositions[0])), dotPositions.size() * sizeof(GLfloat));
        announceData.addElement("dots", dotsData);
    }
    
    return announceData;
}
开发者ID:mworks,项目名称:mworks,代码行数:29,代码来源:MovingDots.cpp


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