Panda3D
|
The set of UV's that may or may not be assigned to a vertex. More...
Public Member Functions | |
EggVertexUV (EggVertexUV const copy) | |
EggVertexUV (string name, Point2D const uv) | |
EggVertexUV (string name, Point3D const uvw) | |
clearBinormal () | |
clearTangent () | |
clearUserData () | |
Removes *all* user data pointers from the node. | |
clearUserData (TypeHandle type) | |
Removes the user data pointer of the indicated type. | |
int | compareTo (EggVertexUV const other) |
An ordering operator to compare two vertices for sorting order. | |
Vec3D const | getBinormal () |
int | getNumDimensions () |
Returns the number of components of the texture coordinate set. | |
Vec3D const | getTangent () |
EggUserData | getUserData () |
Returns the user data pointer most recently stored on this object, or NULL if nothing was previously stored. | |
EggUserData | getUserData (TypeHandle type) |
Returns the user data pointer of the indicated type, if it exists, or NULL if it does not. | |
Point2D | getUv () |
Returns the texture coordinate pair, if get_num_dimensions() is 2. | |
Point3D const | getUvw () |
Returns the texture coordinate triple, if get_num_dimensions() is 3. | |
bool | hasBinormal () |
bool | hasTangent () |
bool | hasUserData () |
Returns true if a generic user data pointer has recently been set and not yet cleared, false otherwise. | |
bool | hasUserData (TypeHandle type) |
Returns true if the user data pointer of the indicated type has been set, false otherwise. | |
bool | hasW () |
Returns true if the texture coordinate has a third, w component, false if it is just a normal 2-d texture coordinate. | |
EggVertexUV | operator= (EggVertexUV const copy) |
output (ostream out) | |
setBinormal (Vec3D const binormal) | |
setName (string name) | |
setTangent (Vec3D const tangent) | |
setUserData (EggUserData user_data) | |
Sets the user data associated with this object. | |
setUv (Point2D const texCoord) | |
Sets the texture coordinate pair. | |
setUvw (Point3D const texCoord) | |
Sets the texture coordinate triple. | |
transform (Mat4D const mat) | |
Applies the indicated transformation matrix to the UV's tangent and/or binormal. | |
write (ostream out, int indent_level) | |
Static Public Member Functions | |
static string | filterName (string name) |
Returns the actual name that should be set for a given name string. | |
static TypeHandle | getClassType () |
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.
EggVertexUV | ( | EggVertexUV const | copy | ) |
EggVertexUV | ( | string | name, |
Point2D const | uv | ||
) |
EggVertexUV | ( | string | name, |
Point3D const | uvw | ||
) |
clearBinormal | ( | ) |
clearTangent | ( | ) |
clearUserData | ( | ) | [inherited] |
Removes *all* user data pointers from the node.
clearUserData | ( | TypeHandle | type | ) | [inherited] |
Removes the user data pointer of the indicated type.
int compareTo | ( | EggVertexUV const | other | ) |
An ordering operator to compare two vertices for sorting order.
This imposes an arbitrary ordering useful to identify unique vertices.
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.
Vec3D const getBinormal | ( | ) |
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from EggNamedObject.
int getNumDimensions | ( | ) |
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).
Vec3D const getTangent | ( | ) |
EggUserData getUserData | ( | ) | [inherited] |
Returns the user data pointer most recently stored on this object, or NULL if nothing was previously stored.
EggUserData getUserData | ( | TypeHandle | type | ) | [inherited] |
Returns the user data pointer of the indicated type, if it exists, or NULL if it does not.
Point2D getUv | ( | ) |
Returns the texture coordinate pair, if get_num_dimensions() is 2.
Point3D const getUvw | ( | ) |
Returns the texture coordinate triple, if get_num_dimensions() is 3.
This is also legal to call if get_num_dimensions() is 2 (but the last dimension will be zero).
bool hasBinormal | ( | ) |
bool hasTangent | ( | ) |
bool hasUserData | ( | ) | [inherited] |
Returns true if a generic user data pointer has recently been set and not yet cleared, false otherwise.
bool hasUserData | ( | TypeHandle | type | ) | [inherited] |
Returns true if the user data pointer of the indicated type has been set, false otherwise.
bool hasW | ( | ) |
Returns true if the texture coordinate has a third, w component, false if it is just a normal 2-d texture coordinate.
EggVertexUV operator= | ( | EggVertexUV const | copy | ) |
output | ( | ostream | out | ) | [inherited] |
setBinormal | ( | Vec3D const | binormal | ) |
setName | ( | string | name | ) |
setTangent | ( | Vec3D const | tangent | ) |
setUserData | ( | EggUserData | user_data | ) | [inherited] |
Sets the user data associated with this object.
This may be any EggUserData-derived object. The egg library will do nothing with this pointer, except to hold its reference count and return the pointer on request.
The EggObject maintains multiple different EggUserData pointers, one for each unique type (as reported by get_type()). If you know that only one type of EggUserData object will be added in your application, you may use the query functions that accept no parameters, but it is recommended that in general you pass in the type of your particular user data, to allow multiple applications to coexist in the same egg data.
This pointer is also copied by the copy assignment operator and copy constructor.
setUv | ( | Point2D const | texCoord | ) |
Sets the texture coordinate pair.
This makes the texture coordinate a 2-d texture coordinate, which is the usual case.
setUvw | ( | Point3D const | texCoord | ) |
Sets the texture coordinate triple.
This makes the texture coordinate a 3-d texture coordinate.
transform | ( | Mat4D 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.
write | ( | ostream | out, |
int | indent_level | ||
) |