NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Big List of Questions about Java3D

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
Zachary1234



Joined: 08 Nov 2008
Posts: 178

PostPosted: Sun Apr 22, 2012 11:55 am    Post subject: Big List of Questions about Java3D Reply with quote

I have some questions about acheiving certain tasks in java3D.
I will be replying to this thread later with more details examples.
Is there anyone here who can spend time giving me some code example and related answers to these?


Last edited by Zachary1234 on Wed Apr 25, 2012 9:48 am; edited 2 times in total
Back to top
Rick Fincher
Posted via mailing list.





PostPosted: Mon Apr 23, 2012 3:41 am    Post subject: Big List of Questions about Java3D Reply with quote

Are you trying to decide whether or not to use Java 3D? From your
questions it looks like you haven't read any of the documentation and
don't understand the concept of scene graphs.

Everything in Java 3D is done with a database called a scene graph. You
add nodes and branches to a scene graph that define points, lines,
polygons, text, and surfaces. With a surface you have to define a
vector that tells Java 3D which way is the "outside" of the surface so
that it can tell if the observer can see it or not.

Java 3D handles all the clipping and hidden line and hidden surface removal.

Java 3D relies on an external library to quickly draw the primitives.
Open GL, JOGL, and Direct 3D are used depending on which OS you are using.

You can set the colors, line thicknesses, and transparency of each
branch. You can also map images onto surfaces, as well as define the
surface texture and reflectivity (shiny or matte) models.

You can translate, rotate, scale, etc. each branch independently. If
you have a car as a branch of your scene graph, for example, you can
create a "tire" branch, make 4 copies of it, add them to the "car"
branch then translate and rotate the tires to put them in the 4
locations needed. Then you can start the tire branches rotating at
whatever speed you like .

Then you can move the the car branch to make the car move around with
the wheels rotating.

There is also a collision detection mechanism so you can tell if two
objects occupy the same space at the same time. That's used a lot for
gaming.

Rick


On 4/22/2012 7:55 AM, Zachary1234 wrote:
Quote:
I have a giant list of questions 20 or so long about
acheiving certain tasks in java3D. They are pretty organised,
each with a view of acheiving a task built on the more generic
approach used in the previous ones. Is there anyone
here who can spend time giving me some code example and related
answers to these?

https://forums.oracle.com/forums/thread.jspa?messageID=10289066&#10289066[/url]




#1 -How may I plot a point on (in) a 2D plane or shape (a lamina)? How may I plot a line or a line segment on, through, or ending on
a 2D plane?

#2 -How may I connect the end points of line segments to construct a flat polygon or shape in 2D?

#3 -How may I connect the ends of line segments in 3D (through XYZ) for a more complex shape, or even a solid?

#4 -How may I define a "gap", ie a hole in a 2D shape, as an integral part of my lamina at rendering (runtime)?

#5 -How may I specify opacity or transparency for a surface (or just the texture) on a 2D or 3D shape ?

#6 -Do all points, lines, surfaces, solids etc. have the option to activate "clipping"?
Is there just one method or field call to activate this? How is this done?

#7 I there any way to "bisect" 3D/2D/1D items so that one may manipulate the seperate pieces produced this way?
Any way to "delete" these dynamically derived pieces?

#8 -Do lines, surfaces, 3D solids have the option to "stretch" (be distended in a direction from an anchor point along some line path)?
May they be twisted also? How are these acheived?

#9 -During runtime, how may I have a dot point, visible and moving along a path (a visible or invisible straight line, with stop points)?

#10 - How may I implement curved corners on such a movement path?

#11 -How may I make this path a circle, oval, or any other completed shape, into a "circuit" path?

#12 -How may I have the prevoius situation of a 3D object move along a path or circuit in XYZ, by a nominated point in that
3D object?

#13 -Is there a supplied way to determine the tangent line at any point on a curve, complete circuit or path?

#14 -In the case or a curved 2D, "shaped" surface, how may I find the corresponding 2D flat surface tangential/normal to a point
on the former, curved surface?

#15 -During runtime, how may I have a visible line segment **of variable length, remain fixed at one end, yet move and change length per it's
other point end, along a circuit path? How do I extrapoliate a line in one direction fixed at one of its points?

#16 -During runtime, how may I have a visible line segment of fixed length,remain fixed at one end point, and pivot around that point
by radian angle? How do I extrapoliate a line in a specified direction fixed at one of its points?

#17 -During runtime, how may I have a visible 2D plane or shape (lamina) move along a circuit path (by a nominated point on the shape)?

#18 -How may I code a situation where points, but more particularly lines (2D or 3D edges ), vertices on 2D or 3D Objects, may be programed to touch
or connect to each other, in a generic way, at a nominated angle, to form a new object?
How may this be accomplished just on a touching basis, but additionally to create a new 3D object?

