Public Member Functions |
| | VBase2 () |
| | VBase2 (VBase2 const copy) |
| | VBase2 (float x, float y) |
| | VBase2 (float fill_value) |
| unsigned int | addHash (unsigned int hash) |
| | Adds the vector into the running hash.
|
| unsigned int | addHash (unsigned int hash, float threshold) |
| | Adds the vector into the running hash.
|
| | addToCell (int i, float value) |
| | addX (float value) |
| | addY (float value) |
| bool | almostEqual (VBase2 const other) |
| | Returns true if two vectors are memberwise equal within a default tolerance based on the numeric type.
|
| bool | almostEqual (VBase2 const other, float threshold) |
| | Returns true if two vectors are memberwise equal within a specified tolerance.
|
| int | compareTo (VBase2 const other) |
| | This flavor of compare_to uses a default threshold value based on the numeric type.
|
| int | compareTo (VBase2 const other, float threshold) |
| | Sorts vectors lexicographically, componentwise.
|
| float | dot (VBase2 const other) |
| | fill (float fill_value) |
| | Sets each element of the vector to the indicated fill_value.
|
| VBase2 | fmax (VBase2 const other) |
| VBase2 | fmin (VBase2 const other) |
| | generateHash (ChecksumHashGenerator hashgen) |
| | Adds the vector to the indicated hash generator.
|
| | generateHash (ChecksumHashGenerator hashgen, float threshold) |
| | Adds the vector to the indicated hash generator.
|
| PyObject | getattr (string attr_name) |
| float | getCell (int i) |
| | getData () |
| | Returns the address of the first of the two data elements in the vector.
|
| unsigned int | getHash () |
| | Returns a suitable hash for phash_map.
|
| unsigned int | getHash (float threshold) |
| | Returns a suitable hash for phash_map.
|
| int | getNumComponents () |
| | Returns the number of elements in the vector, two.
|
| float | getX () |
| float | getY () |
| bool | isNan () |
| | Returns true if any component of the vector is not-a-number, false otherwise.
|
| float | length () |
| | Returns the length of the vector, by the Pythagorean theorem.
|
| float | lengthSquared () |
| | Returns the square of the vector's length, cheap and easy.
|
| bool | normalize () |
| | Normalizes the vector in place.
|
| | operator new (unsigned int size) |
| bool | operator!= (VBase2 const other) |
| VBase2 | operator* (float scalar) |
| VBase2 | operator*= (float scalar) |
| VBase2 | operator+ (VBase2 const other) |
| VBase2 | operator+= (VBase2 const other) |
| VBase2 | operator- () |
| VBase2 | operator- (VBase2 const other) |
| VBase2 | operator-= (VBase2 const other) |
| VBase2 | operator/ (float scalar) |
| VBase2 | operator/= (float scalar) |
| bool | operator< (VBase2 const other) |
| | This performs a lexicographical comparison.
|
| VBase2 | operator= (VBase2 const copy) |
| VBase2 | operator= (float fill_value) |
| bool | operator== (VBase2 const other) |
| | operator[] (int i) |
| float | operator[] (int i) |
| | output (ostream out) |
| VBase2 | project (VBase2 const onto) |
| | Returns a new vector representing the projection of this vector onto another one.
|
| | pythonRepr (ostream out, string class_name) |
| | readDatagram (DatagramIterator source) |
| | Reads the vector from the Datagram using get_stdfloat().
|
| | readDatagramFixed (DatagramIterator source) |
| | Reads the vector from the Datagram using get_float32() or get_float64().
|
| PyObject | reduce (PyObject self) |
| | set (float x, float y) |
| int | setattr (PyObject self, string attr_name, PyObject assign) |
| | setCell (int i, float value) |
| | setitem (int i, float v) |
| | setX (float value) |
| | setY (float value) |
| | writeDatagram (Datagram destination) |
| | Writes the vector to the Datagram using add_stdfloat().
|
| | writeDatagramFixed (Datagram destination) |
| | Writes the vector to the Datagram using add_float32() or add_float64(), depending on the type of floats in the vector, regardless of the setting of Datagram.set_stdfloat_double().
|
Static Public Member Functions |
| static TypeHandle | getClassType () |
| static int | size () |
| | Returns 2: the number of components of a LVecBase2.
|
| static VBase2 const | unitX () |
| | Returns a unit X vector.
|
| static VBase2 const | unitY () |
| | Returns a unit Y vector.
|
| static VBase2 const | zero () |
| | Returns a zero-length vector.
|
This is the base class for all two-component vectors and points.