Пример #1
0
// auxiliars
void CRender::auxAxis() {
	setLineWidth(3.0f);
	setColor(1.0f,0.0,0.0);
	beginShapeLines();
		addVertex(0.0f,0.0f,0.0f);
		addVertex(1000.0f,0.0f,0.0f); // X
	endShape();
	
	enableLineStipple();
	setLineStipple(1,0xaaaa);
	
	beginShapeLines();
		addVertex(0.0f,0.0f,0.0f);
		addVertex(-1000.0f,0.0f,0.0f); // X neg
	endShape();
	disableLineStipple();
	
	setColor(0.0f,1.0,0.0);
	beginShapeLines();
		addVertex(0.0f,0.0f,0.0f);
		addVertex(0.0f,1000.0f,0.0f); // y
	endShape();
	
	enableLineStipple();
	beginShapeLines();
		addVertex(0.0f,0.0f,0.0f);
		addVertex(0.0f,-1000.0f,0.0f); // y neg
	endShape();
	disableLineStipple();
	
	setColor(0.0f,0.0,1.0);
	beginShapeLines();
	addVertex(0.0f,0.0f,0.0f);
	addVertex(0.0f,0.0f,1000.0f); // z
	endShape();
	
	enableLineStipple();
	beginShapeLines();
	addVertex(0.0f,0.0f,0.0f);
	addVertex(0.0f,0.0f,-1000.0f); // z neg
	endShape();
	disableLineStipple();
	setLineWidth(1.0f);
	
}
Пример #2
0
NxCursor::NxCursor(NxObjectFactoryInterface *parent, QTreeWidgetItem *ccParentItem, UiRenderOptions *_renderOptions) :
    NxObject(parent, ccParentItem, _renderOptions) {
    glListCursor = glGenLists(1);
    curve = 0;
    setTimeLocal(0);
    nextTimeOld = 0;
    timeOld = 0;
    time = 0;
    timeLocal = 0;
    timeLocalOld = 0;
    timeLocalAbsolute = 0;
    previousCursorReliable = false;
    previousPreviousCursorReliable = false;
    cursorAngleCacheSinZ = cursorAngleCacheCosZ = cursorAngleCacheSinY = cursorAngleCacheCosY = 0;
    cursorPoly       = NxPolygon(4);
    cursorPoly[0]    = NxPoint();
    cursorPoly[1]    = NxPoint();
    cursorPoly[2]    = NxPoint();
    cursorPoly[3]    = NxPoint();
    cursorPolyOld    = NxPolygon(4);
    cursorPolyOld[0] = NxPoint();
    cursorPolyOld[1] = NxPoint();
    cursorPolyOld[2] = NxPoint();
    cursorPolyOld[3] = NxPoint();
    setNbLoop(0);
    setStart("1 0");
    setTimeFactor(1);
    setTimeFactorF(1);
    setWidth(1);
    setDepth(0);
    setTime(0);
    setSize(1.2);
    setLineFactor(1);
    setLineStipple(0xFFFF);
    setColorActive("cursor_active");
    setColorInactive("cursor_inactive");
    setTimeStartOffset(0);
    setTimeEndOffset(0);
    setTimeInitialOffset(0);
    setEasing(0);
    setBoundsSource("-10 10 -10 10 -10 10");
    setBoundsTarget("0 1 0 1 0 1");
    boundsSourceIsBoundingRect = true;
}