Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3
1  Java Game APIs & Engines / JOGL Development / GLCanvas Picking up previous buffer on: 2007-03-14 07:39:48
I am using XIth as rendering engine ,and after migrating to newer xith version ,
GlCanvas has started to pick up previous buffer on minimizing and maximizing of Application .
And if i keep on doing this ,display in GLCanvas switch between current and previous buffer ,this also happens if bring any other app in front of GlCanvas.
2  Java Game APIs & Engines / Xith3D Forums / Re: Multiple GLCanvas on one JFrame on: 2007-01-10 05:02:49
btw. What is an m/c?

 Grin sorry for being lazy , i intended Machine .
3  Java Game APIs & Engines / Xith3D Forums / Re: Multiple GLCanvas on one JFrame on: 2007-01-09 06:53:42
Well on my working m/c this test example is working fine ,
i mean no problem with fourth frame .

The problem comes when i use on newer m/c with updated graphics card.
That also not with fourth frame getting rendered but only if you resize the panel etc.

As it is not happening on your m/c , please send me your system details with what graphic card you are using.

This problem does not come when different  scenes are rendered on separate canvases , so that means it is because
of some illegal sharing of memory .

Oh, these HotSpot error lag Angry. They don't say nothing for me. But you can maybe use the for googling for the problem.

 Cheesy yaa these error doesn't say much , i googled for this problem and initially my reaction was that this problem is with
Swing integration with Opengl , and so i tried this on Java 6.0 also .

 i am able to render multiple canvases in JOGl but when i use Xith for rendering than this problem comes .That too
when we share the scene-Graph .
So now i think i need to see how the same scene is rendered to multiple canvases and lets see what we can find ?
4  Java Game APIs & Engines / Xith3D Forums / Re: Multiple GLCanvas on one JFrame on: 2007-01-08 13:15:57
Hi this problem is coming in Xith latest release  9.0. also

i tried to run   org.xith3d.test.ui.FourViewsPanelTest
On a  Windows XP with Intel Graphics Card  : verson - 6.14.10.4267.

Now just try to resize the panels.

The application crashes with this exception.

1  
2  
3  
4  
5  
6  
7  
8  
# An unexpected error has been detected by Java Runtime Environment:
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x036e4938, pid=3768, tid=3252
# Java VM: Java HotSpot(TM) Client VM (1.6.0-rc-b104 mixed mode, sharing)
# Problematic frame:
# C  [ialmgicd.dll+0x84938]
# An error report file with more information is saved as hs_err_pid3768.log
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp


i tried this other graphics card in    6.14.10 4series and same exception is coming but surprisingly  , this works fine on
6.14.10 3series  graphic card .
5  Java Game APIs & Engines / Xith3D Forums / Re: Strange Picking Problem on: 2007-01-07 16:43:50
Thanks for the modification you have done
I've just modified the RenderLoop class by adding a new RunMode. It should now perfectly meet your needs.

Just start the RenderLoop with the following line:
1  
rl.begin( RunMode.RUN_IN_SEPARATE_THREAD_AND_WAIT );


Then any time you call
1  
rl.nextIteration();

the next frame will be rendered in a separate thread. Cool, he? Smiley.
yaa its quite clean and cool  Wink
6  Java Game APIs & Engines / Xith3D Forums / Re: Strange Picking Problem on: 2007-01-07 16:40:59
Oh Thanks , i was about to dig into xith new code to see how this can be achieved ,but you just saved my time  Smiley .

I just figured out one more problem .

Picking is working fine when scene has only 2 shapes to render .
But if we add more objects  then picking is not returning correct result ,

Say if i have created three  objects line and sphere and Quad  than when i pick sphere , its returning Quad .

After debugging i found that picking part is happening properly but when it  extract the selected Object from
selectBuffer in method convertSelectBuffer of CanvasPeer there its extracting wrong object.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
import java.util.List;

import javax.vecmath.Color3f;
import javax.vecmath.Point3f;

import net.jtank.input.KeyCode;

