Login  Register

Re: how to transform objects not using Transform3D

Posted by philjord on Aug 09, 2022; 9:57pm
URL: https://forum.jogamp.org/how-to-transform-objects-not-using-Transform3D-tp4041515p4041811.html

Awesome,
A quick test by flipping the front facing code
from
        if (dotProduct(p1, normal) < 0) {
to
        if (dotProduct(p1, normal) >= 0) {

shows it redering some weird inside out cubes where the back face can be seen to be fully drawn, nice work!


and reversing the z order with
Collections.reverse(listOfAllFFT);
in flush, cos there's lots of sort calls

I see crazy rendering order with that tall cube always at the front.

Yes I agree you've managed to front face and z sort very well indeed.


I'm not see the cube go out of alignment, I can zoom and rotate and move and at 0,0,0 they come back to good. I've got 2 apps running one untouched and one I'm playing with next to each other and they look like they are coming back to the same image for me.


Your extra class is definitely good, I recommend many many classes, make them inner classes to keep things tidy, if nothing else needs them as an interface then encapsulate them inside the main class as an inner, but encapsulating sub data is very important and useful.