mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Add get_tangent_name and get_binormal_name
This commit is contained in:
parent
b8935be2c3
commit
de7ec424c7
@ -141,13 +141,46 @@ set_texcoord_name(const string &name) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: TextureStage::get_texcoord_name
|
||||
// Access: Published
|
||||
// Description: Returns the InternalName
|
||||
// Description: See set_texcoord_name. The default is
|
||||
// InternalName::get_texcoord().
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE InternalName *TextureStage::
|
||||
get_texcoord_name() const {
|
||||
return _texcoord_name;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: TextureStage::get_tangent_name
|
||||
// Access: Published
|
||||
// Description: Returns the set of tangents this texture stage will
|
||||
// use. This is the same as get_texcoord_name(),
|
||||
// except that the first part is "tangent".
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE InternalName *TextureStage::
|
||||
get_tangent_name() const {
|
||||
if (_texcoord_name->get_parent() == NULL) {
|
||||
return InternalName::get_tangent();
|
||||
} else {
|
||||
return InternalName::get_tangent_name(_texcoord_name->get_basename());
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: TextureStage::get_binormal_name
|
||||
// Access: Published
|
||||
// Description: Returns the set of binormals this texture stage will
|
||||
// use. This is the same as get_binormal_name(),
|
||||
// except that the first part is "binormal".
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE InternalName *TextureStage::
|
||||
get_binormal_name() const {
|
||||
if (_texcoord_name->get_parent() == NULL) {
|
||||
return InternalName::get_binormal();
|
||||
} else {
|
||||
return InternalName::get_binormal_name(_texcoord_name->get_basename());
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: TextureStage::set_mode
|
||||
// Access: Published
|
||||
|
@ -45,7 +45,7 @@ PUBLISHED:
|
||||
|
||||
enum Mode {
|
||||
// Modes that pertain to the fixed-function pipeline.
|
||||
|
||||
|
||||
M_modulate,
|
||||
M_decal,
|
||||
M_blend,
|
||||
@ -53,12 +53,12 @@ PUBLISHED:
|
||||
M_add,
|
||||
M_combine,
|
||||
M_blend_color_scale,
|
||||
|
||||
|
||||
M_modulate_glow, // When fixed-function, equivalent to modulate.
|
||||
M_modulate_gloss, // When fixed-function, equivalent to modulate.
|
||||
|
||||
|
||||
// Modes that are only relevant to shader-based rendering.
|
||||
|
||||
|
||||
M_normal,
|
||||
M_normal_height,
|
||||
M_glow, // Rarely used: modulate_glow is more efficient.
|
||||
@ -67,7 +67,7 @@ PUBLISHED:
|
||||
M_selector,
|
||||
M_normal_gloss,
|
||||
};
|
||||
|
||||
|
||||
enum CombineMode {
|
||||
CM_undefined,
|
||||
CM_replace,
|
||||
@ -113,12 +113,14 @@ PUBLISHED:
|
||||
INLINE void set_texcoord_name(InternalName *name);
|
||||
INLINE void set_texcoord_name(const string &texcoord_name);
|
||||
INLINE InternalName *get_texcoord_name() const;
|
||||
|
||||
INLINE InternalName *get_tangent_name() const;
|
||||
INLINE InternalName *get_binormal_name() const;
|
||||
|
||||
INLINE void set_mode(Mode mode);
|
||||
INLINE Mode get_mode() const;
|
||||
|
||||
|
||||
INLINE bool is_fixed_function() const;
|
||||
|
||||
|
||||
INLINE void set_color(const LColor &color);
|
||||
INLINE LColor get_color() const;
|
||||
|
||||
@ -231,7 +233,7 @@ private:
|
||||
|
||||
static PT(TextureStage) _default_stage;
|
||||
static UpdateSeq _sort_seq;
|
||||
|
||||
|
||||
public:
|
||||
// Datagram stuff
|
||||
static void register_with_read_factory();
|
||||
@ -272,6 +274,3 @@ EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, TextureStage::CombineOperan
|
||||
#include "textureStage.I"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user