Hello Mr. Lusa, Sorry for not answering earlier, I added the missing support for the rotations by adding some methods that changes the internal scene node orientation. I also did a small refactoring in the support for orientation, because I received email with an implementation of quaternions that I have review and integrate during the week.
Try the following in the playground: v := RWView new. element := RWCube element. element rotateByXDegrees: 60. v add: element. v open. Best regards, Ronie 2015-04-27 3:55 GMT-03:00 Lusa Nicolas <nicolas.l...@usi.ch>: > Hello mr. Bergel, > > I actually have done something really simple. On the construction of a > cube shape in WDGeometryBuilder I simply made a method looking as follows: > WDGeometryBuilder>>#addCubeWithWidth: height: depth: rotatedBy: . > In the method I simply use the angle to compute the rotation when creating > every single triangle (rotating every point of such triangle with respect > to the y axis). > It would work smoothly if only few shapes would have been instantiated but > unfortunately this results in a severe drop of performance since a new > shape is created for every instance of an object (because the angle > rotation is different for each shape). > If you still want the code I wrote for such rotation I can provide it to > you, but probably that's not how proper rotations should be performed in > woden. > > Hopefully we can find a better solution that doesn't influence > performance in such way. > > Cheers, > Nicolas > > P.S. I apologize for the misleading subject of the mail. I am not using > Roassal3d but I am using a package called Woden-Roassal, which works almost > exactly like Roassal3d (in fact I guess they are related somehow), that is > in the Woden project as default. A more appropriate e-mail subject would > have been: Woden-Roassal (3d object rotations). > > On Apr 24, 2015, at 10:49 PM, Alexandre Bergel <alexandre.ber...@me.com> > wrote: > > Hi Lusa, > > Well spotted! > I worked on the connection Woden <—> Roassal3d. I should be able to hook > your rotation into roassal. Can you provide your fix for the rotation > please? > > Cheers, > Alexandre > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > On Apr 22, 2015, at 9:07 AM, Lusa Nicolas <nicolas.l...@usi.ch> wrote: > > Hi, > > I am still working with Woden, in particular with Woden-Roassal and I > noticed that rotations on objects are missing (I feel that this is weird > that it doesn't have such feature so I am not excluding that I can be wrong > but I didn't manage to find anything in the code to rotate objects). > > Now if I would like to rotate objects it wouldn't be too bad if I were > using Woden at his "lowest layer" but I am actually building cubes with > Woden-Roassal and there I get lost. > > I already made some rotations on Woden built arbitrary objects, now I > would like to extend it to objects built from Woden-Roassal but I honestly > miss on finding the connection between the two. > > I saw that the base shape is built in: RWCube>>#createBaseShapeNode, I > would be able to build a rotated shape from there but that would result in > all shapes being rotated in such way since in > RWSimpleShape>>#buildRenderableFor:view: when we select the shape: > baseShape := aView baseShapeNodeNamed: self baseShapeName ifAbsentPut: [ > self createBaseShapeNode ]. > we would get back the previous base shape defined. > > Any suggestions on how to do it? > > Cheers, > Nicolas > > > >