import org.xith3d.geometry.Line;
import org.xith3d.geometry.Quad;
import org.xith3d.geometry.Sphere;
import org.xith3d.picking.PickResult;
import org.xith3d.render.base.Xith3DEnvironment;
import org.xith3d.render.canvas.Canvas3DWrapper;
import org.xith3d.render.canvas.Canvas3DWrapper.Resolution;
import org.xith3d.render.loop.RenderLoop;
import org.xith3d.scenegraph.BranchGroup;
import org.xith3d.scenegraph.Transform3D;
import org.xith3d.scenegraph.TransformGroup;

public class PickingTest extends RenderLoop {
   // translation part of our scenegraph
  private TransformGroup objTranslate;
   
   private TransformGroup objRotate;

   private Transform3D translate;

   Canvas3DWrapper canvas;
   
    /**
     * Synchronization object to ensure that only one thread has access to pick params
     */

    private Object pickParamsMutex = new Object();
   
      private boolean picked = false;
       private int pickX;
       private int pickY;



   private BranchGroup createScene() {
      // create a BranchGroup
     BranchGroup scene = new BranchGroup();

      scene.setPickable(true);

      // let objects along this path translate
     translate = new Transform3D();
      objTranslate = new TransformGroup(translate);
     
      objRotate= new TransformGroup();
      objTranslate.addChild(objRotate);
      scene.addChild(objTranslate);
     
      Line line = new Line(new Point3f(30, 0, 0), new Point3f(100, 0, 0),new Color3f(1, 1, 1));
      line.setPickable(true);
      objRotate.addChild(line);
     
      Sphere sph = new Sphere(10, 10, 1, 20);
      sph.setPickable(true);
      objTranslate.addChild(sph);
     
      Point3f[] vertexArray={new Point3f(30, 10, 0), new Point3f(50, 10, 0),new Point3f(50, 40, 0), new Point3f(30, 40, 0)};
      Quad quad = new Quad(new Color3f(1, 1, 1),0,vertexArray);
      quad.setPickable(true);
      objTranslate.addChild(quad);

      return scene;
   }

   public PickingTest() {

      Xith3DEnvironment env = new Xith3DEnvironment(this);
      env.getView().setScreenScale(100);
      env.getView().setProjectionPolicy(env.getView().PARALLEL_PROJECTION);
      canvas = Canvas3DWrapper.createStandalone(Resolution.RES_800X600,"My empty scene");
      this.registerKeyboardAndMouse(canvas);
      env.addCanvas(canvas);
      env.addBranchGraph(createScene());

      this.begin();
   }

   public static void main(String[] args) {
      new PickingTest();
   }
    protected void loopIteration(long gameTime, long frameTime)
       {
           super.loopIteration(gameTime, frameTime);
           
           synchronized (pickParamsMutex)
           {
               if (picked)
               {
                   // Pick object at mouse point and within 3 pixels around it
                  System.out.println("Picking at " + pickX + ", " + pickY);
                   
                   List<PickResult> results = canvas.pickAll(pickX, pickY, 3, 3);
                   
                   if (results == null)
                   {
                       System.out.println("Pick results are null");
                   }
                   else
                   {
                       System.out.println("Detected " + results.size() + " hits");
                       
                       int i = 0;
                       for (PickResult pr: results)
                       {
                           System.out.println("  Hit (" + i++ + "): Shape3D: \"" + pr.getShape().toString() );
                       }
                   }
                   
                   picked = false;
               }
           }
       }
   public void onMouseButtonPressed(int button, int x, int y) {

         // Transfer mouse event parameters to rendering thread
        synchronized (pickParamsMutex)
        {
            this.pickX = x;
            this.pickY = y;
           
            picked = true;
        }
 
   }
      public void onKeyReleased(int key) {
         switch (key) {
         case KeyCode.VK_ESCAPE:
            System.exit(0);
            break;
         }
      }
}
7  Java Game APIs & Engines / Xith3D Forums / Re: Strange Picking Problem on: 2007-01-07 14:27:34
Thanks a lot ,it drove me crazy as why the scene is disappearing , took 3 hours as firstly i was checking my code and than i made this test case  Grin

Why don't you use all the wrapper classes? If you want to shrink your code a lot, do it like the following:

basically i have  a lot of code depending upon previous version so i am making small test-cases to see
how i will refactor my existing code to be compatible with current release.

