This is heading, pitch, roll, in degrees, as more-or-less described here:
If you want a Vec3, then maybe you want to be dealing with Quaternions, instead of Euler (HPR) angles. A quaternion is basically an axis of rotation, plus an angle of rotation. You can call quat.getAxis() and quat.getAngle() to get these two components separately. There are lots of math resources on the net to help you understand quaternions.
There are also a number of methods to convert back and forth between HPR, Quaternion, and Mat3 (or Mat4), all of which represent rotations in different ways. For instance, Quat.setHpr() or Quat.getHpr() will convert from HPR to Quaternion and vice-versa, respectively. There’s also composeMatrix() to construct a Mat3 or Mat4 given a HPR (and other components such as scale and shear), and decomposeMatrix() to go back the other way. Furthermore, if you’re dealing with NodePaths you probably don’t need to convert these rotations at all, since any of these rotation forms can be extracted directly from a NodePath (which automatically converts from whatever you give it to whatever you ask for).
Maybe by Vec3, you mean the orientation of a Y axis after the rotation has been applied–that is, the direction you will be looking in when you apply the specified rotation. I’ll call this a Vec3 “direction”. Note that this is not a complete description of a rotation, since it doesn’t account for the twist around that vector. This is also not the same vector returned by the quat.getAxis()–that returns the axis about which a rotation is performed, not the direction of the final rotation. There are a few cases when this kind of Vec3 direction is useful, but frankly, it doesn’t come up often.
If you want to compute this kind of Vec3 direction, though, you can do it by applying the specified rotation to the Y axis: Vec3(0, 1, 0). It’s possible to do this using either Mat3 or Quat representations of the rotation, but you can’t compose HPR rotations directly. So, to compute this Vec3 via a Quat:
q1 = Quat()
myDirection = q1.xform(Vec3(0, 1, 0))
Or, to compute it via a Mat3:
m = Mat3()
composeMatrix(m, VBase3(1, 1, 1), VBase3(0, 0, 0), myHpr)
myDirection = m.xform(Vec3(0, 1, 0))
These examples, of course, assume that you are starting from a HPR. If you already have your rotation in Quat or Mat3 form, you can just use the xform call directly.
Note that HPR isn’t a particularly useful representation to perform computations with. It’s provided because it’s so easy to understand and visualize by a human; it’s easy to make up or read a heading, pitch, roll number and know roughly what rotation is described. Not so with quaternions or matrices, which are often just mysterious bunches of numbers internally. So usually HPR is used for those rotations that are directly entered or read by a human, and quaternions or matrices are used for performing the actual computations.
Finally, there are methods on NodePath to perform some common tasks conveniently. For instance, NodePath.lookAt() will calculate the rotation necessary to point a node’s Y axis towards some specified point in space (this is the inverse of the aforementioned HPR-to-direction question: given a Vec3 direction, what is the corresponding HPR rotation?). NodePath.getRelativeVector() will retrieve the Vec3 that corresponds to some vector as seen from another point of view. It follows, then, that you could also use code like this to convert HPR to a Vec3 direction:
v = node.getParent().getRelativeVector(node, Vec3(0, 1, 0))
Which is to say, rotate the node by the specified HPR, then compute the angle of the node’s Y axis from the point of view of the node’s parent. Of course, it would make sense to use a NodePath to do this only if you are already dealing with nodes in the scene graph; which maybe you are.