This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > July 2007 > Show geometry @position with a 3D rotation





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 Show geometry @position with a 3D rotation
Markus

2007-07-19, 6:19 pm

Hi NG,

I hope you can help me out. I am trying to display a bunch of cones at
certain position with a 3D rotation. So I have for each object XYZ
position and rotations around X Y and Z.
How can I do that easily, the code below seems to igonore my roatation
values.

Thanks for any help.

Markus

PROTO objekt2 [

exposedField SFVec3f trans 0 0 0

exposedField SFRotation rotx 1 0 0 0

exposedField SFRotation roty 0 1 0 0

exposedField SFRotation rotz 0 0 1 0


exposedField SFColor color .8 .8 .8

exposedField MFString tex [ ]

exposedField SFNode geom Sphere {}
]

{

Transform {

children [

Shape {

appearance Appearance {

material Material {

diffuseColor IS color
}

texture ImageTexture {

url IS tex
}
}

#geometry Cylinder {radius 5

# height 50}


geometry Cone {bottomRadius 20

height 100}

}
]

translation IS trans

rotation IS rotx

rotation IS roty

rotation IS rotz
}
}#
Ende PROTO objekt


Group {
children [
Transform {
#translation 0 0 0

children [




objekt2 { trans 1552.71058114049 1488.00607523496 -592.966082654426
rotx 1 0 0 1.36855952888136
roty 0 1 1 -0.545917788189337
rotz 0 0 1 1.46183523981071
}

objekt2 { trans 1552.71056708651 1488.00459369704 -592.969891722573
rotx 1 0 0 1.36856133425918
roty 0 1 0 -0.545933032019532
rotz 0 0 1 1.46183494665319
}


......

Markus

2007-07-21, 6:16 pm

On 19 Jul., 13:27, Markus <stein...@XXXXXXXXXX> wrote:
> Hi NG,
>
> I hope you can help me out. I am trying to display a bunch of cones at
> certain position with a 3D rotation. So I have for each object XYZ
> position and rotations around X Y and Z.
> How can I do that easily, the code below seems to igonore my roatation
> values.
>
> Thanks for any help.
>
> Markus
>
> PROTO objekt2 [
>
> exposedField SFVec3f trans 0 0 0
>
> exposedField SFRotation rotx 1 0 0 0
>
> exposedField SFRotation roty 0 1 0 0
>
> exposedField SFRotation rotz 0 0 1 0
>
> exposedField SFColor color .8 .8 .8
>
> exposedField MFString tex [ ]
>
> exposedField SFNode geom Sphere {}
> ]
>
> {
>
> Transform {
>
> children [
>
> Shape {
>
> appearance Appearance {
>
> material Material {
>
> diffuseColor IS color
> }
>
> texture ImageTexture {
>
> url IS tex
> }
> }
>
> #geometry Cylinder {radius 5
>
> # height 50}
>
> geometry Cone {bottomRadius 20
>
> height 100}
>
> }
> ]
>
> translation IS trans
>
> rotation IS rotx
>
> rotation IS roty
>
> rotation IS rotz
> }
> }#
> Ende PROTO objekt
>
> Group {
> children [
> Transform {
> #translation 0 0 0
>
> children [
>
> objekt2 { trans 1552.71058114049 1488.00607523496 -592.966082654426
> rotx 1 0 0 1.36855952888136
> roty 0 1 1 -0.545917788189337
> rotz 0 0 1 1.46183523981071
>
> }
>
> objekt2 { trans 1552.71056708651 1488.00459369704 -592.969891722573
> rotx 1 0 0 1.36856133425918
> roty 0 1 0 -0.545933032019532
> rotz 0 0 1 1.46183494665319
>
> }
>
> .....


sorry for the doubled posting, please ignore....

Sponsored Links


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