|
I want to draw an object after canvas3d has finished rendering and here is the code so far.
@override
Void postRender(){
Super.postRender();
g=getGraphicsContext3D();
g.addLight(somelight);
g.flush();
g2d=getGraphics2D();
g2d.drawRect(0,0,1,1);
g2d.flush();
g.draw(someshape3D);
Paint(getGraphics2D);
}
What this code does is it will render a shape3d after java3d has finished rendering . Their for the shape3d (in this case someshape3d) will always be rendered on top and won't be culled or hide; which is perfect. The problem i am having now is when someshape3d is rendered , it is not perfectly rendered as other objects in the scene that were added to scenebranchgraph; someshape3d's size is small and it's 3d to 2d drawing is not accurate. Is their anybody who can tell me why ? Thank you for reading and i hope i got replie from java3d guys, or anyone who can answer it. Thank you!
|