For example : I don't render the scene continuously  but  i do rendering in separate thread -->something like this

   
1  
2  
3  
4  
5  
6  
7  
8  
9  
     while(true){
         if(renderingFlag){
                              renderingFlag=false;
            synchronized (lock) {
               view.renderOnce();
            }
           
         }
      }

So only if i have made some changes in Scene -Graph i make renderingFlag=true .
The scene i am rendering are very big so i am doing this.

I hope there must be some easy was to handle all this in newer version thats why i am
first trying with test cases.

basically was very busy with my development that so not able to keep pace with xith development. 
8  Java Game APIs & Engines / Xith3D Forums / Strange Picking Problem on: 2007-01-07 11:07:14
I am migrating my existing code to new Xith Version but  picking is giving me hard time  Huh

This is small test-Case.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
167  
168  
169  
170  
171  
172  
173  
import java.awt.AWTEvent;
import java.awt.Toolkit;
import java.awt.event.AWTEventListener;
import java.awt.event.MouseEvent;
import java.util.List;

import javax.vecmath.Color3f;
import javax.vecmath.Point3f;
import javax.vecmath.Vector3f;

import org.xith3d.geometry.Line;
import org.xith3d.geometry.Sphere;
import org.xith3d.picking.PickResult;
import org.xith3d.render.Canvas3D;
import org.xith3d.render.CanvasPeer;
import org.xith3d.render.Option;
import org.xith3d.render.RenderPeer;
import org.xith3d.render.base.Xith3DEnvironment;
import org.xith3d.render.jsr231.RenderPeerAWTImpl;
import org.xith3d.scenegraph.BranchGroup;
import org.xith3d.scenegraph.Locale;
import org.xith3d.scenegraph.Transform3D;
import org.xith3d.scenegraph.TransformGroup;
import org.xith3d.scenegraph.View;
import org.xith3d.scenegraph.VirtualUniverse;

public class PickingTest {

   private TransformGroup objTranslate;

   private Transform3D translate;

   Canvas3D canvas;

   View view;

   /**
    * Synchronization object to ensure that only one thread has access to pick
    * params
    */

   private Object pickParamsMutex = new Object();

   private boolean picked = false;

   private int pickX;

   private int pickY;

   /**
    * Draws a cube.
    */

   public PickingTest() {

      VirtualUniverse universe = new VirtualUniverse();
      view = new View();
      view.setProjectionPolicy(View.PARALLEL_PROJECTION);
      view.setScreenScale(100);
      universe.addView(view);

      Locale locale = new Locale();
      universe.addLocale(locale);
     

      /*
       * Problem : why i have to Instantiate this.
       */

      // Xith3DEnvironment env = new Xith3DEnvironment();
     locale.addBranchGraph(createScene());
     

      RenderPeer rp = new RenderPeerAWTImpl();
      CanvasPeer cp = rp.makeCanvas(null, 640, 480, 32, false);
      cp.getRenderOptions().setOption(Option.ENABLE_WIREFRAME_MODE, true);

      canvas = new Canvas3D();
      canvas.set3DPeer(cp);

      view.addCanvas3D(canvas);
      view.getTransform().lookAt(new Point3f(0, 0, 3), new Point3f(0, 0, 0),
            new Vector3f(0, 1, 0));

      Toolkit.getDefaultToolkit().addAWTEventListener(
            new EventListener(),
            AWTEvent.KEY_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK
                  | AWTEvent.MOUSE_MOTION_EVENT_MASK);

      // main rendering loop
     while (true) {
         view.renderOnce();
         synchronized (pickParamsMutex) {
            if (picked) {
               // Pick object at mouse point and within 3 pixels around it
              System.out.println("Picking at " + pickX + ", " + pickY);

               List<PickResult> results = canvas.pickAll(pickX, pickY, 3,3);

               if (results == null) {
                  System.out.println("Pick results are null");
               } else {
                  System.out.println("Detected " + results.size()
                        + " hits");

                  int i = 0;
                  for (PickResult pr : results) {
                     System.out.println("  Hit (" + i+++ "): Shape3D: \""
                           + pr.getShape().toString());
                  }
               }

               picked = false;
            }
         }
      }
   }

   /**
    * Starts the application.
    *
    * @param args
    *   command line parameters
    */
   public static void main(String[] args) {
      new PickingTest();
   }

