32class EXPCL_PANDA_PGRAPH TexGenAttrib :
public RenderAttrib {
37 typedef RenderAttrib::TexGenMode Mode;
40 INLINE TexGenAttrib();
41 INLINE TexGenAttrib(
const TexGenAttrib ©);
44 virtual ~TexGenAttrib();
47 static CPT(RenderAttrib)
make();
64 virtual void output(std::ostream &out)
const;
67 virtual int compare_to_impl(
const RenderAttrib *other)
const;
68 virtual size_t get_hash_impl()
const;
69 virtual CPT(RenderAttrib) compose_impl(
const RenderAttrib *other)
const;
70 virtual CPT(RenderAttrib) invert_compose_impl(
const RenderAttrib *other)
const;
75 void record_stage(
TextureStage *stage, ModeDef &mode_def);
80 INLINE
int compare_to(
const ModeDef &other)
const;
82 std::string _source_name;
84 LTexCoord3 _constant_value;
93 typedef pset<TextureStage *> NoTexCoordStages;
94 NoTexCoordStages _no_texcoords;
98 pvector<Mode> _read_modes;
100 int _num_point_sprites;
105 int _point_geom_rendering;
108 static CPT(RenderAttrib) _empty_attrib;
111 static int get_class_slot() {
114 virtual int get_slot()
const {
115 return get_class_slot();
117 MAKE_PROPERTY(class_slot, get_class_slot);
125 static TypedWritable *make_from_bam(
const FactoryParams ¶ms);
132 static void init_type() {
133 RenderAttrib::init_type();
135 RenderAttrib::get_class_type());
136 _attrib_slot =
register_slot(_type_handle, 100,
new TexGenAttrib);
139 return get_class_type();
141 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
145 static int _attrib_slot;
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
static int register_slot(TypeHandle type_handle, int sort, RenderAttrib *default_attrib)
Adds the indicated TypeHandle to the registry, if it is not there already, and returns a unique slot ...
bool has_gen_texcoord_stage(TextureStage *stage) const
Returns true if the indicated TextureStage will have texture coordinates generated for it automatical...
ConstPointerTo< RenderAttrib > remove_stage(TextureStage *stage) const
Returns a new TexGenAttrib just like this one, with the indicated stage removed.
static ConstPointerTo< RenderAttrib > make_default()
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attrib...
bool has_stage(TextureStage *stage) const
Returns true if there is a mode associated with the indicated stage, or false otherwise (in which cas...
int get_geom_rendering(int geom_rendering) const
Returns the union of the Geom::GeomRendering bits that will be required once this TexGenAttrib is app...
Mode get_mode(TextureStage *stage) const
Returns the generation mode associated with the named texture stage, or M_off if nothing is associate...
static void register_with_read_factory()
Tells the BamReader how to create objects of type TexGenAttrib.
bool is_empty() const
Returns true if no stages are defined in the TexGenAttrib, false if at least one is.
static ConstPointerTo< RenderAttrib > make()
Constructs a TexGenAttrib that generates no stages at all.
ConstPointerTo< RenderAttrib > add_stage(TextureStage *stage, Mode mode) const
Returns a new TexGenAttrib just like this one, with the indicated generation mode for the given stage...
const LTexCoord3 & get_constant_value(TextureStage *stage) const
Returns the constant value associated with the named texture stage.
Defines the properties of a named stage of the multitexture pipeline.
TypeHandle is the identifier used to differentiate C++ class types.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
This is our own Panda specialization on the default STL list.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.