Public Member Functions
| ||FisheyeMaker (string name)|
|PandaNode ||generate ()|
| ||Generates a GeomNode that renders the specified geometry. |
| ||reset ()|
| ||Resets all the parameters to their initial defaults. |
| ||setFov (float fov)|
| ||Specifies the field of view of the fisheye projection. |
| ||setNumVertices (int num_vertices)|
| ||Specifies the approximate number of vertices to be used to generate the rose. |
| ||setReflection (bool reflection)|
| ||Sets the flag indicating whether the texture image should be mirrored (true) or normal (false). |
| ||setSquareInscribed (bool square_inscribed, float square_radius)|
| ||Sets the flag that indicates whether the rose should be inscribed within a square. |
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.
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.