473,569 Members | 2,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java3D: Transform3D.rot X() causing blackness!

The pain! I've looked over this a hundred times and I don't
understand it! I'm new to Java3D, so hopefully someone can help me in
this quick (most likely trivial error).

I am drawing a QuadArray plane w/ the "stripes.gi f" texture (from the
tutorial) applied to it. I've drawn the plane to be 2 inches (-1,-1
to 1,1) and 1 inch (0,0 to 1,1). After creating the Shape3D object, I
add it to the branch group then add that to the Simple Universe.

The above works great!

Then I add the follow code just after adding the BG to the simpleU:

TransformGroup viewPlatform =
u.getViewingPla tform().getView PlatformTransfo rm();
Transform3D viewT3D = new Transform3D();
viewT3D.setTran slation(new Vector3f(-0.5f, -0.5f, -6.0f));
//viewT3D.rotX(-0.35f);
viewT3D.invert( );
viewPlatform.se tTransform(view T3D);

As is, the above works fine -- it shifts everything "deeper" into the
screen. But, if I uncomment the 'rotX' line all I get is black! No
stripes, no nothing. :(

My understanding of the "ViewPlatformTr ansform" is a Transform3D that
affects everything in the universe.

How can I set both the Translation and rotX (and other translations
when the time comes) on the platform tranform?

Thanks for any help!

Jul 17 '05 #1
4 4555
Never did OpenGL in Java mut maybe these are some tips. You're object
probably still is somewhere but outside you're view.
First of all, are you sure the origin(center) of you're object is in the
middle of it? If not, when it rotaties it can rotate outside you're view.
Check it with just a small rotation (1 degree or something).
Another possible cause : I guess rotX is based on GLrotate. If you call that
function everything rotates so you have to reset after you've drawn the
object. Just rotate back or use some commands to call and push you're
viewpoint.

Just some guesses, using this stuff in C / Delphi looks quit different
because that ain't object orientated.

Greetings,
Rick
Jul 17 '05 #2

The proper newsgroups is: comp.lang.java. 3d

| Java 3DTM Interest Group
|
| A discussion list, java3d-interest,
| has been set up for people interested
| in the Java 3D APIs.
|
| We encourage you to use this forum to
| discuss issues pertaining to the Java 3D API
| specification and to Java-based 3D graphics.
|
| Subscribing to java3d-interest
|
| * To subscribe to the java3d-interest list, send email with
|
| subscribe java3d-interest YOUR NAME
|
http://java.sun.com/products/java-me...est_group.html

Hoagie wrote:
The pain! I've looked over this a hundred times and I don't
understand it! I'm new to Java3D, so hopefully someone can help me in
this quick (most likely trivial error).

I am drawing a QuadArray plane w/ the "stripes.gi f" texture (from the
tutorial) applied to it. I've drawn the plane to be 2 inches (-1,-1
to 1,1) and 1 inch (0,0 to 1,1). After creating the Shape3D object, I
add it to the branch group then add that to the Simple Universe.

The above works great!

Then I add the follow code just after adding the BG to the simpleU:

TransformGroup viewPlatform =
u.getViewingPla tform().getView PlatformTransfo rm();
Transform3D viewT3D = new Transform3D();
viewT3D.setTran slation(new Vector3f(-0.5f, -0.5f, -6.0f));
//viewT3D.rotX(-0.35f);
viewT3D.invert( );
viewPlatform.se tTransform(view T3D);

