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


C++ setIndex函数代码示例

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


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

示例1: DEN

    // Default constructor
 ComputePC::ComputePC()
    : DEN(0.646944444)
 {
    type1 = TypeID::P1;
    type2 = TypeID::P2;
    resultType = TypeID::PC;
    setIndex();
 }
开发者ID:loongfee,项目名称:ossim-svn,代码行数:9,代码来源:ComputePC.cpp

示例2: Char

Flyer::Flyer( CATEGORY cat, Vec2 lc, float h, TileDeck *dk, int ind, int client_id, int internal_id ) : Char(cat,lc,dk, g_flyer_layer, client_id, internal_id ), h(h), v_h(0), gravity(0) {
    setIndex(ind);
    shadow_prop = createShadow(lc);
    addChild(shadow_prop);

    last_loc = loc;
        
}
开发者ID:NextGenIntelligence,项目名称:CCDK,代码行数:8,代码来源:char.cpp

示例3: DeltaOp

 /** Common constructor taking a gnssRinex as reference station data.
  *
  * By default it will delete satellites present in reference station
  * data but missing in input data.
  *
  * @param gData      gnssRinex data object holding reference
  *                   station data.
  * @param difftype   TypeID of data values to be differenced.
  * @param delSats    Boolean value setting if satellites present in
  *                   reference station data but missing in input data
  *                   will be deleted from the later (this is the
  *                   default behaviour).
  */
 DeltaOp( const gnssRinex& gData,
          const TypeID& difftype,
          const bool& delSats = true )
     : refData(gData.body), deleteMissingSats(delSats)
 {
     diffTypes.insert(difftype);
     setIndex();
 };
开发者ID:ianmartin,项目名称:GPSTk,代码行数:21,代码来源:DeltaOp.hpp

示例4: construct_candidates

int construct_candidates(solution_vector partial_solution, float partial_soln_score,
						 queue* private_queue, void* domain_specific_data) {

	color_assignment* partial = (color_assignment*) partial_solution;
	graph_color_data* data = (graph_color_data*) domain_specific_data;

	if (partial->curr_length == data->max_colors)
		return 1;

	list_node* l;
	color_assignment* extension;

	l = data->g->adjacency_list[partial->curr_length];
	bitvector* clashing_colors = create_bitvector(data->max_colors);

	while (l != NULL) {
		if (l->to < partial->curr_length) {
			setIndex(clashing_colors, partial->vertex_colors[l->to]);
		}
		l = l->next;
	}
	bitvector* used_colors = create_bitvector(data->max_colors);
	for (int i = 0; i < partial->curr_length; i++) {
		setIndex(used_colors, partial->vertex_colors[i]);
	}

	for (int i = 0; i < data->max_colors; i++) {
		if (!getIndex(clashing_colors, i)) {
			extension = create_soln_copy(partial);
			extension->vertex_colors[extension->curr_length] = i;
			extension->curr_length++;
			if (getIndex(used_colors, i)) {
				pq_insert_nc(private_queue, partial_soln_score, extension);
			} else {
				pq_insert_nc(private_queue, partial_soln_score + 1, extension);
			}
		}
	}

	destroy_bitvector(clashing_colors);
	destroy_bitvector(used_colors);
	free(partial->vertex_colors);
	free(partial);

	return 0;
}
开发者ID:rajaths589,项目名称:Distributed-Branch-and-Bound,代码行数:46,代码来源:graph_color.c

示例5: qWarning

void KUndo2QStack::setClean()
{
    if (!m_macro_stack.isEmpty()) {
        qWarning("KUndo2QStack::setClean(): cannot set clean in the middle of a macro");
        return;
    }

    setIndex(m_index, true);
}
开发者ID:KDE,项目名称:calligra,代码行数:9,代码来源:kundo2stack.cpp

示例6: setEnableButtons

void
MainWindow::setDefaultIndex(int index) 
{
	if (index == 0)
	{
		setEnableButtons(pushButton[0]);
		setIndex(0);
	}
}
开发者ID:Sangil-Lee,项目名称:RefCode,代码行数:9,代码来源:MainWindow.cpp

示例7: type3

    // Default constructor
 ComputeMelbourneWubbena::ComputeMelbourneWubbena()
    : type3(TypeID::L1), type4(TypeID::L2), DEN1(L1_FREQ + L2_FREQ),
      DEN2(L1_FREQ - L2_FREQ)
 {
    type1 = TypeID::P1;
    type2 = TypeID::P2;
    resultType = TypeID::MWubbena;
    setIndex();
 }
开发者ID:loongfee,项目名称:ossim-svn,代码行数:10,代码来源:ComputeMelbourneWubbena.cpp

示例8: addElement

			void addElement(const TKey& key, TElement* element) {
				pimpl.elements.insert(std::pair<TKey, TElement*>(key, element));
				element->setParent(this);
				element->setX(dispX()+dispWidth()/2);
				element->setRelX(0.5);
				element->setWidth(dispWidth());
				element->hide();
				setIndex(index());
			}
开发者ID:psde,项目名称:GosuEx,代码行数:9,代码来源:List.hpp

示例9: setIndex

void Debri::init( int ind ) {
    tex_epsilon = DEFAULT_TEX_EPS;
    setIndex(ind);
    if( index < 13*16 ) setScl(PPC*0.6); else setScl(PPC);
    falling_to_pit = false;
    if( ind == B_ATLAS_ITEM_DARK_MATTER_PARTICLE ) {
        setFragmentShader( g_eye_col_replacer );
    }
}
开发者ID:NextGenIntelligence,项目名称:CCDK,代码行数:9,代码来源:char.cpp

示例10: XL_PARAMETER_NOT_USED

void CMainWindow::onSlider (xl::uint id, int _min, int _max, int _curr, bool tracking, xl::ui::CControlPtr ctrl) {
    XL_PARAMETER_NOT_USED(id);
    XL_PARAMETER_NOT_USED(_min);
    XL_PARAMETER_NOT_USED(_max);
    XL_PARAMETER_NOT_USED(tracking);
    assert(id == m_slider->getID());

    setIndex(_curr);
}
开发者ID:cyberscorpio,项目名称:xlview,代码行数:9,代码来源:MainWindow.cpp

示例11: setIndex

void CMainWindow::cmdPrev () {
    int new_index = m_currIndex;
    if (new_index == 0) {
        new_index = m_cachedImages.size() - 1;
    } else {
        new_index --;
    }
    setIndex(new_index);
}
开发者ID:cyberscorpio,项目名称:xlview,代码行数:9,代码来源:MainWindow.cpp

示例12: switch

void Beam::updateIndex() {
    switch(type) {
    case BEAMTYPE_NORMAL:
        break;
    case BEAMTYPE_BLASTER:
        setIndex( B_ATLAS_BLASTER_FRAGMENT_BASE + ((int)(accum_time*20)%2) );
        break;
    }
}
开发者ID:NextGenIntelligence,项目名称:CCDK,代码行数:9,代码来源:char.cpp

示例13: getContext

//private
void MenuHighScoreState::buildMenu(const sf::Font& font)
{
    const float centreX = xy::DefaultSceneSize.x / 2.f;

    const auto& scores = getContext().appInstance.getScores();
    auto list = xy::UI::create<xy::UI::ScoreList>(font);
    list->setAlignment(xy::UI::Alignment::Centre);
    list->setPosition(centreX, 590.f);
    list->setList(scores);
    list->setIndex(getContext().appInstance.getLastScoreIndex());
    m_uiContainer.addControl(list);

    auto upScroll = xy::UI::create<xy::UI::Button>(font, m_textureResource.get("assets/images/ui/scroll_arrow_vertical.png"));
    upScroll->setAlignment(xy::UI::Alignment::Centre);
    upScroll->setPosition(1310, 470.f);
    upScroll->addCallback([list]()
    {
        list->scroll(list->getVerticalSpacing());
    });
    m_uiContainer.addControl(upScroll);

    auto downScroll = xy::UI::create<xy::UI::Button>(font, m_textureResource.get("assets/images/ui/scroll_arrow_vertical.png"));
    downScroll->setAlignment(xy::UI::Alignment::Centre);
    downScroll->setRotation(180.f);
    downScroll->setPosition(1310.f, 720.f);
    downScroll->addCallback([list]()
    {
        list->scroll(-list->getVerticalSpacing());
    });
    m_uiContainer.addControl(downScroll);
    
    auto button = xy::UI::create<xy::UI::Button>(font, m_textureResource.get("assets/images/ui/start_button.png"));
    button->setString("OK");
    button->setAlignment(xy::UI::Alignment::Centre);
    button->setPosition(centreX, 875.f);
    button->addCallback([this]()
    {
        auto msg = m_messageBus.post<xy::Message::UIEvent>(xy::Message::UIMessage);
        msg->type = xy::Message::UIEvent::MenuClosed;
        msg->value = 0.f;
        msg->stateID = (m_endGame) ? States::ID::HighScoresEnd : States::ID::HighScoresMenu;

        if (m_endGame)
        {
            requestStackClear();
            requestStackPush(States::ID::MenuBackground);
        }
        else
        {
            requestStackPop();
            requestStackPush(States::ID::MenuMain);
        }
        
    });
    m_uiContainer.addControl(button);
}
开发者ID:fallahn,项目名称:LunarMooner,代码行数:57,代码来源:MenuHighScores.cpp

示例14: setIndex

void	ConnectedTri::read_0000	( Iff & iff )
{
	IndexedTri::read_0000(iff);

	setIndex( iff.read_int32() );

	setNeighborIndex( 0, iff.read_int32() );
	setNeighborIndex( 1, iff.read_int32() );
	setNeighborIndex( 2, iff.read_int32() );
}
开发者ID:Mesagoppinmypants,项目名称:NGELinux,代码行数:10,代码来源:FloorTri.cpp

示例15: setIndex

void ChoicePropertyComponent::changeIndex()
{
    if (isCustomClass)
    {
        auto newIndex = comboBox.getSelectedId() - 1;

        if (newIndex != getIndex())
            setIndex (newIndex);
    }
}
开发者ID:RomanKubiak,项目名称:amnesia,代码行数:10,代码来源:juce_ChoicePropertyComponent.cpp


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