|
|
|
Indicates the set of TextureStages and their associated Textures that should be applied to (or removed from) a node.
More...
#include "textureAttrib.h"
List of all members.
Classes |
| class | CompareTextureStagePointer |
| class | CompareTextureStagePriorities |
| class | CompareTextureStageSort |
| class | StageNode |
Public Member Functions |
| virtual int | complete_pointers (TypedWritable **plist, BamReader *manager) |
| | Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
|
|
| CPT (RenderAttrib) add_on_stage(TextureStage *stage |
|
| CPT (RenderAttrib) remove_on_stage(TextureStage *stage) const |
|
| CPT (RenderAttrib) add_off_stage(TextureStage *stage |
|
| CPT (RenderAttrib) remove_off_stage(TextureStage *stage) const |
|
| CPT (RenderAttrib) unify_texture_stages(TextureStage *stage) const |
|
| CPT (TextureAttrib) filter_to_max(int max_texture_stages) const |
| virtual bool | cull_callback (CullTraverser *trav, const CullTraverserData &data) const |
| | If has_cull_callback() returns true, this function will be called during the cull traversal to perform any additional operations that should be performed at cull time.
|
| int | find_on_stage (const TextureStage *stage) const |
| | Returns the index number of the indicated TextureStage within the list of on_stages, or -1 if the indicated stage is not listed.
|
|
virtual TypeHandle | force_init_type () |
| int | get_ff_tc_index (int n) const |
| | For each TextureStage listed in get_on_ff_stage(), this returns a unique index number for the texture coordinate name used by that TextureStage.
|
| int | get_num_off_stages () const |
| | Returns the number of stages that are turned off by the attribute.
|
| int | get_num_on_ff_stages () const |
| | Returns the number of on-stages that are relevant to the classic fixed function pipeline.
|
| int | get_num_on_stages () const |
| | Returns the number of stages that are turned on by the attribute.
|
| TextureStage * | get_off_stage (int n) const |
| | Returns the nth stage turned off by the attribute, sorted in arbitrary (pointer) order.
|
| TextureStage * | get_on_ff_stage (int n) const |
| | Returns the nth stage turned on by the attribute, sorted in render order, including only those relevant to the classic fixed function pipeline.
|
| TextureStage * | get_on_stage (int n) const |
| | Returns the nth stage turned on by the attribute, sorted in render order.
|
| int | get_on_stage_override (TextureStage *stage) const |
| | Returns the override value associated with the indicated stage.
|
| Texture * | get_on_texture (TextureStage *stage) const |
| | Returns the texture associated with the indicated stage, or NULL if no texture is associated.
|
|
virtual int | get_slot () const |
| Texture * | get_texture () const |
| | If the TextureAttrib is not an 'off' TextureAttrib, returns the base-level texture that is associated.
|
|
virtual TypeHandle | get_type () const |
| bool | has_all_off () const |
| | Returns true if this attrib turns off all stages (although it may also turn some on).
|
| virtual bool | has_cull_callback () const |
| | Should be overridden by derived classes to return true if cull_callback() has been defined.
|
| bool | has_off_stage (TextureStage *stage) const |
| | Returns true if the indicated stage is turned off by the attrib, false otherwise.
|
| bool | has_on_stage (TextureStage *stage) const |
| | Returns true if the indicated stage is turned on by the attrib, false otherwise.
|
| bool | is_identity () const |
| | Returns true if this is an identity attrib: it does not change the set of stages in use.
|
| bool | is_off () const |
| | Returns true if the TextureAttrib is an 'off' TextureAttrib, indicating that it should disable texturing.
|
| virtual bool | lower_attrib_can_override () const |
| | Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.
|
|
| MAKE_SEQ (get_on_stages, get_num_on_stages, get_on_stage) |
|
| MAKE_SEQ (get_on_ff_stages, get_num_on_ff_stages, get_on_ff_stage) |
|
| MAKE_SEQ (get_off_stages, get_num_off_stages, get_off_stage) |
|
virtual void | output (ostream &out) const |
| 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 Public Member Functions |
|
static | CPT (RenderAttrib) make(Texture *tex) |
|
static | CPT (RenderAttrib) make_off() |
|
static | CPT (RenderAttrib) make_default() |
|
static | CPT (RenderAttrib) make() |
|
static | CPT (RenderAttrib) make_all_off() |
|
static int | get_class_slot () |
|
static TypeHandle | get_class_type () |
|
static void | init_type () |
| static void | register_with_read_factory () |
| | Tells the BamReader how to create objects of type TextureAttrib.
|
Public Attributes |
|
Texture int | override = 0) const |
|
int | override = 0) const |
|
Texture * | tex |
Protected Member Functions |
| | TextureAttrib () |
| | Use TextureAttrib::make() to construct a new TextureAttrib object.
|
| | TextureAttrib (const TextureAttrib ©) |
| | Use TextureAttrib::make() to construct a new TextureAttrib object.
|
| virtual int | compare_to_impl (const RenderAttrib *other) const |
| | Intended to be overridden by derived TextureAttrib types to return a unique number indicating whether this TextureAttrib is equivalent to the other one.
|
|
virtual | CPT (RenderAttrib) compose_impl(const RenderAttrib *other) const |
|
virtual | CPT (RenderAttrib) invert_compose_impl(const RenderAttrib *other) const |
|
virtual | CPT (RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const |
| void | fillin (DatagramIterator &scan, BamReader *manager) |
| | This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new TextureAttrib.
|
| virtual size_t | get_hash_impl () const |
| | Intended to be overridden by derived RenderAttrib types to return a unique hash for these particular properties.
|
Static Protected Member Functions |
| static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
| | This function is called by the BamReader's factory when a new object of type TextureAttrib is encountered in the Bam file.
|
Detailed Description
Indicates the set of TextureStages and their associated Textures that should be applied to (or removed from) a node.
Definition at line 33 of file textureAttrib.h.
Constructor & Destructor Documentation
Use TextureAttrib::make() to construct a new TextureAttrib object.
The copy constructor is only defined to facilitate methods like add_on_stage().
Definition at line 38 of file textureAttrib.I.
Member Function Documentation
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
Returns the number of pointers processed.
Reimplemented from TypedWritable.
Definition at line 835 of file textureAttrib.cxx.
References ordered_vector< Key, Compare >::begin(), ordered_vector< Key, Compare >::end(), TextureStagePool::get_stage(), UpdateSeq::old(), ordered_vector< Key, Compare >::push_back(), ordered_vector< Key, Compare >::size(), and ov_set< Key, Compare >::sort().
For each TextureStage listed in get_on_ff_stage(), this returns a unique index number for the texture coordinate name used by that TextureStage.
It is guaranteed to remain the same index number for each texcoord name (for a given set of TextureStages), even if the texture render order changes.
Definition at line 146 of file textureAttrib.I.
Returns the number of on-stages that are relevant to the classic fixed function pipeline.
This excludes texture stages such as normal maps.
Definition at line 116 of file textureAttrib.I.
Returns the nth stage turned on by the attribute, sorted in render order, including only those relevant to the classic fixed function pipeline.
This excludes texture stages such as normal maps.
Definition at line 130 of file textureAttrib.I.
Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.
This should return false if a RenderAttrib on a higher node will compose into a RenderAttrib on a lower node that has a higher override value, or false if the lower RenderAttrib will completely replace the state.
The default behavior is false: normally, a RenderAttrib in the graph cannot completely override a RenderAttrib above it, regardless of its override value--instead, the two attribs are composed. But for some kinds of RenderAttribs, it is useful to allow this kind of override.
This method only handles the one special case of a lower RenderAttrib with a higher override value. If the higher RenderAttrib has a higher override value, it always completely overrides. And if both RenderAttribs have the same override value, they are always composed.
Reimplemented from RenderAttrib.
Definition at line 352 of file textureAttrib.cxx.
The documentation for this class was generated from the following files:
| | |