   public void onMousePressed(int x, int y) {
      synchronized (pickParamsMutex) {
         this.pickX = x;
         this.pickY = y;
         picked = true;
      }

   }

   /**
    * Our own EventListener.
    */
   class EventListener implements AWTEventListener {
      public void eventDispatched(AWTEvent event) {
         if (event instanceof MouseEvent) {
            MouseEvent e = (MouseEvent) event;
            switch (e.getID()) {
            case MouseEvent.MOUSE_PRESSED:
               onMousePressed(e.getX(), e.getY());
               break;
            }
         }
      }
   }

   private BranchGroup createScene() {
      // create a BranchGroup
      BranchGroup scene = new BranchGroup();

      scene.setPickable(true);

      // let objects along this path translate
      translate = new Transform3D();
      objTranslate = new TransformGroup(translate);
      scene.addChild(objTranslate);

      Sphere sph = new Sphere(5, 5, 1, 20);
      sph.setPickable(true);
      objTranslate.addChild(sph);

      Line line = new Line(new Point3f(30, 0, 0), new Point3f(100, 0, 0),
            new Color3f(1, 1, 1));
      line.setPickable(true);

      objTranslate.addChild(line);
      return scene;
   }
}


On mouse click scene disappears but strangely if i just Instantiate  Xith3DEnvironment object even though i am not using it
the problem goes away .
Just uncomment the  instantiation line in constructor.
9  Java Game APIs & Engines / Xith3D Forums / Re: Multiple GLCanvas on one JFrame on: 2007-01-07 08:05:02
I am using Xith 8.0 version and now i am trying to shift to new 9.0 beta ..but lot of code is tied up with older
version and so it will take some time to shift to latest version.

I was having this problem in older version of Xith  but surprisingly it works with Intel graphics card of 3 series but not the latest.


10  Java Game APIs & Engines / JOGL Development / Re: Multiple GLCanvas on one JFrame on: 2007-01-06 05:21:38
Yaa Marvin , Russell is right  as today only i tried  my example but without sharing the Branch-Group and it
was running fine on newer Intel Graphic Card .

So the problem is when we share a Branch-Group and render it with two views on different canvases.
It has nothing to do with JOGL part .

I haven't looked into Xith rendering but i feel that its because sharing of memory in
texture rendering .
11  Java Game APIs & Engines / JOGL Development / Re: Multiple GLCanvas on one JFrame on: 2007-01-05 11:24:39
I  am also facing the same problem .
 
I have created Multiple Canvas ,each having its own View , Universe etc.
All the canvases share the same scene -Graph that is share Same BranchGroup.

I am calling these Multiple View --> view.renderOnce() method in separate threads.

Everything is working fine , I am able to display my scene in different Canvas on a single Panel with different View direction.
I am using Intel Graphics Card : version 6.14.10.3691.

But when i run the same code on newer version of Graphics Card say :6.14.10.4543
my application crashes with error message.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0bdf4938, pid=1176, tid=2972
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0-rc-b104 mixed mode, sharing)
# Problematic frame:
# C  [ialmgicd.dll+0x84938]
#
# An error report file with more information is saved as hs_err_pid1176.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#


Is this because of  Incompatibility of Intel newer Graphics Card with JOGl .

12  Java Game APIs & Engines / Xith3D Forums / Re: Clipping in Orthographics projection on: 2006-12-21 13: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
13  Java Game APIs & Engines / Xith3D Forums / Clipping in Orthographics projection on: 2006-12-21 07: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 View.java
1  
2  
// 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.
14  Java Game APIs & Engines / Xith3D Forums / Re: small community gift!! on: 2006-09-28 06:59:05
When I've finished the rendering optimizations there will (or could) be the possibility to add scenegraph change listeners. Maybe you want to make use of them Wink.

Yaa that will give more control on SceneGraph behaviour , and would be a cleaner way to do things .

As of now i set one Flag when i modify scenegraph and my rendering thread keeps track of that Flag
and if thier is any change it again renders the scene ,Not a very good way to do things but i dont want to
keep rendering even if thier is no change to scene.

With this approach i have to ask the rendering thread to render in case of any resize or system triggred
paint method, Again not a very clean way to do things.

