Near and Far

How I make to get the values (x, y, z) of near and to far of a perspective projection and the matrix that this being used in the projection.

Thank You…

I’ll make a stab at guessing what you are asking for.

base.camLens.getNear() and base.camLens.getFar() return the current values of the near and far planes–distances from the viewpoint.

base.camLens.project() returns the (x, y) point on the film that corresponds to a (x, y, z) point in front of the lens.

base.camLens.extrude() reverses this operation, returning the line segment (x1, y1, z1) - (x2, y2, z2) that corresponds to an (x, y) point on the film. One of these returned points is on the near plane; the other is on the far plane. The complete set of points that correspond to the (x, y) point on the film is all of the points between these two. Note that an infinite number of points in space correspond to a single point on the film, by the nature of perspective projection.

base.camLens.getProjectionMat() returns the 4x4 matrix that defines the projection.

See the generated API docs for more interfaces available on the Lens class.