panda3d.egg.EggVertexUV

from panda3d.egg import 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

Inheritance diagram of EggVertexUV

__init__(copy: EggVertexUV) → None
__init__(name: str, uvw: LTexCoord3d) → None
__init__(name: str, uv: LTexCoordd) → None
assign(copy: EggVertexUV) → EggVertexUV
Return type

EggVertexUV

static filterName(name: str) → str

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.

setName(name: str) → None
getNumDimensions() → int

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).

hasW() → bool

Returns true if the texture coordinate has a third, w component, false if it is just a normal 2-d texture coordinate.

getUv() → LTexCoordd

Returns the texture coordinate pair, if getNumDimensions() is 2.

Return type

LTexCoordd

getUvw() → LTexCoord3d

Returns the texture coordinate triple, if getNumDimensions() is 3. This is also legal to call if getNumDimensions() is 2 (but the last dimension will be zero).

Return type

LTexCoord3d

setUv(texCoord: LTexCoordd) → None

Sets the texture coordinate pair. This makes the texture coordinate a 2-d texture coordinate, which is the usual case.

setUvw(texCoord: LTexCoord3d) → None

Sets the texture coordinate triple. This makes the texture coordinate a 3-d texture coordinate.

hasTangent() → bool
hasTangent4() → bool
getTangent() → LNormald
Return type

LNormald

getTangent4() → LVecBase4d
Return type

LVecBase4d

setTangent(tangent: LNormald) → None
setTangent4(tangent: LVecBase4d) → None

Sets the tangent vector, along with a fourth parameter that is multiplied with the result of cross(normal, tangent) when computing the binormal.

clearTangent() → None
hasBinormal() → bool
getBinormal() → LNormald
Return type

LNormald

setBinormal(binormal: LNormald) → None
clearBinormal() → None
static makeAverage(first: EggVertexUV, second: EggVertexUV) → EggVertexUV

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.

Return type

EggVertexUV

transform(mat: LMatrix4d) → None

Applies the indicated transformation matrix to the UV’s tangent and/or binormal. This does nothing if there is no tangent or binormal.

write(out: ostream, indent_level: int) → None
compareTo(other: EggVertexUV) → int

An ordering operator to compare two vertices for sorting order. This imposes an arbitrary ordering useful to identify unique vertices.

static getClassType() → TypeHandle
Return type

TypeHandle