15  Java Game APIs & Engines / Xith3D Forums / Re: small community gift!! on: 2006-09-27 12:11:20
Are you maybe interested in doing this?

Yaa i am planning to extend this and use as a debugging tool as presently i have to
rely on Eclipse debuging for itrataing through the Scene  .

Also in our  project we modify scenegraph preety much and it can certainly help us in
keeping track of sceneGraph .

Infact we already have a panel which shows properties of
scene and any action on that panel updates the scenegraph .
So scene can be rendered interactly ,say we can switch On -Off  Shapes rendered
according to rules.
16  Java Game APIs & Engines / Xith3D Forums / Re: small community gift!! on: 2006-09-27 08:35:48
Thanks dude , .it can become a handy tool for debugging purpose if we can make it dynamic ,
say it gets updated when we make any change to the sceneGraph.
17  Java Game APIs & Engines / Xith3D Forums / Re: Flat shading on: 2006-09-02 07:14:33
i dont know but others members  can point out ...... is this because of not setting the normals properly for the Geometry ?
                                   How important are setting of normals while creating the geometry and what purpose they serve ?

  Maybe i am totally off topic and this has nothing to do with Normals.
                     
18  Java Game APIs & Engines / Xith3D Forums / Re: interacting with Dynamic Geometry on: 2006-08-31 07:04:15
Well it doesn't matter from where update() is called (as long as it is not when the canvas is rendering.
By "existing classes" you mean all those in com.xith3d.* and org.xith3d.* ? Shape3D isn't necessarily dynamic so don't need to implement GeometryUpdater or whatever.
            Yaa you are right  Shape3D isn't necessarily dynamic so don't need to implement GeometryUpdater...it does'nt  make sense to have  unnecessary funtionality in the classes.

    Hawkwind , thanks for pointing out the example,will go through this  Smiley
     
19  Java Game APIs & Engines / Xith3D Forums / Re: Joystick support for Xith on: 2006-08-30 19:37:01
An off hand comment for Qudus  " From where you get so much time to do all these " ..
                                        Reallly wanted to thank you for the kind of support you have given to Xith in recent times ...... Smiley
20  Java Game APIs & Engines / Xith3D Forums / Re: interacting with Dynamic Geometry on: 2006-08-30 17:32:33
Thanks for the answer  Smiley
                         Does it make sense that my Shape3D sub classes implements this interface
                          and so responsibility of changing remains within the Shape class.
                Is their any resaon why this interface is not implemented in existing classes.
21  Java Game APIs & Engines / Xith3D Forums / interacting with Dynamic Geometry on: 2006-08-29 12:39:01
Hi,
    their is a interface for interaction with Dynamic geometry    "com.xith3d.scenegraph.GeomInterface" ,
     Is anybody using it for updating Geometry dynamicallly.

         What is the way to implement Dynamic geometry ,
                             say on User Action we want to change location of one Vertex of a Geometry.


   
22  Java Game APIs & Engines / Xith3D Forums / Re: How to do Snaps on: 2006-08-11 05:28:38
Hmm.......thanks for the reply , let me study the space partitioning algorithm and see how  useful it can be
23  Java Game APIs & Engines / Xith3D Forums / Re: How to do Snaps on: 2006-08-10 15:27:45
Thanks a lot for framing the question properly , my mistake i didnt wrote in a readable manner.
            Yaa that is exactly what i wanted to do ,
             only change is i am not concerned with the nearest Shape3D ,
                                                                                but  with the nearest vertice (which lies within specified range ) to the pick ray , for   ex.

 1.) Lets assume that working plane is XY plane with Z=0.
 2)  And if pick ray is formed at  X=10,Y=10, Z=0 with ray going towards -Z Axis.
 3) So for me any vertice at X=10 ,Y=10, and any  Negative Z value is the Closet Vertice.

                   I would be very happy to know the efficent way , although it may be hard ,may be i'll learn something new in the process  Smiley.

                   
       



                                                                                               
24  Java Game APIs & Engines / Xith3D Forums / How to do Snaps on: 2006-08-10 14:04:47
 hey guys ,
               I need to highlight vertices if mouse comes within a specified range , wat 's the way to go about it.
                    Do i have to do the picking and get all nodes intersected and than take their vertices and than by calulation see which vertices is within the range ,seems not a good solution. Cry
                   Any help is well appreciated .............
