Python Reference Guide
 
Loading...
Searching...
No Matches
FBUV Class Reference

FBUV class. More...

#include <pyfbsdk.h>

Public Member Functions

 FBUV ()
 Default constructor.
 
 FBUV (FBUV pUV)
 Copy constructor.
 
 FBUV (float pU, float pV)
 Constructor from components.
 
 FBUV (object pObject)
 Constructor from a Python object with indexing support.
 
 FBUV (list pList)
 Constructor from list.
 
int __len__ ()
 Returns the number of elements.
 
float __getitem__ (int pIndex)
 Returns the ith component.
 
void __setitem__ (int pIndex, float pValue)
 Sets the ith component.
 
str __repr__ ()
 Representation for debugging.
 
str __str__ ()
 String representation.
 
FBUV __add__ (FBUV pUV)
 Addition operator with another UV.
 
FBUV __add__ (float pScalar)
 Addition operator with a scalar.
 
FBUV __sub__ (FBUV pUV)
 Subtraction operator with another UV.
 
FBUV __sub__ (float pScalar)
 Subtraction operator with a scalar.
 
FBUV __mul__ (FBUV pUV)
 Multiplication operator with another UV (component-wise).
 
FBUV __mul__ (float pScalar)
 Multiplication operator with a scalar.
 
FBUV __div__ (FBUV pUV)
 Division operator with another UV (component-wise).
 
FBUV __div__ (float pScalar)
 Division operator with a scalar.
 
FBUV __iadd__ (FBUV pUV)
 In-place addition with another UV.
 
FBUV __iadd__ (float pScalar)
 In-place addition with a scalar.
 
FBUV __isub__ (FBUV pUV)
 In-place subtraction with another UV.
 
FBUV __isub__ (float pScalar)
 In-place subtraction with a scalar.
 
FBUV __imul__ (FBUV pUV)
 In-place multiplication with another UV (component-wise).
 
FBUV __imul__ (float pScalar)
 In-place multiplication with a scalar.
 
FBUV __idiv__ (FBUV pUV)
 In-place division with another UV (component-wise).
 
FBUV __idiv__ (float pScalar)
 In-place division with a scalar.
 
FBUV __neg__ ()
 Unary negation operator.
 
FBUV CopyFrom (FBUV pUV)
 Copy values from another UV.
 
FBUV CopyFrom (list pList)
 Copy values from a list.
 
bool NotEqual (FBUV pUV)
 Compare for inequality.
 
bool IsEqual (FBUV pUV)
 Compare for equality.
 
int GetBufferAddress ()
 Get the buffer address for the UV data.
 
list GetList ()
 Get the UV as a list.
 

Detailed Description

FBUV class.

Represents a UV texture coordinate as 2 float values. Value 0 is the U coordinate and value 1 is the V coordinate. Values are typically in the range of 0.0 to 1.0.

Warning
Slicing is not supported by this object.

Constructor & Destructor Documentation

◆ FBUV() [1/5]

◆ FBUV() [2/5]

FBUV ( FBUV pUV)

Copy constructor.

Parameters
pUVUV to copy.

References FBUV().

◆ FBUV() [3/5]

FBUV ( float pU,
float pV )

Constructor from components.

Parameters
pUU coordinate.
pVV coordinate.

◆ FBUV() [4/5]

FBUV ( object pObject)

Constructor from a Python object with indexing support.

Parameters
pObjectObject with len and indexing support containing 2 float values.

◆ FBUV() [5/5]

FBUV ( list pList)

Constructor from list.

Parameters
pListList of 2 float values.

Member Function Documentation

◆ __add__() [1/2]

FBUV __add__ ( FBUV pUV)

Addition operator with another UV.

Corresponds to python: uv1 + uv2

Parameters
pUVUV to add.
Returns
A new FBUV with the result.

References FBUV().

◆ __add__() [2/2]

FBUV __add__ ( float pScalar)

Addition operator with a scalar.

Corresponds to python: uv + 2.0

Parameters
pScalarScalar value to add to each component.
Returns
A new FBUV with the result.

References FBUV().

◆ __div__() [1/2]

FBUV __div__ ( FBUV pUV)

Division operator with another UV (component-wise).

Corresponds to python: uv1 / uv2

Parameters
pUVUV to divide by.
Returns
A new FBUV with the result.

References FBUV().

◆ __div__() [2/2]

FBUV __div__ ( float pScalar)

Division operator with a scalar.

Corresponds to python: uv / 2.0

Parameters
pScalarScalar value to divide each component by.
Returns
A new FBUV with the result.

References FBUV().

◆ __getitem__()

float __getitem__ ( int pIndex)

Returns the ith component.

Corresponds to python: print uv[1]

Parameters
pIndexIndex of the component to get (0 or 1).
Returns
UV component value.

◆ __iadd__() [1/2]

FBUV __iadd__ ( FBUV pUV)

In-place addition with another UV.

Corresponds to python: uv1 += uv2

Parameters
pUVUV to add.
Returns
Self.

References FBUV().

◆ __iadd__() [2/2]

FBUV __iadd__ ( float pScalar)

In-place addition with a scalar.

Corresponds to python: uv += 2.0

Parameters
pScalarScalar value to add to each component.
Returns
Self.

References FBUV().

◆ __idiv__() [1/2]

FBUV __idiv__ ( FBUV pUV)

In-place division with another UV (component-wise).

Corresponds to python: uv1 /= uv2

Parameters
pUVUV to divide by.
Returns
Self.

References FBUV().

◆ __idiv__() [2/2]

FBUV __idiv__ ( float pScalar)

In-place division with a scalar.

Corresponds to python: uv /= 2.0

Parameters
pScalarScalar value to divide each component by.
Returns
Self.

References FBUV().

◆ __imul__() [1/2]

FBUV __imul__ ( FBUV pUV)

In-place multiplication with another UV (component-wise).

Corresponds to python: uv1 *= uv2

Parameters
pUVUV to multiply.
Returns
Self.

References FBUV().

◆ __imul__() [2/2]

FBUV __imul__ ( float pScalar)

In-place multiplication with a scalar.

Corresponds to python: uv *= 2.0

Parameters
pScalarScalar value to multiply each component.
Returns
Self.

References FBUV().

◆ __isub__() [1/2]

FBUV __isub__ ( FBUV pUV)

In-place subtraction with another UV.

Corresponds to python: uv1 -= uv2

Parameters
pUVUV to subtract.
Returns
Self.

References FBUV().

◆ __isub__() [2/2]

FBUV __isub__ ( float pScalar)

In-place subtraction with a scalar.

Corresponds to python: uv -= 2.0

Parameters
pScalarScalar value to subtract from each component.
Returns
Self.

References FBUV().

◆ __len__()

int __len__ ( )

Returns the number of elements.

Corresponds to python: len(object)

Returns
Number of elements (2).

◆ __mul__() [1/2]

FBUV __mul__ ( FBUV pUV)

Multiplication operator with another UV (component-wise).

Corresponds to python: uv1 * uv2

Parameters
pUVUV to multiply.
Returns
A new FBUV with the result.

References FBUV().

◆ __mul__() [2/2]

FBUV __mul__ ( float pScalar)

Multiplication operator with a scalar.

Corresponds to python: uv * 2.0

Parameters
pScalarScalar value to multiply each component.
Returns
A new FBUV with the result.

References FBUV().

◆ __neg__()

FBUV __neg__ ( )

Unary negation operator.

Corresponds to python: -uv

Returns
A new FBUV with negated components.

References FBUV().

◆ __repr__()

str __repr__ ( )

Representation for debugging.

Corresponds to python: repr(uv)

Returns
String representation for debugging.

◆ __setitem__()

void __setitem__ ( int pIndex,
float pValue )

Sets the ith component.

Corresponds to python: uv[1] = 0.5

Parameters
pIndexIndex of the component to set (0 or 1).
pValueValue of the UV component.

◆ __str__()

str __str__ ( )

String representation.

Corresponds to python: str(uv) or print(uv)

Returns
String representation of the UV.

◆ __sub__() [1/2]

FBUV __sub__ ( FBUV pUV)

Subtraction operator with another UV.

Corresponds to python: uv1 - uv2

Parameters
pUVUV to subtract.
Returns
A new FBUV with the result.

References FBUV().

◆ __sub__() [2/2]

FBUV __sub__ ( float pScalar)

Subtraction operator with a scalar.

Corresponds to python: uv - 2.0

Parameters
pScalarScalar value to subtract from each component.
Returns
A new FBUV with the result.

References FBUV().

◆ CopyFrom() [1/2]

FBUV CopyFrom ( FBUV pUV)

Copy values from another UV.

Parameters
pUVUV to copy from.
Returns
A new FBUV with copied values.

References FBUV().

◆ CopyFrom() [2/2]

FBUV CopyFrom ( list pList)

Copy values from a list.

Parameters
pListList of 2 float values.
Returns
A new FBUV with copied values.

References FBUV().

◆ GetBufferAddress()

int GetBufferAddress ( )

Get the buffer address for the UV data.

Returns
Buffer address as an integer.

◆ GetList()

list GetList ( )

Get the UV as a list.

Returns
List of 2 float values.

◆ IsEqual()

bool IsEqual ( FBUV pUV)

Compare for equality.

Parameters
pUVUV to compare with.
Returns
True if UVs are equal.

References FBUV().

◆ NotEqual()

bool NotEqual ( FBUV pUV)

Compare for inequality.

Parameters
pUVUV to compare with.
Returns
True if UVs are not equal.

References FBUV().