Bad link in reference - Point3

Just warning, the point3 link in the Classes section of the Reference is pointing to LPoint3f instead of Point3

That is actually correct, LPoint3f is the actual name for a floating three-dimensional point. There is also LPoint3d for double-precision. I believe interrogate, however, translates them to Point3 and Point3D in python.
…since the API reference is directly generated from the Panda3D source, it contains some stuff that uses panda’s C++ naming conventions.

Actually, come to that (and if I may be excused for a hopefully minor derailment), why are there separate structures for points and vectors? Why not treat them as being the same?

A point can be thought of, after all, as a vector from the origin to that point, and as I recall all functions that are applicable to vectors are similarly applicable to points, if perhaps with different interpretations.

There are some semantic differences between a point and a vector. For instance, Point3 * Mat4 is a different computation than Vec3 * Mat4. Also, there are computations like Point + Vec -> Point, or Point - Point -> Vec, which help in the semantic differentiation.

For reasons like this, we thought it helpful to differentiate points and vectors, when we designed Panda’s math library. The idea was to clarify these distinct concepts into distinct objects, and help isolate the purpose of each object.

In practice, since most other math libraries don’t make this distinction, people who are used to using other libraries tend to be confused by Panda’s distinction, so the net result may be more confusion than clarification. Lessons learned.


Fair enough - that makes sense, and thank you for the explanation. :slight_smile: