21 if (name ==
"default") {
30 INLINE
void EggVertexUV::
31 set_name(
const std::string &name) {
41 return has_w() ? 3 : 2;
50 return (_flags & F_has_w) != 0;
58 nassertr(!
has_w(), LTexCoordd::zero());
59 return LTexCoordd(_uvw[0], _uvw[1]);
78 _uvw.set(uv[0], uv[1], 0.0);
95 INLINE
bool EggVertexUV::
97 return (_flags & F_has_tangent) != 0;
103 INLINE
const LNormald &EggVertexUV::
104 get_tangent()
const {
105 nassertr(has_tangent(), _tangent);
112 INLINE
void EggVertexUV::
113 set_tangent(
const LNormald &tangent) {
115 _flags |= F_has_tangent;
121 INLINE
void EggVertexUV::
123 _flags &= ~F_has_tangent;
129 INLINE
bool EggVertexUV::
130 has_binormal()
const {
131 return (_flags & F_has_binormal) != 0;
137 INLINE
const LNormald &EggVertexUV::
138 get_binormal()
const {
139 nassertr(has_binormal(), _binormal);
146 INLINE
void EggVertexUV::
147 set_binormal(
const LNormald &binormal) {
148 _binormal = binormal;
149 _flags |= F_has_binormal;
155 INLINE
void EggVertexUV::
157 _flags &= ~F_has_binormal;
const LTexCoord3d & get_uvw() const
Returns the texture coordinate triple, if get_num_dimensions() is 3.
LTexCoordd get_uv() const
Returns the texture coordinate pair, if get_num_dimensions() is 2.
int get_num_dimensions() const
Returns the number of components of the texture coordinate set.
bool has_w() const
Returns true if the texture coordinate has a third, w component, false if it is just a normal 2-d tex...
static std::string filter_name(const std::string &name)
Returns the actual name that should be set for a given name string.
void set_uv(const LTexCoordd &texCoord)
Sets the texture coordinate pair.
void set_uvw(const LTexCoord3d &texCoord)
Sets the texture coordinate triple.