Пример #1
0
func (m *Material) GetMaterialFloat(key MatKey, typ TextureType, textureIndex int) (float32, Return) {
	var f float32
	ret := C.aiGetMaterialFloatArray((*C.struct_aiMaterial)(m), key.constString(), C.uint(typ), C.uint(textureIndex), (*C.float)(&f), nil)
	return f, Return(ret)
}
Пример #2
0
func (m *Material) GetMaterialFloatArray(key MatKey, typ TextureType, textureIndex int, pOut []float32) Return {
	header := (*reflect.SliceHeader)(unsafe.Pointer(&pOut))
	ret := C.aiGetMaterialFloatArray((*C.struct_aiMaterial)(m), key.constString(), C.uint(typ), C.uint(textureIndex), (*C.float)(&pOut[0]), (*C.uint)(unsafe.Pointer((&header.Len))))
	return Return(ret)
}