This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > December 2004 > Is better than ...





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Is better than ...
ProgHettoLab

2004-12-02, 7:34 pm

Hi everybody,

I used this node decription:

DEF SPIRALE_2D Transform {
rotation -1 0 0 1.5707963267948966
children [
DEF PATCH Shape {
geometry IndexedLineSet {
coord DEF COORD Coordinate {
point []
}
coordIndex []
}
}
]
}

In the script node is it better write
temp = new SFVec3f(x, y, z);
COORD.point[i] = temp;
or write
temp = new SFVec3f(x, y, z);
PATCH.geometry.coord.point[i] = temp;

Thanks!
pMB

--
Pierluigi Maria Bovi Architetto
Yahoo! Messenger [proghettolab]
ICQ [272553328]

ProgHettoLab - Laboratorio per la Progettazione Integrata
Via Barletta 11, Foggia (Italy)
www.proghettolab.it
Cecile Muller

2004-12-02, 7:34 pm

> In the script node is it better write
> temp = new SFVec3f(x, y, z);
> COORD.point[i] = temp;
> or write
> temp = new SFVec3f(x, y, z);
> PATCH.geometry.coord.point[i] = temp;



Imho, the first one is better because that's a shorter path for
reading/writing the value: i mean, it searches directly the "point"
property of the "COORD" object rather than first searching the
"geometry" property, than its "coord", etc). But for the average
scripts, the difference is probably hardly noticeable anyway.
Braden McDaniel

2004-12-02, 7:34 pm

On Sat, 2004-11-27 at 18:43 +0000, ProgHettoLab wrote:
> Hi everybody,
>
> I used this node decription:
>
> DEF SPIRALE_2D Transform {
> rotation -1 0 0 1.5707963267948966
> children [
> DEF PATCH Shape {
> geometry IndexedLineSet {
> coord DEF COORD Coordinate {
> point []
> }
> coordIndex []
> }
> }
> ]
> }
>
> In the script node is it better write
> temp = new SFVec3f(x, y, z);
> COORD.point[i] = temp;
> or write
> temp = new SFVec3f(x, y, z);
> PATCH.geometry.coord.point[i] = temp;


Theoretically the former should execute faster; but probably not by any
perceptible amount. I think it doesn't really matter.

--
Braden McDaniel e-mail: <braden@endoframe.com>
<http://endoframe.com> Jabber: <braden@jabber.org>

Joerg Scheurich aka MUFTI

2004-12-03, 4:17 am

> In the script node is it better write
> temp = new SFVec3f(x, y, z);
> COORD.point[i] = temp;
> or write
> temp = new SFVec3f(x, y, z);
> PATCH.geometry.coord.point[i] = temp;


Some (unlikely for the "big 3") VRML browsers do not support the
access through the scenegraph structure as in the later example.

so long
MUFTI
--
Klicken Sie diese Akte an, dann klappen sie OK zusammen.
(aus einem Software-Handbuch)
Joerg Scheurich aka MUFTI

2004-12-06, 4:30 am

> In the script node is it better write
> temp = new SFVec3f(x, y, z);
> COORD.point[i] = temp;
> or write
> temp = new SFVec3f(x, y, z);
> PATCH.geometry.coord.point[i] = temp;


Some (unlikely for the "big 3") VRML browsers do not support the
access through the scenegraph structure as in the later example.

so long
MUFTI
--
Klicken Sie diese Akte an, dann klappen sie OK zusammen.
(aus einem Software-Handbuch)
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews