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

Wanted: simple example/explanation of setOrientation

$
0
0

@bob97086 wrote:

Let’s say I want a directional light illuminating a scene from a certain position. Define an ofLight object, apply the setDirectional() method and define the light source’s position using the setOrientation(const ofQuaternion &q) from the super class ofNode.

I would deeply appreciate an example of quaternion usage to specify the direction of the light source. There are several different constructors in ofQuaternion.h which show alternative formats for building one. One example might be a source coming from a direction defined by a 45-deg rotation around the z-axis (from x-axis towards y-axis) followed by a 45-deg rotation out of the x-y plane towards the z-axis. How would the arguments to setOrientation() look?

Thanks for thoughts brief or deep!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Latest Images

Trending Articles



Latest Images