Skip to main content

Please HELP ME!!!!!!!

7 replies [Last post]
bertgguo
Offline
Joined: 2006-02-17
Points: 0

I have got a scene from a *.obj file.
This is the code of it:
.....
ObjectFile f=new ObjectFile(flags,
(float(49.0*Math.PI/180.0));
Scene s=null;
try
{
s = f.load(filename); //load a .obj file
} catch (FileNotFoundException e)
{
.....
}
........
objTrans.addChild(s.getSceneGroup());//add scene to BranchGroup
........
Can I get the depthComponent(z-Buffer) of this scene?
By the way,I have got the depthComponent in the function of postSwap().But it looks like no use for me.Can I get the depthComponent in an another way???
Please help me.This puzzled me for a long time.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bertgguo
Offline
Joined: 2006-02-17
Points: 0

I have read it.I think that he also got the depthComponent in the function: postSwap().Maybe it is the only way to get it in java3d.But I want to use the depthComponent info as a parameter in my another function.
Maybe you will say:"you can transfer your function in "postSwap()"."It looks like a way to solve it.But in fact,I want to transport the depthComponent to the client.So I must get the depthComponent in Server. The function of client will use it as a parameter.It will be changed with the command of client.The function "postSwap()" can be transfered easily.If I add socket to this function,it will result a disaster.And I can't control it to excute in a suitable time.

Alessandro Borges

The ZBuffer is just a 2D array.
Put it in a (public) Queue or Vector and send it to your client/server as soon
as possible, using a thread.
Remender you got a depthComponent each frame cycle. If your scene runs at
30FPS it also means 30 depthComponents per second...

--- java3d-interest@javadesktop.org escreveu:
> I have read it.I think that he also got the depthComponent in the function:
> postSwap().Maybe it is the only way to get it in java3d.But I want to use the
> depthComponent info as a parameter in my another function.
> Maybe you will say:"you can transfer your function in "postSwap()"."It
> looks like a way to solve it.But in fact,I want to transport the
> depthComponent to the client.So I must get the depthComponent in Server.
> The function of client will use it as a parameter.It will be changed with the
> command of client.The function "postSwap()" can be transfered easily.If I
> add socket to this function,it will result a disaster.And I can't control it
> to excute in a suitable time.
> ---
> [Message sent by forum member 'bertgguo' (bertgguo)]
>
> http://www.javadesktop.org/forums/thread.jspa?messageID=42391ꖗ
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
> For additional commands, e-mail: interest-help@java3d.dev.java.net
>
>

__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

bertgguo
Offline
Joined: 2006-02-17
Points: 0

Thanks I will try soon.I think that it may be a way to solve it.

Anonymous

Possibly your not very helpful topic is the reason - normally nobody reads such postings...

aces
Offline
Joined: 2003-07-17
Points: 0

Take a look at Daniel Selman's book:
https://secure.manning.com/catalog/view.php?book=selman

In the downloadable source code there is a demo called RasterTest.java . Maybe it can help you.

bertgguo
Offline
Joined: 2006-02-17
Points: 0

I will try .Thanks.

bertgguo
Offline
Joined: 2006-02-17
Points: 0

Why ? No one help me It looks like that java3D has no method to get the depthComponent except
method "readRaster()".