Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (526)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
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 / Xith3D Forums / Xith view TransformGroup Position on: 2006-06-17 22:01:09
Hi,

when terrain following with view - using JCD's FPS camera
when I get the view.getTransform().get( Vector3f ) - the z/x position of the view appears to be 200-300 units ahead or off ,  of  the actual camera.
or in other words - when terrain following - The camera dips and rises as if it were following another transformGroup - thus giving a false Y height

is this correct?
is there a way of getting the actual camera's Transform position vector3f?
2  Java Game APIs & Engines / Xith3D Forums / Re: XithTerrainTest walkaround on: 2006-06-17 13:01:12
got it sorted - used the elevateCamera method and changed the frameInterval to const: 1

then updated the positionVector and viewVector by the difference between current y height and new y height (+/-)

tsk  - what a whale omlette

rmdire
3  Java Game APIs & Engines / Xith3D Forums / Re: XithTerrainTest walkaround on: 2006-06-16 19:04:58
the class:

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  
174  
175  
176  
177  
178  
179  
180  
181  
182  
183  
184  
185  
186  
187  
188  
189  
190  
191  
192  
193  
194  
195  
196  
197  
198  
199  
200  
201  
202  
203  
204  
205  
206  
207  
208  
209  
210  
211  
212  
213  
214  
215  
216  
217  
218  
219  
220  
public class SceneCamera {
   
   private TransformGroup cameraGroup ;
   
   numberConstants cons = new numberConstants();

     private Vector3f       upVector          = new Vector3f(0f, 0f, 1f),
                      tempVector        = new Vector3f(0f, 0f,.0f),
                      viewVector        = new Vector3f(0f, 1f,.5f),
                      axisVector        = new Vector3f(0f, 0f, 0f),
                      strafeVector      = new Vector3f(0f, 0f, 0f),
                      positionVector    = new Vector3f(0f, 0f,.0f);
     public Vector3f        moveCameraVector  = new Vector3f(0f, 0f, 0f);

     private boolean        keys[]            = null,
                      frameActive       = false;

     private Insets         insets            = null;

     private Point          mousePosition     = null,
                      componentPosition = null;

     private Robot          mouseRobot        = null;

     private float          currentRotX       =   0;
                     

     private int            screenWidth       =   0,
                      screenHeight      =   0,
                      xOffSet           =   0,
                      yOffSet           =   0;
    
     private OpusOne gameBoss;
    
     public float angleY  = 0f,angleZ  = 0f;
     public boolean mouseHasMoved =false;

     public SceneCamera(OpusOne boss,
                boolean keys[],
               TransformGroup cameraGroup,
               javax.swing.JFrame parentFrame){

      this.gameBoss=boss;
      insets           = parentFrame.getInsets();
      this.keys        = keys;
      this.cameraGroup = cameraGroup;
      setComponentPosition(parentFrame.getLocation().x,
                      parentFrame.getLocation().y);

      Toolkit.getDefaultToolkit().addAWTEventListener( new EventListener(),
                                           AWTEvent.KEY_EVENT_MASK        |
                                           AWTEvent.MOUSE_EVENT_MASK      |
                                           AWTEvent.MOUSE_MOTION_EVENT_MASK);
      try{
        mouseRobot = new Robot();
      }
      catch(Exception e){}
     }

     public void setScreenSize(int width, int height){
      screenWidth   = width;
      screenHeight  = height;
      mousePosition = new Point(width>>1,height>>1);
     }

     public void positionCamera(float xPosition, float yPosition, float zPosition,
                         float xView    , float yView    , float zView    ,
                         float xUpVector, float yUpVector, float zUpVector){
      positionVector.set( xPosition, yPosition, zPosition);
      viewVector.set(     xView    , yView    , zView    );
      upVector.set(       xUpVector, yUpVector, zUpVector);
     }

