FisheyeMaker
from panda3d.core import FisheyeMaker
- class FisheyeMaker
Bases:
Namable
This class is similar to CardMaker, but instead of generating ordinary cards, it generates a circular rose that represents the projection of a 3-D scene through a fisheye lens. The texture coordinates of the rose are defined so that each 2-D vertex has a 3-D UVW that reflects the corresponding position in 3-D space of that particular vertex.
This class is particularly suited for converting cube maps to sphere maps.
Inheritance diagram
- __init__(*args, **kwargs)
- generate()
C++ Interface: generate(const FisheyeMaker self)
- /**
Generates a GeomNode that renders the specified geometry.
*/
- reset()
C++ Interface: reset(const FisheyeMaker self)
- /**
Resets all the parameters to their initial defaults.
*/
- setFov()
C++ Interface: set_fov(const FisheyeMaker self, float fov)
- /**
Specifies the field of view of the fisheye projection. A sphere map will
have a 360-degree field of view (and this is the default).
*/
- setNumVertices()
C++ Interface: set_num_vertices(const FisheyeMaker self, int num_vertices)
- /**
Specifies the approximate number of vertices to be used to generate the
rose. This is the approximate number of vertices that will be located
within the rose’s unit circle, not counting the inscribing square (if any).
The actual number of vertices used may be +/- 25% of this value.
*/
- setReflection()
C++ Interface: set_reflection(const FisheyeMaker self, bool reflection)
- /**
Sets the flag indicating whether the texture image should be mirrored
(true) or normal (false). When this is true, the 3-D texture coordinates
will be reversed so that the image is appropriate for a reflection. This
is the best choice for generating a sphere map from a cube map. The
default is false.
*/
- setSquareInscribed()
C++ Interface: set_square_inscribed(const FisheyeMaker self, bool square_inscribed, float square_radius)
- /**
Sets the flag that indicates whether the rose should be inscribed within a
square. When this is true, an additional square is generated to inscribed
the circular rose, with the indicated “radius” (the sides of the square
will be 2 * square_radius). The texture coordinates of the square will
uniformly map to the back pole of the cube map.
This is mainly useful to provide a good uniform background color for a
sphere map so that it does not have a sharp circular edge that might
produce artifacts due to numerical imprecision when mapping.
*/
- set_fov()
C++ Interface: set_fov(const FisheyeMaker self, float fov)
- /**
Specifies the field of view of the fisheye projection. A sphere map will
have a 360-degree field of view (and this is the default).
*/
- set_num_vertices()
C++ Interface: set_num_vertices(const FisheyeMaker self, int num_vertices)
- /**
Specifies the approximate number of vertices to be used to generate the
rose. This is the approximate number of vertices that will be located
within the rose’s unit circle, not counting the inscribing square (if any).
The actual number of vertices used may be +/- 25% of this value.
*/
- set_reflection()
C++ Interface: set_reflection(const FisheyeMaker self, bool reflection)
- /**
Sets the flag indicating whether the texture image should be mirrored
(true) or normal (false). When this is true, the 3-D texture coordinates
will be reversed so that the image is appropriate for a reflection. This
is the best choice for generating a sphere map from a cube map. The
default is false.
*/
- set_square_inscribed()
C++ Interface: set_square_inscribed(const FisheyeMaker self, bool square_inscribed, float square_radius)
- /**
Sets the flag that indicates whether the rose should be inscribed within a
square. When this is true, an additional square is generated to inscribed
the circular rose, with the indicated “radius” (the sides of the square
will be 2 * square_radius). The texture coordinates of the square will
uniformly map to the back pole of the cube map.
This is mainly useful to provide a good uniform background color for a
sphere map so that it does not have a sharp circular edge that might
produce artifacts due to numerical imprecision when mapping.
*/