As is, the above works fine -- it shifts everything "deeper" into the
screen. But, if I uncomment the 'rotX' line all I get is black! No
stripes, no nothing. :(

My understanding of the "ViewPlatformTr ansform" is a Transform3D that
affects everything in the universe.

How can I set both the Translation and rotX (and other translations
when the time comes) on the platform tranform?

Thanks for any help!


Try smaller rotations, you are probably shifting
the view so far that the only thing in your world
has moved outside of your viewing area.

Learning Java3d by using it with VRML, a simple
clear text graphics language with a Scenegraph
hierarchy similar to Java3d's makes learning and
experimenting with Java3d a little easier.
Java3d Demos on line with Source code ( Sun's Demos )
-----------------------------------------------------
http://www.cs.nps.navy.mil/people/fa...va3d/examples/
http://groups.google.com/groups?&gro...chester.rr.com
Interactive Web Animation with Java3d & VRML
------------------------------------------------
http://www.frontiernet.net/~imaging/..._and_vrml.html
-- Paul, Java Developer & Web Animator
--------------------------------------
Imgaging the Imagined: Modeling with Math & a Keyboard

Jul 17 '05 #3
On Tue, 14 Oct 2003 13:04:16 GMT, "P. Flavin"
<an******@roche ster.rr.com> wrote:
The proper newsgroups is: comp.lang.java. 3d
I figured there was a 3D group for Java, but my newsgroup
server doesn't seem to want to carry it. Can't post there. :(
Try smaller rotations, you are probably shifting
the view so far that the only thing in your world
has moved outside of your viewing area.

Learning Java3d by using it with VRML, a simple
clear text graphics language with a Scenegraph
hierarchy similar to Java3d's makes learning and
experimentin g with Java3d a little easier.


Thanks for the tips! I'll be sure to take note of them when I
get back to this problem. I'm working on a different problem now
which will help with this in the end.

Thanks!
Jul 17 '05 #4
Thanks Rick,

I think you are right about everything still being there; I
thought about that earlier today after I had a chance to stop beating
my head against the wall. :)
I'm trying to remove the clip distance right now so I can zoom
in and out of the scene without losing any of the scene... so I can
find it again.

Thanks again!

On Tue, 14 Oct 2003 11:50:46 +0200, "Rick" <as******@hotma il.com>
wrote:
Never did OpenGL in Java mut maybe these are some tips. You're object
probably still is somewhere but outside you're view.
First of all, are you sure the origin(center) of you're object is in the
middle of it? If not, when it rotaties it can rotate outside you're view.
Check it with just a small rotation (1 degree or something).
Another possible cause : I guess rotX is based on GLrotate. If you call that
function everything rotates so you have to reset after you've drawn the
object. Just rotate back or use some commands to call and push you're
viewpoint.

Just some guesses, using this stuff in C / Delphi looks quit different
because that ain't object orientated.

Greetings,
Rick


Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4248
by: Wiseguy | last post by:
I'm an opengl programmer who recently started playing with java3d and the scene graph methodology takes a bit to get used to. I'm wondering if there are any OTHER comprehensive tutorials for java3d besides the one on the sun.com site. It would be nice to find something that can be downloaded and browsed offline. tanks
1
6215
by: Andre Bonin | last post by:
Hello, I have an application that uses Java3D and I would like it to make webstart-enabled. Which tags (or how do i go about) stating the dependancy of the Java3D api within my application's JLNP file? Thank you for your time.
9
2160
by: MStepansky | last post by:
Whats the difference between Javascript and Java3D? I mean can Javascript do like Java3D can? Or is Java3D on top of Javascript (the core, if thats what it is)? Then I should learn Javascript BEFORE Java3D, right? no? Worse, whats the difference between Java and Javascript? Whats the difference between Visual Basic and Visual...
11
2754
by: Timothy Shih | last post by:
Hi, I am having a freezing issue with my application. My application serves several remotable objects, all of which must be initialized before their use. Furthermore, some of them depend on each other. On my application startup, I configure the objects usting the RemotingConfiguration class to load the config file. Then I "ping" each of the...
10
2389
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ComboBox.SelectedValue = db_value; If the db_value was not included in the ComboBox value list the ComboBox.SelectedIndex used to return -1, Now the very same code is
0
2470
by: Flex | last post by:
I have a canvas3d in Java3D, and I want to add some point. I try to to this. private void drawPoints() { PointArray pti = new PointArray(2,PointArray.COORDINATES); Shape3D shape = new Shape3D(); shape.removeAllGeometries(); BranchGroup ptiGroup = new BranchGroup(); pti.setCoordinate(0, new Point3d(3, 5, 23));
2
2070
awfulman
by: awfulman | last post by:
Hi, I am studying Java3D. I am not an experienced programmer and have no real programming education but I have some knowledge of graphics. I am familiar with POV-Ray that uses a kind of a programming language to render scenes too, in quite a similar way to Java3D, though not equal. I am really impressed by the opportunities that Java3d provides...
0
1072
by: Eyeinstyin | last post by:
There is some way to run java3d on webbrowser without j3d.I saw one example on net dont remeber the link but that ran a j3d applet on my webbrowser that didnot have j3d package installed.It actually loaded the jars on itz own.How do i do this.Load j3d jars from server and then webbrowser should use them to run j3d applet
2
2092
by: daschicken | last post by:
Hi guys, I'm not sure if theres anybody here with experience on this topic but ill give it a shot. Im lately facing some problems running several .jar files as Java WebStart jnlp. For this reason I tried to run a very basic .jar on my webspace which does well. But as soon as i try to usw .jar using the Java3D API, or just more complex it...
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.