Question about the Lens class

the Lens class has a method call getNodalPoint(). Is there a reason there isnt a setNodalPoint()? Im trying to implement projective texturing through Cg and I’m not able to get the matrices right and I think this might be the key.

The nodal point is defined by the lens’s matrix. If you want to move the lens off of the origin, you should load in a different matrix with setViewMat(). But this is a very unusual thing to do; normally the lens should be left at the origin, to keep the normal behavior you expect cameras and lenses to have.

Projective texturing is implemented in native Panda without the use of shaders via the NodePath::projectTexture() interface (which in turn enables several other features). You can examine what that code is doing for examples of how the matrices ought to be set up. I can’t imagine that moving the lens away from the origin is necessary in order to achieve projective texturing in any context.