     public void moveCamera(float speed){
       
      moveCameraVector.sub(viewVector, positionVector);
      moveCameraVector.normalize();
      positionVector.scaleAdd(speed, moveCameraVector, positionVector);
      viewVector.scaleAdd(    speed, moveCameraVector, viewVector    );
     
     }
    
   


     public void setViewByMouse(){
     

      int   middleX = (screenWidth  >> 1) ,
           middleY = (screenHeight >> 1) ;

      if((mousePosition.x == middleX) &&
    (mousePosition.y == middleY) )
        return;

      angleY = (float)( (middleX - mousePosition.x) ) / 500.0f;
      angleZ = (float)( (middleY - mousePosition.y) ) / 500.0f;

      if(frameActive)
        mouseRobot.mouseMove(componentPosition.x + middleX, componentPosition.y + middleY);

      currentRotX -= angleZ;

      if(currentRotX > 1.0f)
        currentRotX = 1.0f;
      else
        if(currentRotX < -1.0f)
         currentRotX = -1.0f;
        else{
         axisVector.subviewVector, positionVector);
         axisVector.cross(axisVector, upVector      );
         axisVector.normalize();
         rotateView(angleZ, axisVector.x, axisVector.y, axisVector.z);
         rotateView(angleY, 0, 1, 0);
        }

     }

     private void rotateView(float angle, float x, float y, float z){
      tempVector.sub(viewVector, positionVector);

      float cosTheta         = FastTrig.cos(angle),
           sinTheta         = FastTrig.sin(angle),
           oneMinusCosTheta = 1f     -   cosTheta;

      viewVector.x  = (cosTheta + oneMinusCosTheta * x * x)      * tempVector.x;
      viewVector.x += (oneMinusCosTheta * x * y - z * sinTheta)  * tempVector.y;
      viewVector.x += (oneMinusCosTheta * x * z + y * sinTheta)  * tempVector.z;

      viewVector.y  = (oneMinusCosTheta * x * y + z * sinTheta)  * tempVector.x;
      viewVector.y += (cosTheta + oneMinusCosTheta * y * y)      * tempVector.y;
      viewVector.y += (oneMinusCosTheta * y * z - x * sinTheta)  * tempVector.z;

      viewVector.z  = (oneMinusCosTheta * x * z - y * sinTheta)  * tempVector.x;
      viewVector.z += (oneMinusCosTheta * y * z + x * sinTheta)  * tempVector.y;
      viewVector.z += (cosTheta + oneMinusCosTheta * z * z)      * tempVector.z;

      viewVector.add(positionVector);
     }

     private void strafeCamera(float speed){
      positionVector.x += strafeVector.x * speed;
      positionVector.z += strafeVector.z * speed;

      viewVector.x     += strafeVector.x * speed;
      viewVector.z     += strafeVector.z * speed;
     }

     private void elevateCamera(float speed){
      positionVector.y += upVector.y*speed;
      viewVector.y     += upVector.y*speed;
     }

     private void checkForMovement(float frameInterval){
      float mspeed = cons.moveSpeed * frameInterval;
      float rspeed = cons.raiseSpeed * frameInterval;
     
      if(keys[KeyEvent.VK_UP       ] || keys['W']) moveCamera(    mspeed);
      if(keys[KeyEvent.VK_DOWN     ] || keys['S']) moveCamera(   -mspeed);
      if(keys[KeyEvent.VK_LEFT     ] || keys['A']) strafeCamera( -mspeed);
      if(keys[KeyEvent.VK_RIGHT    ] || keys['D']) strafeCameramspeed);
      if(keys[KeyEvent.VK_PAGE_UP  ] || keys['E']) elevateCamera( rspeed);
      if(keys[KeyEvent.VK_PAGE_DOWN] || keys['Q']) elevateCamera(-rspeed);
     }

     public void update(float frameInterval){
      strafeVector.sub(  viewVector  , positionVector);
      strafeVector.cross(strafeVector, upVector);
      strafeVector.normalize();

      setViewByMouse();
      checkForMovement(frameInterval);
      cameraGroup.getTransform().lookAt(new Vector3f(positionVector),
                                new Vector3f(viewVector    ),
                                new Vector3f(upVector      ));
     }

     public Vector3f getPositionVector() { return positionVector;}
     public Vector3f getStrafeVector()   { return strafeVector  ;}
     public Vector3f getViewVector()     { return viewVector    ;}
     public Vector3f getUpVector()       { return upVector      ;}

     public boolean  getFrameState(){
      return frameActive;
     }

     public void setComponentPosition(int x, int y){
      if(componentPosition == null)
        componentPosition = new Point();

      componentPosition.setLocation(x,y);
     }

     public void setFrameState(boolean state){
      frameActive = state;
     }

     public void mouseMoved(MouseEvent me){
       mouseHasMoved =true;
       mousePosition = me.getPoint();
       mousePosition.x +=insets.left;
       mousePosition.y +=insets.top;
     }

     public class EventListener implements AWTEventListener{

      public void eventDispatched(AWTEvent event){
        if(event instanceof MouseEvent){
         MouseEvent e = (MouseEvent) event;
         switch(e.getID()){
           case MouseEvent.MOUSE_MOVED: mouseMoved(e); break;
           case MouseEvent.MOUSE_DRAGGED: mouseMoved(e); break;
          
           case MouseEvent.MOUSE_PRESSED: gameBoss.fireBullet1(); gameBoss.fireBullet2();break;
         }
        }
      }
     }

}


maybe i have this all wrong but I thought that if I changed the Y (in accordance with the Y value of the terrain ) of positionVector and viewVector the camera should maintain a constant view level and position would follow the terrain. But what happens is the camera gets stuck at the y view and will not follow the mouse up or down while terrain following . when the camera stops - then normal mouse movement  come back.
4  Java Game APIs & Engines / Xith3D Forums / Re: XithTerrainTest walkaround on: 2006-06-16 12:41:47
Thanks for your answer - but I meant the terrain following part.

the camera class has 3 vector3f  - positionVector , viewVector and upVector (which conforms to our standard Xith View )

I have tried modifying the Y on the positionVector , viewVector  - in accordance with terrain height

but I get some really wierd results -

I have also tried modifying tye Matrx4f  - but again get same strange results

any help ?
5  Java Game APIs & Engines / Xith3D Forums / Re: XithTerrainTest walkaround on: 2006-06-15 21:24:21
Hey

any chance you could show the JCD's FPS camera with your code changes - to follow a given Y height..

I've been trying to do this exact thing - with little success.

thanks

Rmdire
6  Java Game APIs & Engines / Xith3D Forums / Re: Buffer Underflow when adding Child on: 2006-02-09 14:11:29
yep am using:

 Parent Directory        24-Sep-2005 10:38      - 
 Xith3D_2005-08-31_cv..> 31-Aug-2005 05:23   4.1M 
 third-party.tar.gz      24-Sep-2005 10:39   5.6M 
7  Java Game APIs & Engines / Xith3D Forums / Re: Buffer Underflow when adding Child on: 2006-02-06 14:05:34
No - have tried this also - the instruction is definately being called only once and from the rendering thread

The funny thing is that I tried this app on an older version of XITH and I didn't get the error
it worked fine.


strange
8  Java Game APIs & Engines / Xith3D Forums / Re: Buffer Underflow when adding Child on: 2006-02-02 13:09:59
its alot of code - so I have tried to be relevant

here goes:

this is my Loop :

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  
Global BranchGroup : TOPGUESTTRANSFORM

run (){
try {

         while (isthreadAlive) {
         //System.out.println(String.valueOf((Runtime.getRuntime().maxMemory()-Runtime.getRuntime().freeMemory())/1000));
            startTime = System.currentTimeMillis();
                                                                                     currentTime = System.currentTimeMillis();
            fps++;
            if (currentTime - lastTime >= 500) {
               framePerSec=fps << 1;
               if (!fullScreen) {
                  parentFrame.setTitle("BreedaMorph Demo: FPS "+ String.valueOf(framePerSec));
                  lastTime = currentTime;
                  fps = 0;
               }
            }
           
           
            processMessageQue();
            processAnimations();
            translateAnyMoves();
            processKeyPostRequests();
                                       doAvatarTerrainFollowing();
            doCameraTerrainFollowing();
            avController.update(view)
                                                          doMove(new Vector3f(0, height, distance));
            setCameraDistances()
                                           collisionFrames=doCollisionChecking(collisionFrames);
      doCameraCollisionChecking();
            moveSea(0.0003f,new Vector3f(0.0f,0.00002f,0.0f));
            doPingIfRequired();
           
            view.renderOnce();
         
            //if(isThreadIdle()) {throw new IOException();}
           
           
           
           

            timeTaken = System.currentTimeMillis() - startTime;
            if (timeTaken < MILLIS_PER_TICK) {
               synchronized (this) {
                       
                  wait((int)MILLIS_PER_TICK - timeTaken);

               }
            } else {
               currentThread.yield();
            }
           
         }// end while loop
      } catch (java.nio.BufferUnderflowException ioe){}
}



method processMessageQue() looks at a Queue of instructions and calls the necessary function
so if there is a addNewPlayer() instruction - this function is run:

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  
public void addNewPlayer(String name, String ipAddress,Vector3f positionVector) {
      MD2ModelInstance playerHead;
      MD2ModelInstance playerBody;
      MD2ModelInstance playerShell;
      TransformGroup t = new TransformGroup();

     
      newMD2Object md22 = new newMD2Object(1.0f,t);
      md22.loadModel("characters/head.md2","characters/headtex.pcx");
      playerHead=md22.getInstance();
           
      newMD2Object md23 = new newMD2Object(1.0f,t);
      md23.loadModel("characters/shell.md2","characters/shelltex.pcx");
      playerShell=md23.getInstance();
     
      setPolygonAttributes(t,true,PolygonAttributes.POLYGON_FILL,PolygonAttributes.CULL_BACK);
         
      newMD2Object md21 = new newMD2Object(3.5f,t);
      md21.loadModel("characters/body.md2","characters/bodytex.pcx");
      playerBody=md21.getInstance();
     
      t.addChild(new Text2d(name));
     
      t.getTransform().setTranslation(positionVector);      
      playerObject p = new playerObject(t, ipAddress,name,playerHead,playerBody,playerShell);
      otherPlayers.addElement(p);   // vector of all other players
      TOPGUESTTRANSFORM.addChild(t);
   }


now using the same instruction Queue - if there are any positional updates:

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  
public void updatePlayerPositions(TransformGroup playerTransformGroup, String MatrixString)
   {
     
     
      java.util.List nodes = TOPGUESTTRANSFORM.getChildren();
      Matrix4f p =new Matrix4f();
      String[] MatrixArray  = MatrixString.split(",");
     
         p.setRow(0,toFloat(MatrixArray[0]),toFloat(MatrixArray[1]),toFloat(MatrixArray[2]),toFloat(MatrixArray[3]));
         p.setRow(1,toFloat(MatrixArray[4]),toFloat(MatrixArray[5]),toFloat(MatrixArray[6]),toFloat(MatrixArray[7]));
         p.setRow(2,toFloat(MatrixArray[8]),toFloat(MatrixArray[9]),toFloat(MatrixArray[10]),toFloat(MatrixArray[11]));
         p.setRow(3,toFloat(MatrixArray[12]),toFloat(MatrixArray[13]),toFloat(MatrixArray[14]),toFloat(MatrixArray[15]));

      for (int i = 0; i < nodes.size(); i++) {
         SceneGraphObject obj = (SceneGraphObject) nodes.get(i);
         if (obj instanceof TransformGroup) {
            String objName=((TransformGroup)obj).getName();
            String playerName=playerTransformGroup.getName();
            if(objName.equals(playerName))
            {
               
               Transform3D j = new Transform3D();
               j=((TransformGroup)obj).getTransform();
               j.set(p);

                                              ///############here is where I get the Buffer underflow exception##############
               ((TransformGroup)obj).setTransform(j);
                                              //####################################################
               
               break;
            }
         }
      }
   
     
   }


aside from the sloppy code
any ideas why i would still be getting Buffer Under Flow exception?
9  Java Game APIs & Engines / Xith3D Forums / Re: Buffer Underflow when adding Child on: 2006-02-01 11:24:19

Thanks arne - understood.

unfortunately  - thats what I am doing - and i still get the buffer underflow exception

 Huh
10  Java Game APIs & Engines / Xith3D Forums / Re: Buffer Underflow when adding Child on: 2006-01-31 23:59:31

Sorry arne - but I don't understand what you mean by that.
I thought My rendering loop i.e. the run method was the rendering thread.

My scene is contructed in the class constructor - and my run method renders and updates my scene

Do I pass my scene to the run method and add new transformgroups there or do I construct my scene with a global
transformgroup and pass this to my run method - to add children to...


confused

Rmdire
11  Java Game APIs & Engines / Xith3D Forums / Re: Buffer Underflow when adding Child on: 2006-01-31 22:49:33
HI

What is the best way to add a new TransformGroup to my scene at runtime?

Currently I have a Global Transformgroup that I added to my scene during construction.
and when schedualed - I am using my rendering loop to add a new child to this Global Transformgroup as needed.
However I somtimes get a Buffer Underflow exception when I try to update these childrens positioning.

anybody help?
cheers

Rmdire
12  Java Game APIs & Engines / Xith3D Forums / Re: Setting antialiasing in PolygonAttributes on: 2006-01-24 19:04:42
HI arne ,

It only happens when the antialiasing attribute is enabled for the terrain.

strange .....

13  Java Game APIs & Engines / Xith3D Forums / Setting antialiasing in PolygonAttributes on: 2006-01-24 13:52:14
HI,
I just wondered if this was a bug or something I am not doing but:

I have a terrain with a river mesh object running thru it - the river is set to transparent.
when I set the PolygonAttributes for my terrain with antialiasing  enabled
instead of being able to see the underneath terrain thru the river.
the sky box underneath shows thru the terrain thru the river mesh.

any ideas?

rmdire

14  Java Game APIs & Engines / Xith3D Forums / Re: MD2 Lighting etc. on: 2006-01-16 11:20:50
also - the strange "Light up effect" when the model faces the light is still there
15  Java Game APIs & Engines / Xith3D Forums / Re: MD2 Lighting etc. on: 2006-01-16 10:23:07
Sorry - but this still doesn't work

I added in the Normals Fix  etc. 
the texture is coming thru - but I am still getting a flat model


Rmdire
16  Java Game APIs & Engines / Xith3D Forums / Re: MD2 Lighting etc. on: 2006-01-13 12:37:36
Ok - this has some effect - however - it seems to just darken or lighten the texture -

i will play around a bit more a & see whats happens


cheers

rmdire
17  Java Game APIs & Engines / Xith3D Forums / Re: MD2 Lighting etc. on: 2006-01-12 15:59:33


unfortuately - that wont work either - MD2Model has its own private Method getAppearance()
but no setAppearance()  - (Im using eclipse - so all native and inherited properties/methods show in the intelli-sense)