#19 - How may I alter vertices or edges on 2D or 3D solids to be more shamphered, curved?

#20 -How may I extrapolate 2D lines/curves/surfaces so far? OR so that they forms a prismatic solid? How may I do this around a point
either off centre or outside the 2D shaped, so that it may be rotated in a curved, circular fashion to create
a toroid? May this point distance be altered according to the eillipse formular to form a prismatic, elliptical toriod?

#21 -How to I use my mouse cursor, at runtime, "select" an object in my 3D universe? Are the various MouseX
classes the place to look for mouse related Events, their and their handling? What sup-package(es) are they in?
How do I add such a 3D event Listener to a particular 3D object?

What is the difference with the varioius pick[X] classes?

#22 -During runtime or code time, is there a way to "group select" points, lines surfaces, polygon shapes, 3D solids,
where they are or are seperate, together or touching objects,in a collective fashion, when intereacting with one's 3D Universe?
Particularly to specify things on the group at code time, or to manipulate the group via user input at runtime?

#23 What are the various 3D related new ActionEvents and their handler interfaces?
How do I add my custom, overridden handlers to my 3D objects? what are the subpackage names these Events, particularly their handlers,
are in? com.sun.j3d.utils.behaviors.* ? What is a wakeup, and how are they related to java3D events, if they are? It sounds like a
"behaviour" Event which gets activated secondarily as a consequence of something related happening or being done before it.

//***********************************************************************************************************
Not required:
[#24 -Is it possible to have multiple light sources at different (X,Y,Z) locations?

#25 -As an advanced question, does Java3D support any kind of client/server object system where there may be
multiple KeyNavigatorBehavior objects (or equivalent) whereby there may be multiple seperate runtime users
that may log in and out of the one Universe, and act as seperate, multiple users simultaneously?]
//***********************************************************************************************************
Back to top
Zachary1234



Joined: 08 Nov 2008
Posts: 178

PostPosted: Mon Apr 23, 2012 10:38 am    Post subject: Initial Correspondance questions. Reply with quote

I am hoping I can have a correspondance here, a place to reply with further questions to answers.

-How do I draw the outline of a 2D circle, placed, sized, tilted anywhere
in a 3D Universe? How may I fill that circle with two colors on either side?

-How May I construct a 2D plane from any 3 (x,y,z) points? How
may I determine if any further 3D points are in my plane?

-How may I define a line segment from two points, anywhere in a 3D universe? May I go setCollidable(true) on my line?

-May I fill a GeometryArray with consecutive 3D points to define a surface in (Ploygon) 3D? How do I tell my first point to meet my last point? Is this in fact the way to do this?
Back to top
Rick Fincher
Posted via mailing list.





PostPosted: Mon Apr 23, 2012 9:40 pm    Post subject: Big List of Questions about Java3D Reply with quote

This is a NetBeans forum, not Java 3D, so I'll email you directly.

Rick

On 4/23/2012 6:39 AM, Zachary1234 wrote:
Quote:
I am hoping I can have a correspondance here, a place to reply with further questions to answers.

-How do I draw the outline of a 2D circle, placed, sized, tilted anywhere
in a 3D Universe? How may I fill that circle with two colors on either side?

-How May I construct a 2D plane from any 3 (x,y,z) points? How
may I determine if any further 3D points are in my plane?

-How may I define a line segment from two points, anywhere in a 3D universe? May I go setCollidable(true) on my line?

-May I fill a GeometryArray with consecutive 3D points to define a surface in (Ploygon) 3D? How do I tell my first point to meet my last point? Is this in fact the way to do this?


Back to top
emiddio-frontier
Posted via mailing list.





PostPosted: Tue Apr 24, 2012 1:46 pm    Post subject: Big List of Questions about Java3D Reply with quote

i was interested in the answer also.

Gary
----- Original Message -----
From: "Rick Fincher" <address-removed>
To: <address-removed>
Sent: Monday, April 23, 2012 2:17 PM
Subject: [nbusers] Re: Big List of Questions about Java3D


This is a NetBeans forum, not Java 3D, so I'll email you directly.

Rick

On 4/23/2012 6:39 AM, Zachary1234 wrote:
Quote:
I am hoping I can have a correspondance here, a place to reply with
further questions to answers.

-How do I draw the outline of a 2D circle, placed, sized, tilted anywhere
in a 3D Universe? How may I fill that circle with two colors on either
side?

-How May I construct a 2D plane from any 3 (x,y,z) points? How
may I determine if any further 3D points are in my plane?

-How may I define a line segment from two points, anywhere in a 3D
universe? May I go setCollidable(true) on my line?

