mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix module name conflict in example
This commit is contained in:
parent
22202ef680
commit
acef3994db
@ -138,7 +138,7 @@ fn (mut m ObjPart) parse_floats(row string, start_index int) m4.Vec4 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// read and manage all the faes from an .obj file data
|
// read and manage all the faes from an .obj file data
|
||||||
fn (mut p Part) parse_faces(row string, start_index int, obj ObjPart) {
|
fn (mut p Part) parse_faces(row string, start_index int, obj_ ObjPart) {
|
||||||
mut i := start_index + 1
|
mut i := start_index + 1
|
||||||
mut res := [][3]int{}
|
mut res := [][3]int{}
|
||||||
mut v := 0
|
mut v := 0
|
||||||
@ -171,15 +171,15 @@ fn (mut p Part) parse_faces(row string, start_index int, obj ObjPart) {
|
|||||||
// manage negative indexes
|
// manage negative indexes
|
||||||
// NOTE: not well suporeted now
|
// NOTE: not well suporeted now
|
||||||
if v < 0 {
|
if v < 0 {
|
||||||
// println("${obj.v.len} ${obj.v.len-c}")
|
// println("${obj_.v.len} ${obj_.v.len-c}")
|
||||||
v = obj.v.len - v + 1
|
v = obj_.v.len - v + 1
|
||||||
// exit(0)
|
// exit(0)
|
||||||
}
|
}
|
||||||
if n < 0 {
|
if n < 0 {
|
||||||
n = obj.vn.len - n + 1
|
n = obj_.vn.len - n + 1
|
||||||
}
|
}
|
||||||
if t < 0 {
|
if t < 0 {
|
||||||
t = obj.vt.len - t + 1
|
t = obj_.vt.len - t + 1
|
||||||
}
|
}
|
||||||
res << [v - 1, n - 1, t - 1]!
|
res << [v - 1, n - 1, t - 1]!
|
||||||
}
|
}
|
||||||
@ -562,7 +562,7 @@ pub fn tst() {
|
|||||||
//fname := "Forklift.obj"
|
//fname := "Forklift.obj"
|
||||||
fname := "cube.obj"
|
fname := "cube.obj"
|
||||||
//fname := "Orange Robot 3D ObjPart.obj"
|
//fname := "Orange Robot 3D ObjPart.obj"
|
||||||
|
|
||||||
mut obj := ObjPart{}
|
mut obj := ObjPart{}
|
||||||
buf := os.read_lines(fname) or { panic(err.msg) }
|
buf := os.read_lines(fname) or { panic(err.msg) }
|
||||||
obj.parse_obj_buffer(buf)
|
obj.parse_obj_buffer(buf)
|
||||||
|
Loading…
Reference in New Issue
Block a user