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
|
||||||
|
@ -113,6 +113,8 @@ 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;
|
||||||
@ -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