How can i get transform matrices?

Hi, i have a question.

I read this already.

Does panda has the DirectX style function such as GetTransform(D3DTS_VIEW) and GetTransform(D3DTS_PROJECTION)?

Thanks in advance.

Hm, what are those functions supposed to do different than the functions in the link you provided?

Can i think that get_projection_mat() is equal to GetTransform(D3DTS_PROJECTION) and is equal to GetTransform(D3DTS_VIEW)?

I think so.

(From the Panda3D source code:)


So obviously, Panda’s projection mat is D3DTS_PROJECTION. is described as “Returns the net transform on this node from the root.”
I don’t know what is the ‘net transform’.

Anyway, I think, isn’t equal to GetTransform(D3DTS_VIEW).
As I know on, view matrix is consist of translation matrix and rotation matrix.
Translation matrix has bottom row represent negative camera pos.

When camera stay on (100,100,100), “” returns matrix that has bottom row (100,100,100)

The ‘net transform’ is the transform composed all the way from the root of the scene graph. So you could call it the ‘matrix of the absolute transform of the camera’.

I don’t know exactly what D3DTS_VIEW is supposed to be - do you have a clear description of it somewhere, or so?

Note that is equivalent to, which is to say, the transform of as viewed from render.

If you’re looking for the inverse of this transform, you can either use, or the equivalent render.getTransform(

At this point, though, it might be worth taking a step back and asking your larger intentions. Panda provides many functions which generally make it unnecessary to query transforms directly like this, and it may well be that whatever you are trying to achieve can be done more simply with Panda’s existing higher-level interfaces.