Ejemplo n.º 1
0
void IndexGenerator::AddPrim(int prim, int vertexCount) {
    switch (prim) {
    case GE_PRIM_POINTS:
        AddPoints(vertexCount);
        break;
    case GE_PRIM_LINES:
        AddLineList(vertexCount);
        break;
    case GE_PRIM_LINE_STRIP:
        AddLineStrip(vertexCount);
        break;
    case GE_PRIM_TRIANGLES:
        AddList(vertexCount);
        break;
    case GE_PRIM_TRIANGLE_STRIP:
        AddStrip(vertexCount);
        break;
    case GE_PRIM_TRIANGLE_FAN:
        AddFan(vertexCount);
        break;
    case GE_PRIM_RECTANGLES:
        AddRectangles(vertexCount);
        break;  // Same
    }
}
Ejemplo n.º 2
0
CAssemblyWindow::CAssemblyWindow(
	BRect frame,
	CMeVDoc *document,
	bool hasSettings)
	:	CTrackWindow(frame, document, true, 
					 (CEventTrack *)document->FindTrack(1),
					 hasSettings)
{
	D_ALLOC(("CAssemblyWindow::CAssemblyWindow(%s)\n",
			 hasSettings ? "hasSettings == true" : "hasSettings == false"));

	document->FindTrack((int32)0)->AddObserver(this);

	AddMenuBar();
	AddToolBar();

	// ++++++ retrieve this from window settings if possible
	m_toolStates[0] = CEventEditor::TOOL_SELECT;

	// add the default strips
	BRect rect(Bounds());
	rect.top = ToolBar()->Frame().bottom + 1.0;
	rect.bottom -= B_H_SCROLL_BAR_HEIGHT;

	AddFrameView(rect, (CTrack *)Document()->FindTrack(1));
	stripFrame->AddType("Arrangement",
						ResourceUtils::LoadImage("AssemblyStrip"));

	if (!hasSettings)
	{
		// add default strip
		AddStrip("Arrangement", 1.0);
		stripFrame->PackStrips();
	}

	SetNewEventType(EvtType_Sequence);
}