ParallelGraphics Forums
Cortona VRML Client
You are here: [Forums]::[Browsers]::[Cortona VRML Client]

Registration 
Registration
Forgot your password?

Help 
Help
Support

Quick search 

Subscribe to newsletters 

Install Cortona VRML Client for FREE!
Outline 3D
3D Page Of the Week
email:  password:
   Browsers - Cortona VRML Client

Subject: Re: fixed / rotating origin
Sender: zlonka@gmail.com 15.06.09 20:49

Hello,
The idea was good, you now just have to add a rotation to the my_pnl sub element : following code modifies yours to draw the rotating 3d axis as you want.
Regards,
m a r c o

DEF PROXSENSOR ProximitySensor {size 1e8 1e8 1e8}
DEF my_tra Transform {
    children [
    DEF my_pnl Transform {
        translation 0 -1 -6.2
        children [
            DEF xaxis Shape {
                appearance Appearance {
                material Material {
                diffuseColor    1 0 0
                }
                }
                 geometry Box {
                 size 1.0 0.02 0.02
                 }
             }
            DEF yaxis Shape {
                appearance Appearance {
                material Material {
                diffuseColor    0 1 0
                }
                }
                 geometry Box {
                 size 0.02 1.0 0.02
                 }
             }
            DEF zaxis Shape {
                appearance Appearance {
                material Material {
                diffuseColor    0 0 1
                }
                }
                 geometry Box {
                 size 0.02 0.02 1.0
                 }
             }
         ]
    }
    ]
}
ROUTE PROXSENSOR.position_changed TO my_tra.translation
ROUTE PROXSENSOR.orientation_changed TO my_tra.rotation
ROUTE PROXSENSOR.orientation_changed TO my_pnl.rotation
Hello All,
I am trying to display a geometry (a xyz coordinate in my case) that would sit in a corner of the screen area, but that would rotate with the scene ... the same as the reference coordinate in some CAD software.

I have managed to make a fixed "user panel" using the following code, but I cannot make it rotate and stay at the same place:

#VRML V2.0 utf8
DEF PROXSENSOR ProximitySensor {size 1e8 1e8 1e8}
DEF my_tra Transform {
    children [
    DEF my_pnl Transform {
    translation 0 -1 -6.2
     children [
        DEF my_geo Shape {
         geometry Box {
         size 0.2 0.5 0.1
         }
     }
     ]
    }
    ]
}
ROUTE PROXSENSOR.position_changed TO my_tra.translation
ROUTE PROXSENSOR.orientation_changed TO my_tra.rotation

If anyone has a idea/solution, i'd appreciate.

thkx


 


fixed / rotating origin / dan.vera@gmail.com / 4.06.09 16:25
     Re: fixed / rotating origin / zlonka@gmail.com / 15.06.09 20:49
         Re: fixed / rotating origin / dan.vera@gmail.com / 18.06.09 02:32

Messages in thread: 3


© 1998-2009 ParallelGraphics. All rights reserved. Terms of use.