Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (707)
Games in Android Showcase (208)
games submitted by our members
Games in WIP (781)
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]
1  Java Game APIs & Engines / Java 3D / Re: Location of generic J3D tree walker on: 2005-08-05 17:37:49
awesome, i have been looking for something along these lines for a while. doing it myself was a bit of a headache.
2  Java Game APIs & Engines / Java 3D / Re: VRML and Capability bits on: 2005-08-03 16:25:57
A generic tree traverser would be a godsend. I'm a little curious why this sort of functionality doesn't exist in the form of a helper class or even on the loader itself. I'm running into similar capability bits (which I can only assume were devised to make life that much more irritating) with picking. It very well could be my complete misunderstanding of the nature of capability bits.
3  Java Game APIs & Engines / Java 3D / VRML and Capability bits on: 2005-07-29 21:50:21
So I'm using XJ3D to load my vrmls into my project. Allegedly the VRML97Loader can mass set capability bits, but  any actual confirmation to this is dodgy at best.,  using loader.setCapabilityRequiredMap(Map, Map). Even tracking down an example of this was futile. The code I used to initialize the loader is

     VRML97Loader loader = new VRML97Loader();
    Map<Integer,Integer> capabilityBits = new LinkedHashMap<Integer,Integer>();
    Map<Integer,Integer> freqBits = new LinkedHashMap<Integer,Integer>();
    loader.setCapabilityRequiredMap(capabilityBits, freqBits);

My problem is thus, I'm trying to add an object to a light's scope list to essentially highlight the object. The Light.addScope(Group) function only takes adds the Group and not its children. So I wrote a little hack to traverse the sub-graph and add all of the group nodes. 

   private void Scope(Light light, Group group)
      Enumeration children = group.getAllChildren();
         Object o = (Object)children.nextElement();
         if(o instanceof Group)
         Scope(light, (Group)o);

Then I ran into my capability bit problem. It seems that while I can set the BranchGroup containing the loaded VRML model's bits, the loader's setCapabilityRequiredMap function, does not work as anticipated. I get the following expection: Group: no capability to read children

I tried to manually traverse the sub-graph of the loaded VRML with a similar hack as above

   private void setCapability(Group group)
      Enumeration e = group.getAllChildren();
         Object o = (Object)e.nextElement();
         if(o instanceof Group)

Not to keep you all in suspense, but it didn't work. So I'm curious if anyone has any suggestions as to what i have done wrong, or even a different approach to solving my problem. Any help would be greatly appreciate, thanks in advance.
4  Java Game APIs & Engines / Java 3D / Java3d, VRML and Picking on: 2004-11-30 12:15:50
Hey all

I'm about ready to pull my hair out over this one. I have a BranchGroup containing a TransformGroup containing a second BranchGroup holding a VRML file loaded with the XJ3D loader. Currently I am trying to implement a picking system such that when I click on an entity onscreen I can display some information stored in the entity's top level (the one above the TransformGroup) BranchGroup UserData. Currently it blows up on me with null pointer exceptions.

I I have made sure that when the VRML is loaded I recursively go through the file and enable picking on all of the objects. The problem that I am currently facing is getting from the portion of geometry that I click on to the top level of the entity structure.

Any suggestions would be greatly appreciated.
Pages: [1]
Galdo (457 views)
2017-01-12 13:44:09

Archive (612 views)
2017-01-02 05:31:41

0AndrewShepherd0 (1083 views)
2016-12-16 03:58:39

0AndrewShepherd0 (1007 views)
2016-12-15 21:50:57

Lunch (1138 views)
2016-12-06 16:01:40

ral0r2 (1372 views)
2016-11-23 16:08:26

ClaasJG (1467 views)
2016-11-10 17:36:32

CoffeeChemist (1445 views)
2016-11-05 00:46:53

jay4842 (1526 views)
2016-11-01 19:04:52

theagentd (1255 views)
2016-10-24 17:51:53
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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‑
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!