I don't think this gonna happen somehow.
18  Java Game APIs & Engines / Xith3D Forums / Re: MD2 Lighting etc. on: 2006-01-11 17:49:30
No Change really - maybe a teeny bit darker - but can't be sure
19  Java Game APIs & Engines / Xith3D Forums / Re: MD2 Lighting etc. on: 2006-01-11 13:58:03
                                           Material mat2 = new Material(false);
            //mat2.setColorTarget(mat2.EMISSIVE);
          mat2.setEmissiveColor(new Color3f(2.3f, 0.3f, 0.3f));
          //mat2.setColorTarget(mat2.SPECULAR);
          mat2.setSpecularColor(new Color3f(2.2f, 0.2f, 1.2f));
          //mat2.setColorTarget(mat2.AMBIENT);
          mat2.setAmbientColor(new Color3f(2.7f, 0.7f, 0.7f));
          //mat2.setColorTarget(mat2.DIFFUSE);
          mat2.setDiffuseColor(new Color3f(2.0f, 0.5f, 0.5f));
          mat2.setShininess(0.9f);
          mat2.setLightingEnable(true);   

          model.getAppearance().setMaterial(mat2);

                                         character = model.getInstance();
                       
                                         BranchGroup temp = new BranchGroup();
                                          temp.addChild(character);
20  Java Game APIs & Engines / Xith3D Forums / Re: MD2 Lighting etc. on: 2006-01-11 00:13:26
HI ,

Have tried several combinations - including setColorTarget for each setting as suggested - no joy

I have even tried to turn up the Red , Green and Blue individually to see if there is a singular colour effect - again no joy

arne - was setColorTarget  a shot in the dark or have you had success already?

From the source code I see there is a  MD2Model.getAppearance() Method  - I have also tried using this to set appearance prior to getting the model instance
again - no joy

any Ideas?
21  Java Game APIs & Engines / Xith3D Forums / MD2 Lighting etc. on: 2006-01-10 16:41:42
Hi,

I hope someone can help - I am using an MD2 file which I load into my scene

I attached material like so :

Material mat2 = new Material(true);
          mat2.setEmissiveColor(0.0f, 0.0f, 1.0f);
          mat2.setSpecularColor(0.2f, 0.2f, 1.2f);
          mat2.setAmbientColor(0.7f, 0.7f, 0.7f);
          mat2.setDiffuseColor(0.1f, 0.1f, 1.1f);
            mat2.setAmbientColor(0.75f,0.75f,0.75f);
            mat2.setDiffuseColor(0.75f,0.75f,0.75f);

          mat2.setLightingEnable(true);

//recusively add materials
addMaterial(modelTransformGroup, mat2);

But the model appears very flat without any shadows - I used the same "mat2" on both .OBJ and .ASE and the result is fine.

does MD2 not respond to the above Material?

I followed the example from within the MD2 loader file - and thats much the same

 what am I doing wrong?

Thanks

Rmdire
22  Java Game APIs & Engines / Xith3D Forums / Re: self calibrating (antialiasing) RenderPeer on: 2005-12-21 18:32:39
Can anyone show me how you turn on Anti-Aliasing - and how to increase it or decrease it.


please =)

Rmdire
23  Java Game APIs & Engines / Xith3D Forums / Re: Rotating and Moving? on: 2005-12-13 16:24:15
Hi , I'm a newbie too,

but I think I can help you :

This is the function I use for Moving forward :

1  
2  
3  
4  
5  
6  
7  
8  
public void doMove(TransformGroup transformGroup, Vector3f theMove) 
  {              Transform3D transform3D = new Transform3D()
      transformGroup.getTransform(transform3D);
      Transform3D toMove = new Transform3D();
      toMove.setTranslation(theMove);
      transform3D.mul(toMove);
      transformGroup.setTransform(transform3D);
 }


and for a Rotation I use:

1  
2  
3  
4  
5  
6  
7  
8  
9  
 public void doRotateY(TransformGroup transformGroup,float radians) 
  {
                      Transform3D transform3D = new Transform3D()
      transformGroup.getTransform(transform3D);
      Transform3D toMove = new Transform3D();
      toMove.rotY(radians);
      transform3D.mul(toMove);
      transformGroup.setTransform(transform3D);
}


I hope this helps

Cheers

Rmdire

24  Java Game APIs & Engines / Xith3D Forums / Re: latest Xith not working with Radeon 9200 128mb - OGL 1.3.4 on: 2005-12-12 00:07:55
HI William,


you mention in another post that:

Quote
  Re: How to detect no 3d hardware available
« Reply #7 on: November 12, 2005, 08:37:48 pm »   

--------------------------------------------------------------------------------
Actually I think you need OpenGL 1.3 or better now.

The crappy Microsoft one won't work for much at all (not just Xith3D).

ATI or nVidia are your best bets.  Even their really old and crap cards still get driver updates and still work with Xith3D.

Will.
Kiss
25  Java Game APIs & Engines / Xith3D Forums / latest Xith not working with Radeon 9200 128mb - OGL 1.3.4 on: 2005-12-11 00:25:25
HI Just wondered if anybody else had a similar problem

I downloaded the latest Xith from cvs and tried to run it.

the system froze and the G Card crashed - and tried to report errors to ATI.

tried this a few times - with same result

yet It works fine with OpenGL 1.4.1

any ideas why not backward compatable

Cheers

Rmdire

Rmdire
26  Java Game APIs & Engines / Xith3D Forums / Re: ASE Loading textures on: 2005-12-10 20:45:18
Thanks arne

this hasn't worked either - must be summit up with the ASE exporter.

your help on the secrets of XITH is much appreciated though

Cheers

Rmdire
27  Java Game APIs & Engines / Xith3D Forums / Re: ASE Loading textures on: 2005-12-09 10:53:49

HI Arne -
Forgive my total ignorance - but I cant see how to access the ASELoader's TextureLoader in order to set the path.

this is how I load in my ASE file:

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  
                                          AseFile af = new AseFile();
      BufferedReader br = null;
     
      try {
         // Attempts to read the file normally
         br = new BufferedReader(new FileReader(path));
     
      } catch (IOException e) {
         // Attemts to read file from JAR
         URL url = this.getClass().getClassLoader().getResource(path);
         try {
            br = new BufferedReader(new InputStreamReader(url.openStream()));
         } catch (IOException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
         }
      }
     
      AseReader r = new AseReader(br, af);
   
      af.parse(r);
           
     
      namedNodes = new HashMap ();
      TransformGroup rootTG = af.getTransformGroupTree(namedNodes);


How should I access the ASELoader's TextureLoader in order to set the path.

Cheers

Rmdire
28  Java Game APIs & Engines / Xith3D Forums / Re: Convert a POlygon to a Shape3D on: 2005-12-09 10:39:11
Thanks chaps,

Appreciate the help.
29  Java Game APIs & Engines / Xith3D Forums / Convert a POlygon to a Shape3D on: 2005-12-08 14:02:49
Hi,

Ay body tell me how (via code example please)
to convert a single polygon or a resulting triangle List to a Shape3D

Cheers

Rmdire

 
30  Java Game APIs & Engines / Xith3D Forums / Re: ASE Loading textures on: 2005-12-08 09:46:35
Thanks arne,

Yep, I have been using these functions already - I got it from one of your previous posts.

But the model just shows up as white without any reflective feature,

This is why I was wondering if the ASE loading of textures is actually implemented.

actually what I've just done is move the textures out of the folder they should be in and tried to load the model in.
and its loaded without any "cannot find resource errors" - so theres my answer - textures are not working for the ASE loader.

is this correct?
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.

toopeicgaming1999 (72 views)
2014-11-26 15:22:04

toopeicgaming1999 (62 views)
2014-11-26 15:20:36

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (29 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (27 views)
2014-11-24 19:59:16

trollwarrior1 (40 views)
2014-11-22 12:13:56

xFryIx (78 views)
2014-11-13 12:34:49

digdugdiggy (56 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!