# CardMaker

from pandac.PandaModules import CardMaker

Class : CardMaker
Description : This class generates 2-d "cards", that is, rectangular polygons, particularly useful for showing textures etc. in the 2-d scene graph.

## Inheritance:

CardMaker: Namable
Namable:

## Methods of CardMaker:

CardMaker (Constructor)
clearSourceGeometry
generate
reset
setColor
setFrame
setFrameFullscreenQuad
setHas3dUvs
setHasNormals
setHasUvs
setSourceGeometry
setUvRange
setUvRangeCube

## Methods of Namable:

Namable (Constructor)
clearName
getClassType
getName
hasName
operator =
output
setName

CardMaker CardMaker::CardMaker(string const &name); Description:

clearSourceGeometry void CardMaker::clear_source_geometry(void); Description: Removes the node specified by an earlier call to set_source_geometry().

generate PointerTo< PandaNode > CardMaker::generate(void); Description: Generates a GeomNode that renders the specified geometry.

reset void CardMaker::reset(void); Description: Resets all the parameters to their initial defaults.

setColor void CardMaker::set_color(float r, float g, float b, float a); Description: Sets the color of the card.

setFrame void CardMaker::set_frame(float left, float right, float bottom, float top); Description: Sets the size of the card.

setFrameFullscreenQuad void CardMaker::set_frame_fullscreen_quad(void); Description: 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 void CardMaker::set_has_3d_uvs(bool flag); Description: 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 void CardMaker::set_has_normals(bool flag); Description: 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 void CardMaker::set_has_uvs(bool flag); Description: Sets the flag indicating whether vertices will be generated with UV's or not.

setSourceGeometry void CardMaker::set_source_geometry(PandaNode *node, LVecBase4f const &frame); Description: 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().

setUvRange void CardMaker::set_uv_range(LPoint2f const &ll, LPoint2f const &ur); Description: 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. Description: Sets the range of UV's that will be applied to the vertices appropriately to show the non-pad region of the texture.

setUvRangeCube void CardMaker::set_uv_range_cube(int face); Description: Sets the range of UV's that will be applied to the vertices appropriately for a cube-map face.

Namable Namable::Namable(string const &initial_name = ("")); Description:

clearName void Namable::clear_name(void); Description: Resets the Namable's name to empty.

getClassType static TypeHandle Namable::get_class_type(void); Undocumented function.

getName string const &Namable::get_name(void) const; Description:

hasName bool Namable::has_name(void) const; Description: Returns true if the Namable has a nonempty name set, false if the name is empty.

operator = Namable &Namable::operator =(Namable const &other); Description:

output void Namable::output(ostream &out) const; In the absence of any definition to the contrary, outputting a Namable will write out its name. Description: Outputs the Namable. This function simply writes the name to the output stream; most Namable derivatives will probably redefine this.

setName void Namable::set_name(string const &name); Description: