EggVertexUV¶
-
class
EggVertexUV
¶ Bases:
EggNamedObject
The set of UV’s that may or may not be assigned to a vertex. To support multitexturing, there may be multiple sets of UV’s on a particular vertex, each with its own name.
Inheritance diagram
-
explicit
EggVertexUV
(std::string const &name, LTexCoordd const &uv)¶
-
explicit
EggVertexUV
(std::string const &name, LTexCoord3d const &uvw)¶
-
EggVertexUV
(EggVertexUV const ©)¶
-
void
clear_binormal
(void)¶
-
void
clear_tangent
(void)¶
-
int
compare_to
(EggVertexUV const &other) const¶ An ordering operator to compare two vertices for sorting order. This imposes an arbitrary ordering useful to identify unique vertices.
-
std::string
filter_name
(std::string const &name)¶ Returns the actual name that should be set for a given name string. Usually this is the same string that is input, but for historical reasons the texture coordinate name “default” is mapped to the empty string.
-
static TypeHandle
get_class_type
(void)¶
-
int
get_num_dimensions
(void) const¶ Returns the number of components of the texture coordinate set. This is either 2 (the normal case) or 3 (for a 3-d texture coordinate).
-
LVecBase4d
get_tangent4
(void) const¶
-
LTexCoordd
get_uv
(void) const¶ Returns the texture coordinate pair, if
get_num_dimensions()
is 2.
-
LTexCoord3d const &
get_uvw
(void) const¶ Returns the texture coordinate triple, if
get_num_dimensions()
is 3. This is also legal to call ifget_num_dimensions()
is 2 (but the last dimension will be zero).
-
bool
has_binormal
(void) const¶
-
bool
has_tangent
(void) const¶
-
bool
has_tangent4
(void) const¶
-
bool
has_w
(void) const¶ Returns true if the texture coordinate has a third, w component, false if it is just a normal 2-d texture coordinate.
-
static PointerTo<EggVertexUV>
make_average
(EggVertexUV const *first, EggVertexUV const *second)¶ Creates a new
EggVertexUV
that contains the averaged values of the two given objects. It is an error if they don’t have the same name.
-
void
set_name
(std::string const &name)¶
-
void
set_tangent4
(LVecBase4d const &tangent)¶ Sets the tangent vector, along with a fourth parameter that is multiplied with the result of cross(normal, tangent) when computing the binormal.
-
void
set_uv
(LTexCoordd const &texCoord)¶ Sets the texture coordinate pair. This makes the texture coordinate a 2-d texture coordinate, which is the usual case.
-
void
set_uvw
(LTexCoord3d const &texCoord)¶ Sets the texture coordinate triple. This makes the texture coordinate a 3-d texture coordinate.
-
void
transform
(LMatrix4d const &mat)¶ Applies the indicated transformation matrix to the UV’s tangent and/or binormal. This does nothing if there is no tangent or binormal.
-
void
write
(std::ostream &out, int indent_level) const¶
-
explicit