Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Clipping in Orthographics projection  (Read 6889 times)
0 Members and 1 Guest are viewing this topic.
Offline khangharoth

Junior Devvie

There is more to life than JAVA...But Java Rocks

« Posted 2006-12-21 06:53:58 »

Hi i am trying to clip in Orthographic projection.
 In Jogl its done something like this  gl.glOrtho(0.0f,3.0f,   0.0f,3.0f,   -10f,5f);

In xith i thought  in method  calculatePerspective(Canvas3D canvas)  of  View class when its setting projection Matrix with
orthoMesa   it sets the ClippingVolume.

Also while calling this particular method in
// TODO Check for the correct frontClipDistance calculation for this projection. This is known that current use of -backClipDistance is ugly and wrong, and better way for //this calculation needed
        projection.orthoMesa(-screenScale, screenScale, -screenScale*canvasHalfHeight, screenScale*canvasHalfHeight,-backClipDistance, backClipDistance);    

Here if  i don't supply balance parameters like for  left,  right  say i supply  0,10  than perspective gets totally disoriented. Why this restriction of specifying
all the three pairs in equal and opposite values.
I checked out that the method  orthoMesa of Transform3D its same as of  Java3D   ,so is that means we are not properly multiplying  ModelViewMatrix and Projection matrix .

Also is their any other way to take  a 2D image of a scene formed by intersection of    A Scene And a Plane Specified .

Note  : I am trying to write a small CAD Application with help of  Xith . So you can Guess why i am working in Orthographic projection.

Offline Marvin Fröhlich

Senior Devvie

May the 4th, be with you...

« Reply #1 - Posted 2006-12-21 11:56:04 »

Clipping is done in two situations in OpenGL (correct me, if I'm saying bullshit):

  • If a Polygon is totally or partly out of the frustum
  • if a scrissor box is defined by glScissor()

The second one is abstracted by the ScissorBox class in Xith3D. User the setScissorBox() method of Groups and all Shapes inside this group will be clipped by this box.

Offline khangharoth

Junior Devvie

There is more to life than JAVA...But Java Rocks

« Reply #2 - Posted 2006-12-21 12:34:34 »

You are absolutely right .
In my problem i want to create a frustum in such a way that i can take a 2D view which is generated by intersection of Scene with specified Plane.

Thanks for pointing out ScissorBox class, will go trough it.It will give me a direction to think about  Cool

Pages: [1]
  ignore  |  Print  

EgonOlsen (76 views)
2018-06-10 19:43:48

EgonOlsen (56 views)
2018-06-10 19:43:44

EgonOlsen (76 views)
2018-06-10 19:43:20

DesertCoockie (258 views)
2018-05-13 18:23:11

nelsongames (156 views)
2018-04-24 18:15:36

nelsongames (155 views)
2018-04-24 18:14:32

ivj94 (896 views)
2018-03-24 14:47:39

ivj94 (160 views)
2018-03-24 14:46:31

ivj94 (809 views)
2018-03-24 14:43:53

Solater (173 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!