#include <cardMaker.h>
Inheritance diagram for CardMaker:
Public Member Functions | |
CardMaker (const string &name) | |
~CardMaker () | |
void | reset () |
Resets all the parameters to their initial defaults. | |
void | set_uv_range (const TexCoordf &ll, const TexCoordf &ur) |
Sets the range of UV's that will be applied to the vertices. | |
void | set_has_uvs (bool flag) |
Sets the flag indicating whether vertices will be generated with UV's or not. | |
void | set_frame (float left, float right, float bottom, float top) |
Sets the size of the card. | |
void | set_frame (const LVecBase4f &frame) |
Sets the size of the card. | |
void | set_color (float r, float g, float b, float a) |
Sets the color of the card. | |
void | set_color (const Colorf &color) |
void | set_source_geometry (PandaNode *node, const LVecBase4f &frame) |
Sets a node that will be copied (and scaled and translated) to generate the frame, instead of generating a new polygon. | |
void | clear_source_geometry () |
Removes the node specified by an earlier call to set_source_geometry(). | |
PointerTo< PandaNode > | generate () |
Generates a GeomNode that renders the specified geometry. | |
void | set_name (const string &name) |
void | clear_name () |
Resets the Namable's name to empty. | |
bool | has_name () const |
Returns true if the Namable has a nonempty name set, false if the name is empty. | |
const string & | get_name () const |
void | output (ostream &out) const |
Outputs the Namable. | |
Static Public Member Functions | |
TypeHandle | get_class_type () |
void | init_type () |
Private Member Functions | |
PointerTo< PandaNode > | rescale_source_geometry () |
Generates the card by rescaling the source geometry appropriately. | |
Private Attributes | |
bool | _has_uvs |
TexCoordf | _ll |
TexCoordf | _ur |
LVecBase4f | _frame |
bool | _has_color |
Colorf | _color |
PointerTo< PandaNode > | _source_geometry |
LVecBase4f | _source_frame |
in the 2-d scene graph.
Definition at line 43 of file cardMaker.h.
|
Definition at line 31 of file cardMaker.I. References INLINE. |
|
Definition at line 43 of file cardMaker.I. |
|
Resets the Namable's name to empty.
Definition at line 82 of file namable.I. References Namable::_name, and INLINE. |
|
Removes the node specified by an earlier call to set_source_geometry().
Definition at line 181 of file cardMaker.I. |
|
Generates a GeomNode that renders the specified geometry.
Definition at line 62 of file cardMaker.cxx. |
|
|
|
Returns true if the Namable has a nonempty name set, false if the name is empty.
Definition at line 97 of file namable.I. References Namable::get_name(), and INLINE. Referenced by EggGroupUniquifier::EggGroupUniquifier(), Texture::read(), and Texture::Texture(). |
|
|
Outputs the Namable. This function simply writes the name to the output stream; most Namable derivatives will probably redefine this. Reimplemented in BuilderBucket, AnimBundle, AnimChannelBase, AnimChannelFixed< SwitchType >, AnimGroup, PartBundle, CollisionNode, ButtonNode, HermiteCurve, RopeNode, Fog, GeomNode, LensNode, LightLensNode, LightNode, LODNode, PandaNode, PlaneNode, MouseWatcher, and MouseWatcherRegion. |
|
Generates the card by rescaling the source geometry appropriately.
Definition at line 117 of file cardMaker.cxx. References root. |
|
Resets all the parameters to their initial defaults.
Definition at line 39 of file cardMaker.cxx. References NULL. |
|
|
|
Sets the color of the card.
Definition at line 118 of file cardMaker.I. References _source_frame, _source_geometry, and INLINE. |
|
Sets the size of the card.
Definition at line 105 of file cardMaker.I. |
|
Sets the size of the card.
Definition at line 92 of file cardMaker.I. |
|
Sets the flag indicating whether vertices will be generated with UV's or not.
Definition at line 79 of file cardMaker.I. |
|
Definition at line 69 of file namable.I. References Namable::_name. Referenced by BuilderBucket::BuilderBucket(), SceneGraphReducer::do_flatten_siblings(), Texture::read(), PandaNode::reparent(), and Texture::Texture(). |
|
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(). Definition at line 165 of file cardMaker.I. |
|
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. Definition at line 63 of file cardMaker.I. |
|
Definition at line 71 of file cardMaker.h. |
|
Definition at line 68 of file cardMaker.h. Referenced by set_has_uvs(). |
|
Definition at line 70 of file cardMaker.h. |
|
Definition at line 66 of file cardMaker.h. |
|
Definition at line 67 of file cardMaker.h. Referenced by ~CardMaker(). |
|
Definition at line 74 of file cardMaker.h. Referenced by set_color(). |
|
Definition at line 73 of file cardMaker.h. Referenced by set_color(). |
|
Definition at line 67 of file cardMaker.h. Referenced by ~CardMaker(). |