Michael Newcomb wrote: > Why don't they have getters and setters? a) Not everything in the world needs or should be JavaBeans (I really personally dislike the concept)
b) Performance reasons. In 3D graphics complete control over the system is required. In a normal application you have getters returning objects. This usually implies that the object that you are "get"ting from has to create new object instances every time. Each new object means a call to new. That's one performance hit. THe other is when that object is tossed away a couple if milliseconds later requiring the GC to kick in. A tactic that pretty much all realtime programmers use to avoid all these issues (it's the same whether you program in C/C++ or Java) is to pre-allocate *everything* that is needed before the application starts running. Once you have these, all the get() methods pass in the object that you want to be filled with data. Much faster and more efficient this way. As the vecmath classes form part of the core of Java3D, I'm glad they've designed it this way. -- Justin Couch http://www.vlc.com.au/~justin/ Java Architect & Bit Twiddler http://www.yumetech.com/ Author, Java 3D FAQ Maintainer http://www.j3d.org/ ------------------------------------------------------------------- "Humanism is dead. Animals think, feel; so do machines now. Neither man nor woman is the measure of all things. Every organism processes data according to its domain, its environment; you, with all your brains, would be useless in a mouse's universe..." - Greg Bear, Slant ------------------------------------------------------------------- =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
