|
| __init__ () |
|
| __init__ (float hfov, float vfov) |
|
Public Member Functions inherited from Lens |
| clear () |
| Resets all lens parameters to their initial default settings.
|
|
| clearCustomFilmMat () |
| Disables the lens custom_film_mat correction.
|
|
| clearKeystone () |
| Disables the lens keystone correction.
|
|
| clearViewMat () |
| Resets the lens transform to identity.
|
|
bool | extrude (const LPoint2 point2d, LPoint3 near_point, LPoint3 far_point) |
| Given a 2-d point in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner, compute the corresponding vector in space that maps to this point, if such a vector can be determined.
|
|
bool | extrude (const LPoint3 point2d, LPoint3 near_point, LPoint3 far_point) |
| Given a 2-d point in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner, compute the corresponding vector in space that maps to this point, if such a vector can be determined.
|
|
bool | extrudeDepth (const LPoint3 point2d, LPoint3 point3d) |
| Uses the depth component of the 3-d result from project() to compute the original point in 3-d space corresponding to a particular point on the lens.
|
|
bool | extrudeVec (const LPoint2 point2d, LVector3 vec3d) |
| Given a 2-d point in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner, compute the vector that corresponds to the view direction.
|
|
bool | extrudeVec (const LPoint3 point2d, LVector3 vec3d) |
| Given a 2-d point in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner, compute the vector that corresponds to the view direction.
|
|
float | getAspectRatio () |
| Returns the aspect ratio of the Lens.
|
|
str | getChangeEvent () |
| Returns the name of the event that will be generated whenever any properties of this particular Lens have changed.
|
|
float | getConvergenceDistance () |
| See set_convergence_distance().
|
|
CoordinateSystem | getCoordinateSystem () |
| Returns the coordinate system that all 3-d computations are performed within for this Lens.
|
|
const LMatrix4 | getCustomFilmMat () |
| Returns the custom_film_mat specified for the lens.
|
|
float | getFar () |
| Returns the position of the far plane (or cylinder, sphere, whatever).
|
|
const LMatrix4 | getFilmMat () |
| Returns the matrix that transforms from a point behind the lens to a point on the film.
|
|
const LMatrix4 | getFilmMatInv () |
| Returns the matrix that transforms from a point on the film to a point behind the lens.
|
|
const LVector2 | getFilmOffset () |
| Returns the horizontal and vertical offset amounts of this Lens.
|
|
const LVecBase2 | getFilmSize () |
| Returns the horizontal and vertical film size of the virtual film.
|
|
float | getFocalLength () |
| Returns the focal length of the lens.
|
|
const LVecBase2 | getFov () |
| Returns the horizontal and vertical film size of the virtual film.
|
|
float | getHfov () |
| Returns the horizontal component of fov only.
|
|
float | getInterocularDistance () |
| See set_interocular_distance().
|
|
const LVecBase2 | getKeystone () |
| Returns the keystone correction specified for the lens.
|
|
UpdateSeq | getLastChange () |
| Returns the UpdateSeq that is incremented whenever the lens properties are changed.
|
|
const LMatrix4 | getLensMat () |
| Returns the matrix that transforms from a point in front of the lens to a point in space.
|
|
const LMatrix4 | getLensMatInv () |
| Returns the matrix that transforms from a point in space to a point in front of the lens.
|
|
float | getMinFov () |
| Returns the field of view of the narrowest dimension of the window.
|
|
float | getNear () |
| Returns the position of the near plane (or cylinder, sphere, whatever).
|
|
LPoint3 | getNodalPoint () |
| Returns the center point of the lens: the point from which the lens is viewing.
|
|
const LMatrix4 | getProjectionMat (Lens::StereoChannel channel) |
| Returns the complete transformation matrix from a 3-d point in space to a point on the film, if such a matrix exists, or the identity matrix if the lens is nonlinear.
|
|
const LMatrix4 | getProjectionMatInv (Lens::StereoChannel channel) |
| Returns the matrix that transforms from a 2-d point on the film to a 3-d vector in space, if such a matrix exists.
|
|
const LVector3 | getUpVector () |
| Returns the axis perpendicular to the camera's view vector that indicates the "up" direction.
|
|
float | getVfov () |
| Returns the vertical component of fov only.
|
|
const LVecBase3 | getViewHpr () |
| Returns the direction in which the lens is facing.
|
|
const LMatrix4 | getViewMat () |
| Returns the direction in which the lens is facing.
|
|
const LVector3 | getViewVector () |
| Returns the axis along which the lens is facing.
|
|
bool | isLinear () |
| Returns true if the lens represents a linear projection (e.g.
|
|
bool | isOrthographic () |
| Returns true if the lens represents a orthographic projection (i.e.
|
|
bool | isPerspective () |
| Returns true if the lens represents a perspective projection (i.e.
|
|
BoundingVolume | makeBounds () |
| Allocates and returns a new BoundingVolume that encloses the frustum used for this kind of lens, if possible.
|
|
Lens | makeCopy () |
|
Geom | makeGeometry () |
| Allocates and returns a new Geom that can be rendered to show a visible representation of the frustum used for this kind of lens, if it makes sense to do so.
|
|
| output (Ostream out) |
|
bool | project (const LPoint3 point3d, LPoint2 point2d) |
| Given a 3-d point in space, determine the 2-d point this maps to, in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner.
|
|
bool | project (const LPoint3 point3d, LPoint3 point2d) |
| Given a 3-d point in space, determine the 2-d point this maps to, in the range (-1,1) in both dimensions, where (0,0) is the center of the lens and (-1,-1) is the lower-left corner.
|
|
| recomputeAll () |
| Forces all internal parameters of the Lens to be recomputed.
|
|
| setAspectRatio (float aspect_ratio) |
| Sets the aspect ratio of the lens.
|
|
| setChangeEvent (str event) |
| Sets the name of the event that will be generated whenever any properties of the Lens have changed.
|
|
| setConvergenceDistance (float convergence_distance) |
| Sets the distance between between the camera plane and the point in the distance that the left and right eyes are both looking at.
|
|
| setCoordinateSystem (CoordinateSystem cs) |
| Specifies the coordinate system that all 3-d computations are performed within for this Lens.
|
|
| setCustomFilmMat (const LMatrix4 custom_film_mat) |
| Specifies a custom matrix to transform the points on the film after they have been converted into nominal film space (-1 .
|
|
| setFar (float far_distance) |
| Defines the position of the far plane (or cylinder, sphere, whatever).
|
|
| setFilmOffset (const LVecBase2 film_offset) |
| Sets the horizontal and vertical offset amounts of this Lens.
|
|
| setFilmOffset (float x, float y) |
| Sets the horizontal and vertical offset amounts of this Lens.
|
|
| setFilmSize (const LVecBase2 film_size) |
| Sets the size and shape of the "film" within the lens.
|
|
| setFilmSize (float width) |
| Sets the horizontal size of the film without changing its shape.
|
|
| setFilmSize (float width, float height) |
| Sets the size and shape of the "film" within the lens.
|
|
| setFocalLength (float focal_length) |
| Sets the focal length of the lens.
|
|
| setFov (const LVecBase2 fov) |
| Sets the field of view of the lens in both dimensions.
|
|
| setFov (float fov) |
| Sets the horizontal field of view of the lens without changing the aspect ratio.
|
|
| setFov (float hfov, float vfov) |
| Sets the field of view of the lens in both dimensions.
|
|
| setFrustumFromCorners (const LVecBase3 ul, const LVecBase3 ur, const LVecBase3 ll, const LVecBase3 lr, int flags) |
| Sets up the lens to use the frustum defined by the four indicated points.
|
|
| setInterocularDistance (float interocular_distance) |
| Sets the distance between the left and right eyes of a stereo camera.
|
|
| setKeystone (const LVecBase2 keystone) |
| Indicates the ratio of keystone correction to perform on the lens, in each of three axes.
|
|
| setMinFov (float min_fov) |
| Sets the field of view of the smallest dimension of the window.
|
|
| setNear (float near_distance) |
| Defines the position of the near plane (or cylinder, sphere, whatever).
|
|
| setNearFar (float near_distance, float far_distance) |
| Simultaneously changes the near and far planes.
|
|
| setViewHpr (const LVecBase3 view_hpr) |
| Sets the direction in which the lens is facing.
|
|
| setViewHpr (float h, float p, float r) |
| Sets the direction in which the lens is facing.
|
|
| setViewMat (const LMatrix4 view_mat) |
| Sets an arbitrary transformation on the lens.
|
|
| setViewVector (const LVector3 view_vector, const LVector3 up_vector) |
| Specifies the direction in which the lens is facing by giving an axis to look along, and a perpendicular (or at least non-parallel) up axis.
|
|
| setViewVector (float x, float y, float z, float i, float j, float k) |
| Specifies the direction in which the lens is facing by giving an axis to look along, and a perpendicular (or at least non-parallel) up axis.
|
|
| write (Ostream out, int indent_level) |
|
Public Member Functions inherited from TypedWritable |
object | __reduce__ () |
|
object | __reduce_persist__ (object pickler) |
|
VectorUchar | encodeToBamStream () |
| Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a bytes object.
|
|
bool | encodeToBamStream (VectorUchar data, BamWriter writer) |
| Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string.
|
|
| fillin (DatagramIterator scan, BamReader manager) |
| This internal function is intended to be called by each class's make_from_bam() method to read in all of the relevant data from the BamFile for the new object.
|
|
UpdateSeq | getBamModified () |
| Returns the current bam_modified counter.
|
|
| markBamModified () |
| Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams.
|
|
Public Member Functions inherited from TypedObject |
TypeHandle | getType () |
|
int | getTypeIndex () |
| Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
|
|
bool | isExactType (TypeHandle handle) |
| Returns true if the current object is the indicated type exactly.
|
|
bool | isOfType (TypeHandle handle) |
| Returns true if the current object is or derives from the indicated type.
|
|
Public Member Functions inherited from ReferenceCount |
int | getRefCount () |
| Returns the current reference count.
|
|
| ref () |
| Explicitly increments the reference count.
|
|
bool | testRefCountIntegrity () |
| Does some easy checks to make sure that the reference count isn't completely bogus.
|
|
bool | testRefCountNonzero () |
| Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
|
|
bool | unref () |
| Explicitly decrements the reference count.
|
|