Пример #1
0
func Opacity(r, g, b float32) {
	opacity := [3]C.RtFloat{
		C.RtFloat(r),
		C.RtFloat(g),
		C.RtFloat(b)}
	C.RiOpacity(&opacity[0])
}
Пример #2
0
func Color(r, g, b float32) {
	color := [3]C.RtFloat{
		C.RtFloat(r),
		C.RtFloat(g),
		C.RtFloat(b)}
	C.RiColor(&color[0])
}
Пример #3
0
func Disk(height float32, radius float32, tmax float32, varargs ...interface{}) {
	h := C.RtFloat(height)
	r := C.RtFloat(radius)
	t := C.RtFloat(tmax)
	names, values, ownership := unzipArgs(varargs...)
	defer freeArgs(names, ownership)
	nArgs := C.RtInt(len(varargs) / 2)
	pNames, pVals := safeArgs(names, values)
	C.RiDiskV(h, r, t, nArgs, pNames, pVals)
}
Пример #4
0
func Cylinder(radius float32, zmin float32, zmax float32,
	ϴmax float32, varargs ...interface{}) {
	r := C.RtFloat(radius)
	z0 := C.RtFloat(zmin)
	z1 := C.RtFloat(zmax)
	t := C.RtFloat(ϴmax)
	names, values, ownership := unzipArgs(varargs...)
	defer freeArgs(names, ownership)
	nArgs := C.RtInt(len(varargs) / 2)
	pNames, pVals := safeArgs(names, values)
	C.RiCylinderV(r, z0, z1, t, nArgs, pNames, pVals)
}
Пример #5
0
func Torus(majrad float32, minrad float32,
	phimin float32, phimax float32,
	tmax float32, varargs ...interface{}) {
	a := C.RtFloat(majrad)
	i := C.RtFloat(minrad)
	p := C.RtFloat(phimin)
	x := C.RtFloat(phimax)
	t := C.RtFloat(tmax)
	names, values, ownership := unzipArgs(varargs...)
	defer freeArgs(names, ownership)
	nArgs := C.RtInt(len(varargs) / 2)
	pNames, pVals := safeArgs(names, values)
	C.RiTorusV(a, i, p, x, t, nArgs, pNames, pVals)
}
Пример #6
0
func Rotate(angle, x, y, z float32) {
	C.RiRotate(C.RtFloat(angle), C.RtFloat(x), C.RtFloat(y), C.RtFloat(z))
}
Пример #7
0
func Translate(x, y, z float32) {
	C.RiTranslate(C.RtFloat(x), C.RtFloat(y), C.RtFloat(z))
}
Пример #8
0
func PixelSamples(x, y float32) {
	C.RiPixelSamples(C.RtFloat(x), C.RtFloat(y))
}
Пример #9
0
func ShadingRate(val float32) {
	C.RiShadingRate(C.RtFloat(val))
}
Пример #10
0
func Format(width int32, height int32, aspectRatio float32) {
	w := C.RtInt(width)
	h := C.RtInt(height)
	r := C.RtFloat(aspectRatio)
	C.RiFormat(w, h, r)
}