-May I fill a GeometryArray with consecutive 3D points to define a surface
in (Ploygon) 3D? How do I tell my first point to meet my last point? Is
this in fact the way to do this?


Back to top
Zachary1234



Joined: 08 Nov 2008
Posts: 178

PostPosted: Wed Apr 25, 2012 9:46 am    Post subject: Questions cutDown. Reply with quote

It's alright, most of the questions on this list won't be required.
It turns out that the java3D pdf tutorial collection freely available
via the internet is mostly enough. Many of these questions won't be required; I will be replying to this thread later. They can be removed, if anyone on this thread wants.
Back to top
Zachary1234



Joined: 08 Nov 2008
Posts: 178

PostPosted: Thu Apr 26, 2012 5:32 am    Post subject: My Java3D v1.5 questions. Reply with quote

Could someone please give responses with code specific answers?

#A I have a set of points, to be connected as lines, and to be formed into surfaces (limited planes) as defined by my IndexedQuadArray and IndexedTriangleArray.

#1 I don't understand how the function IndexedGeometryArray.setTextureCoordinateIndexes(int a,int b,int [] c);
works. What is the int value I would submit for the first parameter,
texCoordSet - texture coordinate set in this geometry array? Is it how to arrange the texture, {0,1,2,3} ?

#2 I understand how I may use the NormalGenerator class over an appropriate GemoetryArray to connect points as curved lines,curved triangles or curved squares depending on the array. One may alter the crease angle by a radian, however the crease will always be located centrally on the curve (curved line or triangle/square surface as generated).

Apart from introducing more curves in the same region
to define a net result differently, how does one alter the (relative) crease location? How else may one define and alter curved lines and generated surfaces existing between points inside a GeometryArray?

#3 How may I define a circle or an oval (flat, 2D) in a 3D space?

#4 When using a GeometryArray and NormalGenerator to generate my surfaces, how may I define hole regions on a surface which is not filled in at rendering, but does not effect the generated normalisation shape?

#5 Is there a way to obtain one object for a Triangular or Square surface generated inside a Geometry Array? What is the Generic class or Interface for this named? May one test if a particular (x,y,z) point lines
as a normal (on/in) this surface, either before normalisation or after it?

#6 When using IndexedGeometryArray (s), at run time there is a situation where non-visible regions of a 3D world objects aren't filled in or rendered as wireframe or points as a memory save. However,
the priority is "backwards" by default; . Without disabling culling entirely, is there a way to have the memory save of some non-filling or wireframe drawing happening by allowing rendering of the outward facing polygons only (not the behind faces), or even just the visible ones from the viewer perspective? Or does use PolygonAttributes to turn off culling entirely, and this optimisation in fact happens by default?

#7 How does one translate a point in the direction of another one, presumably by a 3D vector? How may this be done in the direction of the other point, one pixel at a time, and not the full distance between them (easy) ?

#8 When viewing against the background of a 3D Universe, is there any way to increase the outer pixel resolution of an object to acheive some antialiasing?

#9 How do I disable the default shadow of a 3D object via it's lightsource, to do high quality shadowing? I know that shadowing is typically done per pixel, point. A shadow is a linear cutoff of the projected lighting region. Need to know the line from the light source, get a vector,
and draw lines to points & objects behind. Suggestions?
Back to top
Glenn Holmer
Posted via mailing list.





PostPosted: Thu Apr 26, 2012 9:18 pm    Post subject: Big List of Questions about Java3D Reply with quote

On Thu, 2012-04-26 at 05:33 +0000, Zachary1234 wrote:
Quote:
Could someone please give responses with code specific answers?

This list is for questions about NetBeans.

--
____________________________________________________________
Glenn Holmer address-removed
Software Engineer phone: 414-908-1809
Weyco Group, Inc. fax: 414-908-1601
Back to top
Zachary1234



Joined: 08 Nov 2008
Posts: 178

PostPosted: Wed May 02, 2012 1:22 am    Post subject: java3D assistance. Reply with quote

Yes it is, however it is a forum for java related questions,
even if I havn't unfortunately found the correct area for that
(there doesn't seem to be a forum area labeled java SE,
or general java code questions, or even java3D).

Is there anyone out there who can address my questions raised?
Back to top
Matthias Bl
Posted via mailing list.





PostPosted: Wed May 02, 2012 8:47 pm    Post subject: Big List of Questions about Java3D Reply with quote

Hey,

Am Mittwoch, den 02.05.2012, 01:22 +0000 schrieb Zachary1234:
Quote:
Yes it is, however it is a forum for java related questions,
even if I havn't unfortunately found the correct area for that
(there doesn't seem to be a forum area labeled java SE,
or general java code questions, or even java3D).

http://lmgtfy.com/?q=forum+java3d

Greetings

Matthias
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo