Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - quixote_arg

Pages: [1]
1
Support / Object3D IDs and Names
« on: March 28, 2006, 03:37:16 am »
I had

Code: [Select]

public void destroy() {
     theWorld.removeAllObjects();
     texMan.flush();
}


Close... but not close enough!

Thanks Egon!

2
Support / Object3D IDs and Names
« on: March 27, 2006, 08:05:55 pm »
Hi, I'm doing a simple 3D viewer, based on the FPS demo.

The player can throw a ball, and if the ball hits something relevant in the world, something happens. This is done as an Applet.

The first time everything goes well, but if I reload the page, object ID's and names change, so the code that checks if the ball has hitten something relevant stops working.

So, questions:

a) How to uniquely identify an Object3D?
or
b) How to dispose things in JPCT so that the next time the applet gets loaded the IDs and names are the same?

Thanks a lot

Tulsi

3
Projects / jPCT 3D Asteroids!
« on: March 27, 2006, 02:20:36 pm »
Thanks! A great oportunity for the rest to learn from source code

will check it and give feedback soon

4
Projects / "Visual" JPCT
« on: March 20, 2006, 01:21:39 pm »
No need to wait for a solid state! You can release it and we can all contribute to it

5
Support / Texture tiling on plane
« on: February 07, 2006, 09:18:38 pm »
Hi!

I've created a plane using Primitives class. When I apply a texture, it strechtes it all over it. I would like the texture to be tiled on the object. Is there an easy way to do this? I searched the forum, with no luck...

Here's the code:

Code: [Select]

wall = Primitives.getPlane(15, 20);
wall.setOrigin(new SimpleVector(800, -150, -300));        wall.setCollisionOptimization(Object3D.COLLISION_DETECTION_OPTIMIZED);
wall.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
wall.setTexture("wall");
theWorld.addObject(wall);


Thanks

6
Support / Textures in applets
« on: January 23, 2006, 08:10:34 pm »
I tried it and still the same rendering.

This is the latest code:

Code: [Select]

        wall = Primitives.getBox(150f, 0.01f);
        wall.rotateY((float) Math.PI / 4);
        wall.rotateX((float) Math.PI / 2);
        wall.setOrigin(new SimpleVector(800, -75, -300));
        wall.setCollisionOptimization(Object3D.COLLISION_DETECTION_OPTIMIZED);
        wall.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);

        wall.setTexture("wall");
       
        wall.calcTextureWrap();

        theWorld.addObject(wall);


Any pointers on how to create the object on the fly?

7
Support / Textures in applets
« on: January 23, 2006, 06:35:06 pm »
I tried calling it, after and before setting the texture and with or without calling recreateTextureCoords but with no luck, the result is the same

 :(

8
Support / Textures in applets
« on: January 23, 2006, 03:12:55 pm »
Hi, I'm trying to make a simple applet based on the FPS code. The world so far consists only of a floor and a wall. I try to apply a brick like texture to the wall but it renders bad.

This is the texture I'm using:


And this is a screenshot of the result:


Here is the code of how the wall is initialized:

Code: [Select]

        wall = Primitives.getBox(150f, 0.01f);
        wall.rotateY((float) Math.PI / 4);
        wall.rotateX((float) Math.PI / 2);
        wall.setOrigin(new SimpleVector(800, -75, -300));
        wall.setCollisionOptimization(Object3D.COLLISION_DETECTION_OPTIMIZED);
        wall.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
        wall.setTexture("wall");
        wall.setEnvmapped(Object3D.ENVMAP_ENABLED);
        wall.setEnvmapMode(Object3D.ENVMAP_CAMERASPACE);
        theWorld.addObject(wall);


And here is the initialization of the FrameBuffer:

Code: [Select]

        buffer = new FrameBuffer(width, height, FrameBuffer.SAMPLINGMODE_NORMAL);
        buffer.enableRenderer(IRenderer.RENDERER_SOFTWARE,
                IRenderer.MODE_OPENGL);
        buffer.setBoundingBoxMode(FrameBuffer.BOUNDINGBOX_NOT_USED);

        buffer.optimizeBufferAccess();


Any ideas why is this happening?

Thanks a lot

9
Support / Sphere collision and radius
« on: January 18, 2006, 08:59:22 pm »
Hi, I have a question.

I've created an sphere Object3D with the Primitives class. Something like:

Code: [Select]
Object3D bullet = Primitives.getSphere(0.5f);

When I want to try collision of that object, naturally the checkForCollisionSpherical method seems to be the most appropiate.

However: the checkForCollisionSpherical takes a float as a radius but the getSphere method of the Primitives class takes a float with the scale of the sphere.

How are these two values related with each other?

I mean: what is the radius for a sphere created with Primitives in order to make the collision sphere optimal?

Thanks

Pages: [1]