Panda3D
|
This class generates 2-d "cards", that is, rectangular polygons, particularly useful for showing textures etc. in the 2-d scene graph. More...
Public Member Functions | |
__init__ (str name) | |
clearSourceGeometry () | |
Removes the node specified by an earlier call to set_source_geometry(). More... | |
PandaNode | generate () |
Generates a GeomNode that renders the specified geometry. More... | |
reset () | |
Resets all the parameters to their initial defaults. More... | |
setColor (const LColor color) | |
setColor (float r, float g, float b, float a) | |
Sets the color of the card. More... | |
setFrame (const LVecBase4 frame) | |
Sets the size of the card. More... | |
setFrame (const LVertex ll, const LVertex lr, const LVertex ur, const LVertex ul) | |
Sets the size of the card. More... | |
setFrame (float left, float right, float bottom, float top) | |
Sets the size of the card. More... | |
setFrameFullscreenQuad () | |
Sets the card to (-1,1,-1,1), which is appropriate if you plan to parent it to render2d and use it as a fullscreen quad. More... | |
setHas3dUvs (bool flag) | |
Sets the flag indicating whether vertices will be generated with 3-component UVW's (true) or 2-component UV's (the default, false). Normally, this will be implicitly set by setting the uv_range. More... | |
setHasNormals (bool flag) | |
Sets the flag indicating whether vertices will be generated with normals or not. Normals are required if you intend to enable lighting on the card, but are just wasted space and bandwidth otherwise, so there is a (slight) optimization for disabling them. If enabled, the normals will be generated perpendicular to the card's face. More... | |
setHasUvs (bool flag) | |
Sets the flag indicating whether vertices will be generated with UV's or not. More... | |
setSourceGeometry (PandaNode node, const LVecBase4 frame) | |
Sets a node that will be copied (and scaled and translated) to generate the frame, instead of generating a new polygon. The node may contain arbitrary geometry that describes a flat polygon contained within the indicated left, right, bottom, top frame. More... | |
setUvRange (const LTexCoord ll, const LTexCoord ur) | |
Sets the range of UV's that will be applied to the vertices. If set_has_uvs() is true (as it is by default), the vertices will be generated with the indicated range of UV's, which will be useful if a texture is applied. More... | |
setUvRange (const LTexCoord ll, const LTexCoord lr, const LTexCoord ur, const LTexCoord ul) | |
Sets the range of UV's that will be applied to the vertices. If set_has_uvs() is true (as it is by default), the vertices will be generated with the indicated range of UV's, which will be useful if a texture is applied. More... | |
setUvRange (const LTexCoord3 ll, const LTexCoord3 lr, const LTexCoord3 ur, const LTexCoord3 ul) | |
Sets the range of UV's that will be applied to the vertices. If set_has_uvs() is true (as it is by default), the vertices will be generated with the indicated range of UV's, which will be useful if a texture is applied. More... | |
setUvRange (const LVector4 x, const LVector4 y, const LVector4 z) | |
Sets the range of UV's that will be applied to the vertices. If set_has_uvs() is true (as it is by default), the vertices will be generated with the indicated range of UV's, which will be useful if a texture is applied. More... | |
setUvRange (const Texture tex) | |
Sets the range of UV's that will be applied to the vertices appropriately to show the non-pad region of the texture. More... | |
setUvRangeCube (int face) | |
Sets the range of UV's that will be applied to the vertices appropriately for a cube-map face. More... | |
![]() | |
__init__ (const Namable copy) | |
__init__ (str initial_name) | |
clearName () | |
Resets the Namable's name to empty. More... | |
str | getName () |
bool | hasName () |
Returns true if the Namable has a nonempty name set, false if the name is empty. More... | |
Namable | operator= (const Namable other) |
output (Ostream out) | |
Outputs the Namable. This function simply writes the name to the output stream; most Namable derivatives will probably redefine this. More... | |
setName (str name) | |
Additional Inherited Members | |
![]() | |
static TypeHandle | getClassType () |
This class generates 2-d "cards", that is, rectangular polygons, particularly useful for showing textures etc. in the 2-d scene graph.
__init__ | ( | str | name | ) |
clearSourceGeometry | ( | ) |
Removes the node specified by an earlier call to set_source_geometry().
reset | ( | ) |
Resets all the parameters to their initial defaults.
setColor | ( | const LColor | color | ) |
setColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
Sets the color of the card.
setFrame | ( | const LVecBase4 | frame | ) |
Sets the size of the card.
Sets the size of the card.
setFrame | ( | float | left, |
float | right, | ||
float | bottom, | ||
float | top | ||
) |
Sets the size of the card.
setFrameFullscreenQuad | ( | ) |
Sets the card to (-1,1,-1,1), which is appropriate if you plan to parent it to render2d and use it as a fullscreen quad.
setHas3dUvs | ( | bool | flag | ) |
Sets the flag indicating whether vertices will be generated with 3-component UVW's (true) or 2-component UV's (the default, false). Normally, this will be implicitly set by setting the uv_range.
setHasNormals | ( | bool | flag | ) |
Sets the flag indicating whether vertices will be generated with normals or not. Normals are required if you intend to enable lighting on the card, but are just wasted space and bandwidth otherwise, so there is a (slight) optimization for disabling them. If enabled, the normals will be generated perpendicular to the card's face.
setHasUvs | ( | bool | flag | ) |
Sets the flag indicating whether vertices will be generated with UV's or not.
Sets a node that will be copied (and scaled and translated) to generate the frame, instead of generating a new polygon. The node may contain arbitrary geometry that describes a flat polygon contained within the indicated left, right, bottom, top frame.
When generate() is called, the geometry in this node will be scaled and translated appropriately to give it the size and aspect ratio specified by set_frame().
Sets the range of UV's that will be applied to the vertices. If set_has_uvs() is true (as it is by default), the vertices will be generated with the indicated range of UV's, which will be useful if a texture is applied.
Sets the range of UV's that will be applied to the vertices. If set_has_uvs() is true (as it is by default), the vertices will be generated with the indicated range of UV's, which will be useful if a texture is applied.
setUvRange | ( | const LTexCoord3 | ll, |
const LTexCoord3 | lr, | ||
const LTexCoord3 | ur, | ||
const LTexCoord3 | ul | ||
) |
Sets the range of UV's that will be applied to the vertices. If set_has_uvs() is true (as it is by default), the vertices will be generated with the indicated range of UV's, which will be useful if a texture is applied.
Sets the range of UV's that will be applied to the vertices. If set_has_uvs() is true (as it is by default), the vertices will be generated with the indicated range of UV's, which will be useful if a texture is applied.
setUvRange | ( | const Texture | tex | ) |
Sets the range of UV's that will be applied to the vertices appropriately to show the non-pad region of the texture.
setUvRangeCube | ( | int | face | ) |
Sets the range of UV's that will be applied to the vertices appropriately for a cube-map face.