LVecBase3f
from panda3d.core import LVecBase3f
- class LVecBase3f
- Bases: - DTOOL_SUPER_BASE- This is the base class for all three-component vectors and points. - Inheritance diagram - Ceil()
- C++ Interface: __ceil__(const LVecBase3f self) 
 - Floor()
- C++ Interface: __floor__(const LVecBase3f self) 
 - Round()
- C++ Interface: __round__(const LVecBase3f self) 
 - __init__(*args, **kwargs)
 - addHash()
- C++ Interface: add_hash(LVecBase3f self, int hash) add_hash(LVecBase3f self, int hash, float threshold) 
 - addToCell()
- C++ Interface: add_to_cell(const LVecBase3f self, int i, float value) - // 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: - /**
- */ 
 
 - add_hash()
- C++ Interface: add_hash(LVecBase3f self, int hash) add_hash(LVecBase3f self, int hash, float threshold) 
 - add_to_cell()
- C++ Interface: add_to_cell(const LVecBase3f self, int i, float value) - // 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: - /**
- */ 
 
 - almostEqual()
- C++ Interface: almost_equal(LVecBase3f self, const LVecBase3f other) almost_equal(LVecBase3f self, const LVecBase3f other, float threshold) 
 - almost_equal()
- C++ Interface: almost_equal(LVecBase3f self, const LVecBase3f other) almost_equal(LVecBase3f self, const LVecBase3f other, float threshold) 
 - asTuple(self)
- Returns the vector as a tuple. 
 - assign()
- C++ Interface: assign(const LVecBase3f self, const LVecBase3f copy) assign(const LVecBase3f self, float fill_value) 
 - compareTo()
- C++ Interface: compare_to(LVecBase3f self, const LVecBase3f other) compare_to(LVecBase3f self, const LVecBase3f other, float threshold) - /**
- 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). 
 - */ 
 
 - compare_to()
- C++ Interface: compare_to(LVecBase3f self, const LVecBase3f other) compare_to(LVecBase3f self, const LVecBase3f other, float threshold) - /**
- 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). 
 - */ 
 
 - componentwiseMult()
- C++ Interface: componentwise_mult(const LVecBase3f self, const LVecBase3f other) - /**
- */ 
 
 - componentwise_mult()
- C++ Interface: componentwise_mult(const LVecBase3f self, const LVecBase3f other) - /**
- */ 
 
 - fill()
- C++ Interface: fill(const LVecBase3f self, float fill_value) - /**
- Sets each element of the vector to the indicated fill_value. This is 
- particularly useful for initializing to zero. 
 - */ 
 
 - getClassType()
- C++ Interface: get_class_type() 
 - getHash()
- C++ Interface: get_hash(LVecBase3f self) get_hash(LVecBase3f self, float threshold) 
 - getNumComponents()
- C++ Interface: get_num_components() 
 - getStandardizedHpr()
- C++ Interface: get_standardized_hpr(LVecBase3f self) - /**
- Try to un-spin the hpr to a standard form. Like all standards, someone 
- decides between many arbitrary possible standards. This function assumes 
- that 0 and 360 are the same, as is 720 and -360. Also 180 and -180 are the 
- same. Another example is -90 and 270. Each element will be in the range 
- -180.0 to 179.99999. The original usage of this function is for human 
- readable output. 
- It doesn’t work so well for asserting that foo_hpr is roughly equal to 
- bar_hpr. Try using LQuaternionf::is_same_direction() for that. See Also: 
- get_standardized_rotation, LQuaternion::is_same_direction 
 - */ 
 
 - getXy()
- C++ Interface: get_xy(LVecBase3f self) - /**
- Returns a 2-component vector that shares just the first two components of 
- this vector. 
 - */ 
 
 - getXz()
- C++ Interface: get_xz(LVecBase3f self) - /**
- Returns a 2-component vector that shares just the first and last components 
- of this vector. 
 - */ 
 
 - getYz()
- C++ Interface: get_yz(LVecBase3f self) - /**
- Returns a 2-component vector that shares just the last two components of 
- this vector. 
 - */ 
 
 - get_class_type()
- C++ Interface: get_class_type() 
 - get_hash()
- C++ Interface: get_hash(LVecBase3f self) get_hash(LVecBase3f self, float threshold) 
 - get_num_components()
- C++ Interface: get_num_components() 
 - get_standardized_hpr()
