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


Golang ker.Stop函数代码示例

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


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

示例1: Get

func (x *Imp) Get() Any {
	//
	if x.dp == 0 {
		ker.Stop(pack, 2)
	}
	if x.num == 0 {
		return x.empty.Clone()
	}
	if x.idx[x.dp] > 100 {
		ker.Stop(pack, 1000+x.idx[x.dp])
	}
	return x.pg[x.dp].Get(x.idx[x.dp])
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:13,代码来源:imp.go

示例2: PosLight

// Pre: Licht n ist eingeschaltet.
// Licht n hat die Position v.
func PosLight(n uint, v *vect.Imp) {
	//
	if !lightInitialized[n] {
		ker.Stop(pack, 3)
	}
	lightSource[n].Copy(v)
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:9,代码来源:imp.go

示例3: edge1

// Aktuelle Ecke ist (L1, n1), postaktuelle Ecke ist (L, n).
func edge1(l Linie, n uint, l1 Linie, n1, t uint, direkt bool) {
	//
	if netz.ExPred2(func(a Any) bool { b := a.(*bahnhof.Imp); return b.Linie() == l && b.Nummer() == n },
		func(a1 Any) bool { b1 := a1.(*bahnhof.Imp); return b1.Linie() == l1 && b1.Nummer() == n1 }) {
		b, b1 := netz.Get2()
		bhf, bhf1 := b.(*bahnhof.Imp), b1.(*bahnhof.Imp)
		bhf.Umstieg()
		bhf1.Umstieg()
		netz.Put2(bhf, bhf1)
		if direkt {
			l = bhf.Linie()
		} else {
			l = Fußweg
		}
		_gleis.Def(l, t)
		netz.Edge1(_gleis)
	} else {
		if !netz.ExPred(func(a Any) bool { b := a.(*bahnhof.Imp); return b.Linie() == l && b.Nummer() == n }) {
			errh.Error2("fehlt Linie", uint(l), "Bhf", n)
		}
		if !netz.ExPred(func(a Any) bool { b := a.(*bahnhof.Imp); return b.Linie() == l1 && b.Nummer() == n1 }) {
			errh.Error2("fehlt Linie", uint(l1), "Bhf", n1)
		}
		ker.Stop(pack, 3)
	}
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:27,代码来源:imp.go

示例4: Write0

func Write0() {
	//
	if !initialized {
		initialize()
	}
	if !scr.UnderX() {
		ker.Stop(pack, 1)
	}
	C.glMatrixMode(C.GL_MODELVIEW)
	C.glLoadIdentity()
	for i := 0; i < 3; i++ {
		matrix[i][0] = C.GLdouble(right[i])
		matrix[i][1] = C.GLdouble(top[i])
		matrix[i][2] = C.GLdouble(-front[i])
	}
	C.glMultMatrixd(&matrix[0][0])
	C.glTranslated(C.GLdouble(-eye[0]), C.GLdouble(-eye[1]), C.GLdouble(-eye[2]))
	C.glClear(C.GL_COLOR_BUFFER_BIT + C.GL_DEPTH_BUFFER_BIT)
	for n := uint(0); n < MaxL; n++ {
		if lightInitialized[n] {
			ActualizeLight(n)
		}
	}
	C.glBegin(POINTS)
	nn = 0
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:26,代码来源:imp.go

示例5: PutNum

func (x *Imp) PutNum(n uint) {
	//
	if n > max {
		ker.Stop(pack, 1)
	}
	x.num = n
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:7,代码来源:imp.go

示例6: defineSubgraph

func (x *Imp) defineSubgraph(n *node) {
	//
	n1 := n
	for n1 != x.postactual {
		if n1.predecessor == nil {
			return
		}
		n1 = n1.predecessor
	}
	for {
		n.inSubgraph = true
		if n == x.postactual {
			return
		}
		nb := n.nbPtr.nextNb
		for nb.to != n.predecessor {
			nb = nb.nextNb
			if nb == n.nbPtr {
				ker.Stop(pack, 7)
			}
		}
		nb.edgePtr.inSubgraph = true
		n = n.predecessor
	}
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:25,代码来源:imp.go

示例7: insert1

// Eff.: s. ins1
func insert1(l Linie, n uint, l0 Linie, n0, u, t uint) {
	//
	// aktuell: vorherige aktuelle
	netz.Reposition()
	var bhf *bahnhof.Imp
	// aktuell: vorherige aktuelle, postaktuell: alt.
	if netz.ExPred(func(a Any) bool { b := a.(*bahnhof.Imp); return b.Linie() == l0 && b.Nummer() == n0 }) {
		// aktuell: (L0, n0), postaktuell: vorherige aktuelle
		bhf = netz.Get().(*bahnhof.Imp)
	} else {
		errh.Error2("fehlt: Linie", uint(l0), "Bhf", n0)
		ker.Stop(pack, 2)
	}
	netz.Reposition()
	// aktuell: vorherige aktuelle, postaktuell: (l0, n0)
	bhf1 := bhf.Clone().(*bahnhof.Imp)
	bhf1.Numerieren(l, n)
	bhf1.Umstieg()
	netz.Ins(bhf1)
	// aktuell: (l, n), postaktuell: vorherige aktuelle
	_gleis.Def(l, t)
	netz.Edge1(_gleis)
	// verbunden: vorherige aktuelle mit (l, n), aktuell: (l, n).
	edge(l0, n0, l, n, u)
	// postaktuell: (l0, n0), aktuell: (l, n)
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:27,代码来源:imp.go

示例8: rot

// Pre: d > 1, x.nbPg.GetNum() > N.
func (x *Imp) rot(d uint, right bool) {
	//
	i := x.idx[d-1]
	i1 := i
	if right { // rotation from right neighbour page to x.pg [d] on the left
		i1++
		x.pg[d].Put(x.pg[d].GetNum(), x.pg[d-1].Get(i))
		x.pg[d].IncNum()
		x.pg[d].PutPos(x.pg[d].GetNum(), x.nbPg.GetPos(0))
		x.pg[d-1].Put(i, x.nbPg.Get(0))
		x.nbPg.RotLeft()
		/********************************************************
		  // with nbPg
		      for i:= uint(1); i < num; i++ {
		        content [i - 1] = content [i]
		        pos [i - 1] = pos [i]
		      }
		      content [num - 1] = empty
		      pos [num - 1] = pos [num]
		      pos [num] = 0
		      num --
		  ********************************************************/
	} else { // rotation from left neighbour page to x.pg [d] on the right
		i1--
		if x.pg[d].GetNum() == 0 {
			ker.Stop(pack, 3)
		}
		x.pg[d].RotRight()
		/********************************************************
		  // with pg [d]
		      pos [num + 1] = pos [num]
		  //  for i:= num - 1; i >= 0; i-- { // does not work, because for uint: 0-- == 2^32 - 1  !
		      i:= num - 1
		      for {
		        content [i + 1] = content [i]
		        pos [i + 1] = pos [i]
		        if i == 0 {
		          break
		        }
		        i--
		      }
		  ********************************************************/
		x.pg[d].Put(0, x.pg[d-1].Get(i1))
		x.pg[d].PutPos(0, x.nbPg.GetPos(x.nbPg.GetNum()))
		x.pg[d].IncNum()
		x.pg[d-1].Put(i1, x.nbPg.Get(x.nbPg.GetNum()-1))
		x.nbPg.ClrLast()
		/********************************************************
		  func (x *Imp) ClrLast () {
		  // with nbPg
		      content [num - 1] = empty
		      pos [num - 1] = pos [num]
		      pos [num] = 0
		      num --
		  ********************************************************/
	}
	x.write(x.pg[d-1], x.pg[d-2].GetPos(x.idx[d-2]))
	x.write(x.pg[d], x.pg[d-1].GetPos(i))
	x.write(x.nbPg, x.pg[d-1].GetPos(i1))
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:61,代码来源:imp.go

示例9: torus

func torus(x, y, z, R, r float64, c col.Colour) {
	//
	if r <= 0.0 || R <= 0.0 {
		ker.Stop(pack, 5)
	}
	for b := 0; b < N; b++ {
		s0, s1 := R+r*cos[b], R+r*cos[b+1]
		z0, z1 := z+r*sin[b], z+r*sin[b+1]
		//    v, n:= vectors (2 * N)
		for l := 0; l < N; l++ {
			quad(x+s0*cos[l], y+s0*sin[l], z0,
				x+s0*cos[l+1], y+s0*sin[l+1], z0,
				x+s1*cos[l+1], y+s1*sin[l+1], z1,
				x+s1*cos[l], y+s1*sin[l], z1, c)
			/*
			   v[2*l].Set3 (x + s0 * cos[l], y + s0 * sin[l], z0)
			   n[2*l].Set3 (1., 1., 1.)
			   v[2*l+1].Set3 (x + s0 * cos[l+1], y + s0 * sin[l+1], z0)
			   n[2*l+1].Set3 (1.0, 1.0, 1.0)
			*/
		}
		//    pts.Ins (pt.QuadStrip, 2 * N, v, n, c)
	}
	ready()
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:25,代码来源:imp.go

示例10: Get

func (x *Imp) Get(p uint) Object {
	//
	if p > max+1 {
		ker.Stop(pack, 5)
	}
	return x.content[p].Clone()
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:7,代码来源:imp.go

示例11: horTorus

func horTorus(x, y, z, R, r, a float64, f col.Colour) {
	//
	if r <= 0. || R <= 0. {
		ker.Stop(pack, 6)
	}
	for a <= -180. {
		a = a + 180.
	}
	for a >= 180. {
		a = a - 180.
	}
	s, c := math.Sin(a*um), math.Cos(a*um)
	for b := 0; b < N; b++ {
		s0, s1 := R+r*cos[b], R+r*cos[b+1]
		x0, x1 := r*sin[b], r*sin[b+1]
		for l := 0; l < N; l++ { //  x -> x * c - y * s, y -> x * s + y * c
			y00, y01 := s0*cos[l], s0*cos[l+1]
			y10, y11 := s1*cos[l], s1*cos[l+1]
			quad(x+x0*c-y00*s, y+x0*s+y00*c, z+s0*sin[l],
				x+x0*c-y01*s, y+x0*s+y01*c, z+s0*sin[l+1],
				x+x1*c-y11*s, y+x1*s+y11*c, z+s1*sin[l+1],
				x+x1*c-y10*s, y+x1*s+y10*c, z+s1*sin[l], f)
		}
	}
	ready()
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:26,代码来源:imp.go

示例12: DecNum

func (x *Imp) DecNum() {
	//
	if x.num == 0 {
		ker.Stop(pack, 6)
	}
	x.num--
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:7,代码来源:imp.go

示例13: Put

func (x *Imp) Put(p uint, o Object) {
	//
	if p > max+1 {
		ker.Stop(pack, 4)
	}
	x.content[p] = o.Clone()
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:7,代码来源:imp.go

示例14: GetPos

func (x *Imp) GetPos(p uint) uint {
	//
	if p > max+1 {
		ker.Stop(pack, 3)
	}
	return x.pos[p]
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:7,代码来源:imp.go

示例15: PutPos

func (x *Imp) PutPos(p, n uint) {
	//
	if p > max+1 {
		ker.Stop(pack, 2)
	}
	x.pos[p] = n
}
开发者ID:CaptainSoOmA,项目名称:Uni,代码行数:7,代码来源:imp.go


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