25  Java Game APIs & Engines / Xith3D Forums / Re: problem with Xith to Collada XML on: 2006-07-28 06:36:40
Cool   Smiley , so we just have to take the new whoola_collada_jaxb.jar  , anyway right now i am busy with implementing Zoom at a point rather than centre , have done it but am thinking that their can be genral utility methods for visualisation  purposes in  Xith-tk .
              Like :
              1)  Zoom at  point so method should be like 
1  
 zoom(Point3f pointOfZoom ,float scale )

              2) Rotation about an arbitary axis passing through a given point .
1  
 rotateAboutPoint (Point3f point ,Vector3f axis,float angle )

              3) 3-4 classes dedicated for conversion of mouse-To-World cordinates.
                                                            Aim here should be that  :: if a point click gives me some world-cordinates than even after Pan,Zoom,Rotate ,changing the view direction that point still should give the same co-ordinate, its still the same point in the world cordinate .
                      I have done some work on it , and it would be great if we can come up with something like this in Xith
                                     
             
26  Java Game APIs & Engines / Xith3D Forums / Re: problem with Xith to Collada XML on: 2006-07-21 10:40:43
yup...when i saw the wireframe model ..its indeed rendering lots of vertices....... Grin
27  Java Game APIs & Engines / Xith3D Forums / Re: How goes Xith3D? on: 2006-07-21 06:58:34
Hi ,
     its good to have you again (hoping that this is the case  Wink)...
        Welcome on board and about the question ,how many people are using it and what all purpose for is question i am also intrested in.
28  Java Game APIs & Engines / Xith3D Forums / Re: view particuar face of object in 3d on: 2006-07-21 06:07:13
Yaa you are right , but i was doing what rosemary is doing ...i think so,
                            Basically you want face to be perpendicualr so for that your eye To Object vector has be perpendicular to face.
                No you are not wrong infact    in last two steps i have pointed out the same thing .
                                                                                                               That is to figure a point on Face and drive a equation of line from that point and parallel to the calculated Normal to Face.
Quote
Interesting algorithm. Maybe we should add this functionality to the PickingLibrary, such that it saves the actually picked face of the geometry and it's normal into the PickResult.
Yaa ..if many people require this than we can add this to PickingLibray or we can have a separate Package dedicated to all Selection Problems  but it depends what people are doing with Xith
29  Java Game APIs & Engines / Xith3D Forums / Re: view particuar face of object in 3d on: 2006-07-20 12:58:36
Well its somewhat complicated ,
          I am doing this ,i'll share my algo.
so lets do this in step:

1) All faces are taken as Shape3d object .
2) On click we use Picking to get the face clicked.
3) Now from this face take out 3 vertices .
4) From two vectors from these 3 vertices : AB and BC
5) Now cross these two to get a perpendicular vector to the Face. V
6) This should be your view direction ,so use   view.lookAt function with Object being centre of face and eye somewhere on a line parallel to V and passing through centre of face.
7) Updirection you can decide depending on your requirement.

hope this will help........... Smiley
30  Java Game APIs & Engines / Xith3D Forums / Re: problem with Xith to Collada XML on: 2006-07-20 11:35:13
Hi Croft ,
               How is the scalablity of collada , i mean if my Scene is very big than i think writing it to XML file can be very time consuming ,havent tried it though but i feel that this approach may not scale .have you tried with big scene where number of Vertices being rendered are very high .
Pages: [1] 2 3
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (11 views)
2014-04-15 18:08:23

BurntPizza (10 views)
2014-04-15 03:46:01

UprightPath (23 views)
2014-04-14 17:39:50

UprightPath (10 views)
2014-04-14 17:35:47

Porlus (27 views)
2014-04-14 15:48:38

tom_mai78101 (49 views)
2014-04-10 04:04:31

BurntPizza (107 views)
2014-04-08 23:06:04

tom_mai78101 (207 views)
2014-04-05 13:34:39

trollwarrior1 (176 views)
2014-04-04 12:06:45

CJLetsGame (182 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org 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‑gaming.org
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!