Inline VRML problem. 
Author Message
 Inline VRML problem.

I was wondering if anybody could possibly help  with a little vrml Coding
problem I have.

Is there any way to scale an inline VRML file?

I have written a template which requires the inline models to be a specific
size. The problem is they are coming from a variety of sources and I cannot
guarantee that they will be the correct size.

So, is there a way that I can scale the inline VRML at load time to fit into
the allotted space in my template?

Cheers,  Dave

Dave Lochhead.
3D Design.
Inner Workings Ltd.



Sat, 21 Jul 2001 03:00:00 GMT  
 Inline VRML problem.

Quote:

> I was wondering if anybody could possibly help  with a little VRML Coding
> problem I have.

> Is there any way to scale an inline VRML file?

> I have written a template which requires the inline models to be a specific
> size. The problem is they are coming from a variety of sources and I cannot
> guarantee that they will be the correct size.

> So, is there a way that I can scale the inline VRML at load time to fit into
> the allotted space in my template?

Of course:

Transform {
  scale 0.2 0.3 0.2
  children [
    Inline {
      url "foo.wrl"
    }
  ]

Quote:
}

--
Bob & Kelly Crispen

A polar bear is just a rectangular bear in a different coordinate system.


Sat, 21 Jul 2001 03:00:00 GMT  
 Inline VRML problem.

Quote:

> I was wondering if anybody could possibly help  with a little VRML Coding
> problem I have.

> Is there any way to scale an inline VRML file?

> I have written a template which requires the inline models to be a specific
> size. The problem is they are coming from a variety of sources and I cannot
> guarantee that they will be the correct size.

> So, is there a way that I can scale the inline VRML at load time to fit into
> the allotted space in my template?

> Cheers,  Dave

> Dave Lochhead.
> 3D Design.
> Inner Workings Ltd.

  Dave,

All scales are relative.  If you know the size of the incoming, then you can
custom scale it.  There is not a feature that allows you to say "make this
inline object size X Y Z".


        Information Visualization Specialist & VRML Educator
        Daly Realism - Internet Solutions (http://www.realism.com)

LA VR User's Group (Treasurer):                  http://vrml.lavug.org/worlds

  vcard.vcf
< 1K Download


Sat, 21 Jul 2001 03:00:00 GMT  
 Inline VRML problem.
Your real problem is not scaling the inlined world but determining the size
of it.

Only automated way I know to do that is to "walk" the world-graph for the
inlined world - you'll have to compute the locations child node inside every
Transform node, in absolute (center of the world) coordinates.

Think "recursion."   Consider Java for this; or get a freeware tool (I saw
one here yesterday that sounded about right, sort of).  Consider using the
ECMAScript Browser object functions to get a string version of the inlined
world (if that's possible with an inlined file - I haven't tried it), then
parsing this to get the Node tags and read the data from their fields into a
data "tree" - then recurse this to compute the locations of the Nodes, then
compute the true limits of the world and modify the fields in the Transform
that encloses the inlined world.  Presto, done.

This is not simple - it's about as complicated as the front end of a VRML
compiler, and more difficult that writing a VRML lint-style syntax checking
program.

Personally, I'd find a pre-written freeware program to do it, or pay someone
(if you're making money off this program yourself), or simply require the
submitters to do it right "or else."  But you know your business, and this
is the way I'd attempt it if I had too (after checking Java for some
simplifying stream-processing options that it has, such as the "tokenizer").

Actually, a bunch of people have posted questions lately about how to do
this - you seem to be catching a wave here, and that's good!  (Consider
backtracking a month's worth of posts, if you get stuck, and contacting them
too.)

Good luck!

Bob Greer


Quote:
>I was wondering if anybody could possibly help  with a little VRML Coding
>problem I have.

>Is there any way to scale an inline VRML file?

>I have written a template which requires the inline models to be a specific
>size. The problem is they are coming from a variety of sources and I cannot
>guarantee that they will be the correct size.

>So, is there a way that I can scale the inline VRML at load time to fit
into
>the allotted space in my template?

>Cheers,  Dave

>Dave Lochhead.
>3D Design.
>Inner Workings Ltd.



Sun, 22 Jul 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. FreeTDS vs Inline TDS: Problem with Inline TDS

2. FreeTDS vs Inline TDS: Problem with Inline TDS

3. VRML EAI problems: Java3d solves many portabilty problems of VRML

4. IE6 +VRML + javascript in VRML trouble (was: problem using javascript window.open in VRML)

5. Inline node and gzip compressed vrml files?

6. why my vrml export plugin loose all inlines

7. inlines in vrml-on-the-fly??

8. Vrml on the fly as inline?

9. inline vrml?

10. gziping vrml worlds and their inline objects.

11. un-USE an un-inLine VRML world

12. Inline in VRML 2.0

 

 
Powered by phpBB® Forum Software