Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Setting and getting the Z axis of a sphere

$
0
0

@liamtmlacey wrote:

Using the quaternionArcBallExample project as a starting point, I am attempting to implement a way of allowing mouse drags to manipulate the Z axis of a sphere (but rotating the sphere object directly).

I was hoping it would be as simple as the following:

  1. Using a mouse drag up/down, rotate the sphere around the x axis 90 degrees so that you’re viewing the top of the sphere
  2. Using a mouse drag left/right, rotate the sphere around the y axis 90 degrees so that you’re viewing the side of the sphere.

In my mind I have now created a Z axis rotation compared to the original rotation of the sphere, however I’m assuming I have a fundamental misunderstanding of 3D graphics as calling getRollDeg() doesn’t give me the angle I was expecting.

Is there any way of setting and/or getting the z axis rotation value using the above interaction?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles