Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  IndexedGeometryStripArray subclasses  (Read 1096 times)
0 Members and 1 Guest are viewing this topic.
Offline zparticle

Senior Member




Thick As A Brick


« Posted 2003-04-08 14:28:40 »

Can someone please explain the point of the following classes in the Java3D scene graph?

IndexedLineStripArray
IndexedTriangleStripArray
IndexedTriangleFanArray

Why would you use these? How would you use these? Reading the API specification isn't helping me understand these two questions.

Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #1 - Posted 2003-04-08 14:43:51 »

I'm guessing the same way you'd use them in GL.


...


RELAX! I wasn't really going to leave you with that.  Grin I'm not really up to speed on Java3D, but I'm assuming that these are collections of points that descrbe a set of lines, or triangles. For example, if I was drawing a cube, I could start with one vertex and keep drawing lines until I completed the cube. This way I'd only describe each vertex once instead of 6 QUAD polygons or 12 triangle polygons. Of course, why you'd use these directly in a scenegraph that handles most of it for you, is beyond me. They're probably there for the SceneGraph's use and where made public in case you wanted to create your own object types.

Does that help?

Java Game Console Project
Last Journal Entry: 12/17/04
Offline zparticle

Senior Member




Thick As A Brick


« Reply #2 - Posted 2003-04-08 16:05:47 »

Well I understand the XXXStripArray classes it's the indexed ones I don't get. There seems to be a level of indirection in these and I can't figure out what it's for.

With the indexed classes you can send a array of indexes along with the vertex data to the constructors. I guess so you can say I want the first vertext to really be the fifth vertex. So you get the value of the 0th element of the index array and this value is 4 meaning go get the 5th element in the vertex array.

This is totally freaking confusing and I can't figure out why anyone would want to use this.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #3 - Posted 2003-04-08 16:14:32 »

Resuse of vertices? An array of strips can have vertices used by several strips.

Additionally, colors and texture coords can be indexed seperately.

AFAIK, these classes are bad - performance wise - as long as the separate coord-color-texture indexing is used.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline zparticle

Senior Member




Thick As A Brick


« Reply #4 - Posted 2003-04-08 18:16:49 »

Alright then I'm going to leave these out of my scene graph code. Thanks.

Offline zparticle

Senior Member




Thick As A Brick


« Reply #5 - Posted 2003-04-09 14:00:42 »

Okay I think I know what these are for now. It is mainly for reusing the vertices and dealing with OpenGLs Vertex Array lists which can give you huge performance gains.

Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #6 - Posted 2003-04-09 14:59:13 »

As I said.

These Java3D guys are not stupid....   Cool

But the indexing stuff can lead to a complete rollout of the structures somewhere deep within J3D.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (12 views)
2014-04-15 18:08:23

BurntPizza (11 views)
2014-04-15 03:46:01

UprightPath (24 views)
2014-04-14 17:39:50

UprightPath (10 views)
2014-04-14 17:35:47

Porlus (27 views)
2014-04-14 15:48:38

tom_mai78101 (49 views)
2014-04-10 04:04:31

BurntPizza (108 views)
2014-04-08 23:06:04

tom_mai78101 (208 views)
2014-04-05 13:34:39

trollwarrior1 (176 views)
2014-04-04 12:06:45

CJLetsGame (182 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org 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‑gaming.org
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!