18 CardMaker(
const std::string &name) :
Namable(name) {
52 set_frame(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top) {
53 _ll_pos = LVector3::rfu(left, 0.0f, bottom);
54 _lr_pos = LVector3::rfu(right, 0.0f, bottom);
55 _ur_pos = LVector3::rfu(right, 0.0f, top);
56 _ul_pos = LVector3::rfu(left, 0.0f, top);
64 set_frame(frame[0], frame[1], frame[2], frame[3]);
71 set_frame(
const LVertex &ll,
const LVertex &lr,
const LVertex &ur,
const LVertex &ul) {
91 set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a) {
128 _source_geometry = node;
129 _source_frame = frame;
137 _source_geometry =
nullptr;
A basic node of the scene graph or data graph.
void set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a)
Sets the color of the card.
void set_frame(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top)
Sets the size of the card.
void set_has_uvs(bool flag)
Sets the flag indicating whether vertices will be generated with UV's or not.
void set_frame_fullscreen_quad()
Sets the card to (-1,1,-1,1), which is appropriate if you plan to parent it to render2d and use it as...
A base class for all things which can have a name.
void clear_source_geometry()
Removes the node specified by an earlier call to set_source_geometry().
void set_source_geometry(PandaNode *node, const LVecBase4 &frame)
Sets a node that will be copied (and scaled and translated) to generate the frame,...
void set_has_normals(bool flag)
Sets the flag indicating whether vertices will be generated with normals or not.
void set_has_3d_uvs(bool flag)
Sets the flag indicating whether vertices will be generated with 3-component UVW's (true) or 2-compon...
void reset()
Resets all the parameters to their initial defaults.