LVecBase2f¶
-
class LVecBase2f¶
This is the base class for all two-component vectors and points.
Inheritance diagram
digraph inheritance1e588d39f7 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "LVecBase2f" [URL="acron.core.LVecBase2f.html#acron.core.LVecBase2f",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "LVecBase2f" [arrowsize=0.75,style=""]; }- LVecBase2f.__add__()¶
- LVecBase2f.__ceil__()¶
- LVecBase2f.__div__()¶
- LVecBase2f.__eq__()¶
- LVecBase2f.__floor__()¶
- LVecBase2f.__floordiv__()¶
- LVecBase2f.__getattr__()¶
- LVecBase2f.__getbuffer__()¶
- LVecBase2f.__getitem__()¶
- LVecBase2f.__iadd__()¶
- LVecBase2f.__idiv__()¶
- LVecBase2f.__ifloordiv__()¶
- LVecBase2f.__imul__()¶
- LVecBase2f.__init__()¶
- LVecBase2f.__ipow__()¶
- LVecBase2f.__isub__()¶
- LVecBase2f.__lt__()¶
- LVecBase2f.__mul__()¶
- LVecBase2f.__ne__()¶
- LVecBase2f.__pow__()¶
- LVecBase2f.__reduce__()¶
- LVecBase2f.__repr__()¶
- LVecBase2f.__rmul__()¶
- LVecBase2f.__round__()¶
- LVecBase2f.__setattr__()¶
- LVecBase2f.__sub__()¶
- LVecBase2f.__sub__()¶
- LVecBase2f.add_hash()¶
Adds the vector into the running hash.
Adds the vector into the running hash.
- LVecBase2f.add_to_cell()¶
These next functions add to an existing value. i.e. foo.set_x(foo.get_x() + value) These are useful to reduce overhead in scripting languages:
- LVecBase2f.add_x()¶
- LVecBase2f.add_y()¶
- LVecBase2f.almost_equal()¶
Returns true if two vectors are memberwise equal within a specified tolerance.
Returns true if two vectors are memberwise equal within a default tolerance based on the numeric type.
- LVecBase2f.assign()¶
- LVecBase2f.compare_to()¶
This flavor of compare_to uses a default threshold value based on the numeric type.
Sorts vectors lexicographically, componentwise. Returns a number less than 0 if this vector sorts before the other one, greater than zero if it sorts after, 0 if they are equivalent (within the indicated tolerance).
- LVecBase2f.componentwise_mult()¶
- LVecBase2f.dot()¶
- LVecBase2f.fill()¶
Sets each element of the vector to the indicated fill_value. This is particularly useful for initializing to zero.
- LVecBase2f.fmax()¶
- LVecBase2f.fmin()¶
- LVecBase2f.generate_hash()¶
Adds the vector to the indicated hash generator.
Adds the vector to the indicated hash generator.
- LVecBase2f.get_cell()¶
- static LVecBase2f.get_class_type()¶
- static LVecBase2f.get_data()¶
Returns the address of the first of the two data elements in the vector. The next element occupies the next position consecutively in memory.
- LVecBase2f.get_hash()¶
Returns a suitable hash for phash_map.
Returns a suitable hash for phash_map.
- static LVecBase2f.get_num_components()¶
- LVecBase2f.get_x()¶
- LVecBase2f.get_y()¶
- LVecBase2f.is_nan()¶
Returns true if any component of the vector is not-a-number, false otherwise.
- LVecBase2f.length()¶
Returns the length of the vector, by the Pythagorean theorem.
- LVecBase2f.length_squared()¶
Returns the square of the vector’s length, cheap and easy.
- LVecBase2f.normalize()¶
Normalizes the vector in place. Returns true if the vector was normalized, false if it was a zero-length vector.
- LVecBase2f.normalized()¶
Normalizes the vector and returns the normalized vector as a copy. If the vector was a zero-length vector, a zero length vector will be returned.
- static LVecBase2f.operator_delete()¶
- static LVecBase2f.operator_delete()¶
- static LVecBase2f.operator_new()¶
- static LVecBase2f.operator_new()¶
- LVecBase2f.output()¶
- LVecBase2f.project()¶
Returns a new vector representing the projection of this vector onto another one. The resulting vector will be a scalar multiple of onto.
- LVecBase2f.read_datagram()¶
Reads the vector from the Datagram using get_stdfloat().
- LVecBase2f.read_datagram_fixed()¶
Reads the vector from the Datagram using get_float32() or get_float64(). See
write_datagram_fixed().
- LVecBase2f.set()¶
- LVecBase2f.set_cell()¶
- LVecBase2f.set_x()¶
- LVecBase2f.set_y()¶
- static LVecBase2f.size()¶
- static LVecBase2f.unit_x()¶
Returns a unit X vector.
- static LVecBase2f.unit_y()¶
Returns a unit Y vector.
- static LVecBase2f.validate_ptr()¶
- LVecBase2f.write_datagram()¶
Writes the vector to the Datagram using add_stdfloat(). This is appropriate when you want to write the vector using the standard width setting, especially when you are writing a bam file.
- LVecBase2f.write_datagram_fixed()¶
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(). This is appropriate when you want to write a fixed-width value to the datagram, especially when you are not writing a bam file.
- static LVecBase2f.zero()¶
Returns a zero-length vector.