- C++ Interface: get_standardized_hpr(LVecBase3f self) - /**
- Try to un-spin the hpr to a standard form. Like all standards, someone 
- decides between many arbitrary possible standards. This function assumes 
- that 0 and 360 are the same, as is 720 and -360. Also 180 and -180 are the 
- same. Another example is -90 and 270. Each element will be in the range 
- -180.0 to 179.99999. The original usage of this function is for human 
- readable output. 
- It doesn’t work so well for asserting that foo_hpr is roughly equal to 
- bar_hpr. Try using LQuaternionf::is_same_direction() for that. See Also: 
- get_standardized_rotation, LQuaternion::is_same_direction 
 - */ 
 
 - get_xy()
- C++ Interface: get_xy(LVecBase3f self) - /**
- Returns a 2-component vector that shares just the first two components of 
- this vector. 
 - */ 
 
 - get_xz()
- C++ Interface: get_xz(LVecBase3f self) - /**
- Returns a 2-component vector that shares just the first and last components 
- of this vector. 
 - */ 
 
 - get_yz()
- C++ Interface: get_yz(LVecBase3f self) - /**
- Returns a 2-component vector that shares just the last two components of 
- this vector. 
 - */ 
 
 - isNan()
- C++ Interface: is_nan(LVecBase3f self) - /**
- Returns true if any component of the vector is not-a-number, false 
- otherwise. 
 - */ 
 
 - is_int = 0
 - is_nan()
- C++ Interface: is_nan(LVecBase3f self) - /**
- Returns true if any component of the vector is not-a-number, false 
- otherwise. 
 - */ 
 
 - length()
- C++ Interface: length(LVecBase3f self) - /**
- Returns the length of the vector, by the Pythagorean theorem. 
 - */ 
 
 - lengthSquared()
- C++ Interface: length_squared(LVecBase3f self) - /**
- Returns the square of the vector’s length, cheap and easy. 
 - */ 
 
 - length_squared()
- C++ Interface: length_squared(LVecBase3f self) - /**
- Returns the square of the vector’s length, cheap and easy. 
 - */ 
 
 - normalize()
- C++ Interface: normalize(const LVecBase3f self) - /**
- Normalizes the vector in place. Returns true if the vector was normalized, 
- false if it was a zero-length vector. 
 - */ 
 
 - normalized()
- C++ Interface: normalized(LVecBase3f self) - /**
- 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. 
 - */ 
 
 - num_components = 3
 - pPrintValues(self)
- Pretty print 
 - project()
- C++ Interface: project(LVecBase3f self, const LVecBase3f onto) - /**
- Returns a new vector representing the projection of this vector onto 
- another one. The resulting vector will be a scalar multiple of onto. 
 - */ 
 
 - readDatagram()
- C++ Interface: read_datagram(const LVecBase3f self, DatagramIterator source) - /**
- Reads the vector from the Datagram using get_stdfloat(). 
 - */ 
 
 - readDatagramFixed()
- C++ Interface: read_datagram_fixed(const LVecBase3f self, DatagramIterator source) - /**
- Reads the vector from the Datagram using get_float32() or get_float64(). 
- See write_datagram_fixed(). 
 - */ 
 
 - read_datagram()
- C++ Interface: read_datagram(const LVecBase3f self, DatagramIterator source) - /**
- Reads the vector from the Datagram using get_stdfloat(). 
 - */ 
 
 - read_datagram_fixed()
- C++ Interface: read_datagram_fixed(const LVecBase3f self, DatagramIterator source) - /**
- Reads the vector from the Datagram using get_float32() or get_float64(). 
- See write_datagram_fixed(). 
 - */ 
 
 - writeDatagram()
- C++ Interface: write_datagram(LVecBase3f self, Datagram destination) - /**
- 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. 
 - */ 
 
 - writeDatagramFixed()
- C++ Interface: write_datagram_fixed(LVecBase3f self, 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(). This is appropriate when you want to 
- write a fixed-width value to the datagram, especially when you are not 
- writing a bam file. 
 - */ 
 
 - write_datagram()
- C++ Interface: write_datagram(LVecBase3f self, Datagram destination) - /**
- 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. 
 - */ 
 
 - write_datagram_fixed()
- C++ Interface: write_datagram_fixed(LVecBase3f self, 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(). This is appropriate when you want to 
- write a fixed-width value to the datagram, especially when you are not 
- writing a bam file. 
 - */ 
 
 - x
 - xy
 - xz
 - y
 - yz
 - z
 
