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