[]
readme
course(s)
preface
I
1
2
II
3
4
III
5
6
7
IV
8
9
10
V
11
12
afterthought(s)
appendix
reference(s)
example(s)
resource(s)
_

*What is the problem ?*

- Position is a SFVec3f field
- OK for 'translation' field in 'Transform'
- Or 'position' field of a 'Viewpoint'
- Direction is a SFVec3f field
- Orientations are SFRotation in VRML !
- Need to construct a rotation

*Translating direction to rotation*

- Eh !?, This cannot be done !
- Fundementally something different !
- Need a 'defaultDirection' + 'rotation'
- Rotate 'defaultDirection' to 'direction'
- Now still infinite answers
- A notion what is 'up' needed

*More detailed*

Direction vectors and rotations are something

fundementally different.

The best we can do is calculate a rotation

that 'rotates' a predefined 'defaultDirection'

in such a way that it is the same as our

intended 'direction'.

*Why do we ned 'up' ?*

The notion of 'up' is needed because

there is one more degree of freedom to

tame, the 'ROLL' (U.S. Mill. term).

*Some Code*

// Rotation from 'def' to 'direction'rotA = new SFRotation(defDirection,direction);// Adjust 'up' vector, defUp = yAxisup = rotA.multVec(yAxis);// Fix orientation with respect to 'up'rotB = new SFRotation(direction.cross(up), direction.cross(yAxis));// Combine bothorientation = rotA.multiply(rotB);

*Let's wrap up...*

[]
readme
course(s)
preface
I
1
2
II
3
4
III
5
6
7
IV
8
9
10
V
11
12
afterthought(s)
appendix
reference(s)
example(s)
resource(s)
_

(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.