#include <pyfbsdk.h>
Public Member Functions | |
| FBNormal () | |
| Default constructor. | |
| FBNormal (FBNormal pNormal) | |
| Copy constructor. | |
| FBNormal (float pX, float pY, float pZ) | |
| Constructor from components. | |
| FBNormal (object pObject) | |
| Constructor from a Python object with indexing support. | |
| FBNormal (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. | |
| FBNormal | __add__ (FBNormal pNormal) |
| Addition operator with another normal. | |
| FBNormal | __add__ (float pScalar) |
| Addition operator with a scalar. | |
| FBNormal | __sub__ (FBNormal pNormal) |
| Subtraction operator with another normal. | |
| FBNormal | __sub__ (float pScalar) |
| Subtraction operator with a scalar. | |
| FBNormal | __mul__ (FBNormal pNormal) |
| Multiplication operator with another normal (component-wise). | |
| FBNormal | __mul__ (float pScalar) |
| Multiplication operator with a scalar. | |
| FBNormal | __div__ (FBNormal pNormal) |
| Division operator with another normal (component-wise). | |
| FBNormal | __div__ (float pScalar) |
| Division operator with a scalar. | |
| FBNormal | __iadd__ (FBNormal pNormal) |
| In-place addition with another normal. | |
| FBNormal | __iadd__ (float pScalar) |
| In-place addition with a scalar. | |
| FBNormal | __isub__ (FBNormal pNormal) |
| In-place subtraction with another normal. | |
| FBNormal | __isub__ (float pScalar) |
| In-place subtraction with a scalar. | |
| FBNormal | __imul__ (FBNormal pNormal) |
| In-place multiplication with another normal (component-wise). | |
| FBNormal | __imul__ (float pScalar) |
| In-place multiplication with a scalar. | |
| FBNormal | __idiv__ (FBNormal pNormal) |
| In-place division with another normal (component-wise). | |
| FBNormal | __idiv__ (float pScalar) |
| In-place division with a scalar. | |
| FBNormal | __neg__ () |
| Unary negation operator. | |
| FBNormal | CopyFrom (FBNormal pNormal) |
| Copy values from another normal. | |
| FBNormal | CopyFrom (list pList) |
| Copy values from a list. | |
| bool | NotEqual (FBNormal pNormal) |
| Compare for inequality. | |
| bool | IsEqual (FBNormal pNormal) |
| Compare for equality. | |
| float | Length () |
| Get the length (magnitude) of the normal. | |
| float | SquareLength () |
| Get the squared length of the normal. | |
| FBNormal | Normalize () |
| Normalize the vector (make it unit length). | |
| float | DotProduct (FBNormal pNormal) |
| Calculate the dot product with another normal. | |
| FBNormal | CrossProduct (FBNormal pNormal) |
| Calculate the cross product with another normal. | |
| int | GetBufferAddress () |
| Get the buffer address for the normal data. | |
| list | GetList () |
| Get the normal as a list. | |
FBNormal class.
A normal vector used to define the orientation of a surface. This class stores normal data as 3 float values (x, y, z).
| FBNormal | ( | ) |
Default constructor.
Initializes to (0, 0, 0).
Referenced by __add__(), __add__(), __div__(), __div__(), __iadd__(), __iadd__(), __idiv__(), __idiv__(), __imul__(), __imul__(), __isub__(), __isub__(), __mul__(), __mul__(), __neg__(), __sub__(), __sub__(), CopyFrom(), CopyFrom(), CrossProduct(), DotProduct(), FBNormal(), IsEqual(), Normalize(), and NotEqual().
Constructor from components.
| pX | X component. |
| pY | Y component. |
| pZ | Z component. |
Constructor from a Python object with indexing support.
| pObject | Object with len and indexing support containing 3 float values. |
Addition operator with another normal.
Corresponds to python: n1 + n2
| pNormal | Normal to add. |
References FBNormal().
Addition operator with a scalar.
Corresponds to python: n + 2.0
| pScalar | Scalar value to add to each component. |
References FBNormal().
Division operator with another normal (component-wise).
Corresponds to python: n1 / n2
| pNormal | Normal to divide by. |
References FBNormal().
Division operator with a scalar.
Corresponds to python: n / 2.0
| pScalar | Scalar value to divide each component by. |
References FBNormal().
Returns the ith component.
Corresponds to python: print n[1]
| pIndex | Index of the component to get (0 to 2). |
In-place addition with another normal.
Corresponds to python: n1 += n2
| pNormal | Normal to add. |
References FBNormal().
In-place addition with a scalar.
Corresponds to python: n += 2.0
| pScalar | Scalar value to add to each component. |
References FBNormal().
In-place division with another normal (component-wise).
Corresponds to python: n1 /= n2
| pNormal | Normal to divide by. |
References FBNormal().
In-place division with a scalar.
Corresponds to python: n /= 2.0
| pScalar | Scalar value to divide each component by. |
References FBNormal().
In-place multiplication with another normal (component-wise).
Corresponds to python: n1 *= n2
| pNormal | Normal to multiply. |
References FBNormal().
In-place multiplication with a scalar.
Corresponds to python: n *= 2.0
| pScalar | Scalar value to multiply each component. |
References FBNormal().
In-place subtraction with another normal.
Corresponds to python: n1 -= n2
| pNormal | Normal to subtract. |
References FBNormal().
In-place subtraction with a scalar.
Corresponds to python: n -= 2.0
| pScalar | Scalar value to subtract from each component. |
References FBNormal().
| int __len__ | ( | ) |
Returns the number of elements.
Corresponds to python: len(object)
Multiplication operator with another normal (component-wise).
Corresponds to python: n1 * n2
| pNormal | Normal to multiply. |
References FBNormal().
Multiplication operator with a scalar.
Corresponds to python: n * 2.0
| pScalar | Scalar value to multiply each component. |
References FBNormal().
| FBNormal __neg__ | ( | ) |
Unary negation operator.
Corresponds to python: -n
References FBNormal().
| str __repr__ | ( | ) |
Representation for debugging.
Corresponds to python: repr(n)
Sets the ith component.
Corresponds to python: n[1] = 0.5
| pIndex | Index of the component to set (0 to 2). |
| pValue | Value of the normal component. |
| str __str__ | ( | ) |
String representation.
Corresponds to python: str(n) or print(n)
Subtraction operator with another normal.
Corresponds to python: n1 - n2
| pNormal | Normal to subtract. |
References FBNormal().
Subtraction operator with a scalar.
Corresponds to python: n - 2.0
| pScalar | Scalar value to subtract from each component. |
References FBNormal().
Copy values from another normal.
| pNormal | Normal to copy from. |
References FBNormal().
Copy values from a list.
| pList | List of 4 float values. |
References FBNormal().
Calculate the cross product with another normal.
| pNormal | Normal to calculate cross product with. |
References FBNormal().
Calculate the dot product with another normal.
| pNormal | Normal to calculate dot product with. |
References FBNormal().
| int GetBufferAddress | ( | ) |
Get the buffer address for the normal data.
| list GetList | ( | ) |
Get the normal as a list.
Compare for equality.
| pNormal | Normal to compare with. |
References FBNormal().
| float Length | ( | ) |
Get the length (magnitude) of the normal.
| FBNormal Normalize | ( | ) |
Normalize the vector (make it unit length).
References FBNormal().
Compare for inequality.
| pNormal | Normal to compare with. |
References FBNormal().