Mike Goldwater wrote: > Try Text2D. Not properly documented but features in the Java3d tutorial > and in the examples. I believe it is implemented as a texture on a > rectangle but that might be nonsense.
Yes, I've seen this, but there are a couple of reasons why we can't use it within our current environment. The most important one is that it extends Shape3D. In Xj3D, the VRML scene graph maps very closely to the J3D scene graph objects. The VRML Text node is considered a Geometry item equivalent to the core Text3D class. Inside Xj3D, we treat it the same way - it extends our VRMLGeometryNodeType interface and, within the java3D renderer, it makes available instances of GeometryArray instances to the parent node. What we then do is add it to a Shape3D instance and then move on to doing the texturing stuff separately. We may, unfortunately, need to do some workarounds with this because nowhwere else in the system do we need textures generated from the geometry object. The second issue that we have is the way that VRML defines text information. A single VRML Text node can have multiple strings, effectively multi-line text. The Text2D only takes a single string, and we can't provide it our own AWT Font instance, which is critical because of the way VRML defines font information (VRML works in font families, not individual font names). Also, VRML uses a lot of alignment information which Text2D doesn't handle. We have left-to-right and top-to-bottom flags allowing the rendering of multi-lingual fonts as well as doing funky stuff with latin text. All of these add up to a situation where we need to do things our own way and can't use the util classes. Hmm... maybe if I get this sorted right, might be something useful to add to j3d.org too..... -- 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".
