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
|
// Function: TextureStage::get_texcoord_name
|
||||||
// Access: Published
|
// Access: Published
|
||||||
// Description: Returns the InternalName
|
// Description: See set_texcoord_name. The default is
|
||||||
|
// InternalName::get_texcoord().
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE InternalName *TextureStage::
|
INLINE InternalName *TextureStage::
|
||||||
get_texcoord_name() const {
|
get_texcoord_name() const {
|
||||||
return _texcoord_name;
|
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
|
// Function: TextureStage::set_mode
|
||||||
// Access: Published
|
// Access: Published
|
||||||
|
@ -45,7 +45,7 @@ PUBLISHED:
|
|||||||
|
|
||||||
enum Mode {
|
enum Mode {
|
||||||
// Modes that pertain to the fixed-function pipeline.
|
// Modes that pertain to the fixed-function pipeline.
|
||||||
|
|
||||||
M_modulate,
|
M_modulate,
|
||||||
M_decal,
|
M_decal,
|
||||||
M_blend,
|
M_blend,
|
||||||
@ -53,12 +53,12 @@ PUBLISHED:
|
|||||||
M_add,
|
M_add,
|
||||||
M_combine,
|
M_combine,
|
||||||
M_blend_color_scale,
|
M_blend_color_scale,
|
||||||
|
|
||||||
M_modulate_glow, // When fixed-function, equivalent to modulate.
|
M_modulate_glow, // When fixed-function, equivalent to modulate.
|
||||||
M_modulate_gloss, // When fixed-function, equivalent to modulate.
|
M_modulate_gloss, // When fixed-function, equivalent to modulate.
|
||||||
|
|
||||||
// Modes that are only relevant to shader-based rendering.
|
// Modes that are only relevant to shader-based rendering.
|
||||||
|
|
||||||
M_normal,
|
M_normal,
|
||||||
M_normal_height,
|
M_normal_height,
|
||||||
M_glow, // Rarely used: modulate_glow is more efficient.
|
M_glow, // Rarely used: modulate_glow is more efficient.
|
||||||
@ -67,7 +67,7 @@ PUBLISHED:
|
|||||||
M_selector,
|
M_selector,
|
||||||
M_normal_gloss,
|
M_normal_gloss,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum CombineMode {
|
enum CombineMode {
|
||||||
CM_undefined,
|
CM_undefined,
|
||||||
CM_replace,
|
CM_replace,
|
||||||
@ -113,12 +113,14 @@ PUBLISHED:
|
|||||||
INLINE void set_texcoord_name(InternalName *name);
|
INLINE void set_texcoord_name(InternalName *name);
|
||||||
INLINE void set_texcoord_name(const string &texcoord_name);
|
INLINE void set_texcoord_name(const string &texcoord_name);
|
||||||
INLINE InternalName *get_texcoord_name() const;
|
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 void set_mode(Mode mode);
|
||||||
INLINE Mode get_mode() const;
|
INLINE Mode get_mode() const;
|
||||||
|
|
||||||
INLINE bool is_fixed_function() const;
|
INLINE bool is_fixed_function() const;
|
||||||
|
|
||||||
INLINE void set_color(const LColor &color);
|
INLINE void set_color(const LColor &color);
|
||||||
INLINE LColor get_color() const;
|
INLINE LColor get_color() const;
|
||||||
|
|
||||||
@ -231,7 +233,7 @@ private:
|
|||||||
|
|
||||||
static PT(TextureStage) _default_stage;
|
static PT(TextureStage) _default_stage;
|
||||||
static UpdateSeq _sort_seq;
|
static UpdateSeq _sort_seq;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Datagram stuff
|
// Datagram stuff
|
||||||
static void register_with_read_factory();
|
static void register_with_read_factory();
|
||||||
@ -272,6 +274,3 @@ EXPCL_PANDA_GOBJ ostream &operator << (ostream &out, TextureStage::CombineOperan
|
|||||||
#include "textureStage.I"
|
#include "textureStage.I"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user