LVector3d

from panda3d.core import LVector3d
class LVector3d

Bases:

Bases: LVecBase3d

This is a three-component vector distance (as opposed to a three-component point, which represents a particular point in space). Some of the methods are slightly different between LPoint3 and LVector3; in particular, subtraction of two points yields a vector, while addition of a vector and a point yields a point.

Inheritance diagram

Inheritance diagram of LVector3d

__add__(other: LVecBase3d) LVecBase3d
__add__(other: LVector3d) LVector3d
__div__(scalar: float) LVector3d
__getattr__(attr_name: str) object
__init__()
__init__(copy: LVecBase2d, z: float)
__init__(copy: LVecBase3d)
__init__(param0: LVector3d)
__init__(fill_value: float)
__init__(x: float, y: float, z: float)
__mul__(scalar: float) LVector3d
__repr__() str
__rmul__(scalar: float) LVector3d
__setattr__(attr_name: str, assign: object) int
__sub__(other: LVecBase3d) LVecBase3d
__sub__(other: LVector3d) LVector3d
__sub__(other: LVecBase3d) LVecBase3d
__sub__(other: LVector3d) LVector3d
angle_deg(other: LVector3d) float

Returns the angle between this vector and the other one, expressed in degrees. Both vectors should be initially normalized.

angle_rad(other: LVector3d) float

Returns the unsigned angle between this vector and the other one, expressed in radians. Both vectors should be initially normalized.

static back(cs: CoordinateSystem) LVector3d

Returns the back vector for the given coordinate system.

cross(other: LVecBase3d) LVector3d
static down(cs: CoordinateSystem) LVector3d

Returns the down vector for the given coordinate system.

static forward(cs: CoordinateSystem) LVector3d

Returns the forward vector for the given coordinate system.

static get_class_type() TypeHandle
get_xy() LVector2d

Returns a 2-component vector that shares just the first two components of this vector.

get_xz() LVector2d

Returns a 2-component vector that shares just the first and last components of this vector.

get_yz() LVector2d

Returns a 2-component vector that shares just the last two components of this vector.

static left(cs: CoordinateSystem) LVector3d

Returns the left vector for the given coordinate system.

normalized() LVector3d

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.

project(onto: LVecBase3d) LVector3d

Returns a new vector representing the projection of this vector onto another one. The resulting vector will be a scalar multiple of onto.

relative_angle_deg(other: LVector3d) float

Deprecated: Do not use.

relative_angle_rad(other: LVector3d) float

Deprecated: Do not use.

static rfu(right: float, fwd: float, up: float, cs: CoordinateSystem) LVector3d

Returns a vector that is described by its right, forward, and up components, in whatever way the coordinate system represents that vector.

static right(cs: CoordinateSystem) LVector3d

Returns the right vector for the given coordinate system.

signed_angle_deg(other: LVector3d, ref: LVector3d) float

Returns the signed angle between two vectors. The angle is positive if the rotation from this vector to other is clockwise when looking in the direction of the ref vector.

Vectors (except the ref vector) should be initially normalized.

signed_angle_rad(other: LVector3d, ref: LVector3d) float

returns the signed angle between two vectors. The angle is positive if the rotation from this vector to other is clockwise when looking in the direction of the ref vector.

Vectors (except the ref vector) should be initially normalized.

static unit_x() LVector3d

Returns a unit X vector.

static unit_y() LVector3d

Returns a unit Y vector.

static unit_z() LVector3d

Returns a unit Z vector.

static up(cs: CoordinateSystem) LVector3d

Returns the up vector for the given coordinate system.

property xy LVector2d

Returns a 2-component vector that shares just the first two components of this vector.

property xz LVector2d

Returns a 2-component vector that shares just the first and last components of this vector.

property yz LVector2d

Returns a 2-component vector that shares just the last two components of this vector.

static zero() LVector3d

Returns a zero-length vector.