This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > November 2005 > strange bug with strange work round in blaxxun contact





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author strange bug with strange work round in blaxxun contact
simon

2005-11-09, 7:01 pm

after having been bitten again by this bug in blaxxun contact, esp.in
complex worlds where its nice fast engine is particularly useful, i've
spent some time pinned it down and produced the simplest example i can
think of that exhibits it, also found a work-round.

code below works,( produces 3 different flat shapes ) but only does so
when the dummy def is included.

#VRML V2.0 utf8
PROTO IndexedFaceSetShapeSubClass [
field MFVec3f def []
]{
Shape {
appearance Appearance { material Material { } }
geometry DEF main IndexedFaceSet {
coordIndex [0,1,2,3]
coord DEF dummyDef Coordinate { point [] } }
}
DEF build Script {
field SFNode faceSet USE main
field MFVec3f points IS def

## comment the dummy line below and blaxxun contact uses the points
from the last use for all nodes made from this proto!!
field SFNode faceSet1 USE dummyDef

directOutput TRUE
url ["java script:
function initialize(){
faceSet.coord.point=points ;
}
"]
}}

## oblong
IndexedFaceSetShapeSubClass {def [0 0 0,2 0 0,2 .5 0,0 .5 0,]}

Transform {translation -2.5 0 0
children [
## square
IndexedFaceSetShapeSubClass {def [0 0 0,1 0 0,1 1 0,0 1 0,]}
]
}

Transform {translation 2.5 0 0
children [
## oblong
IndexedFaceSetShapeSubClass {def [0 0 0,.5 0 0,.5 2 0,0 2 0,]}
]
}

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews