Panda3D
Public Member Functions | Static Public Member Functions
LPoint3d Class Reference

This is a three-component point in space (as opposed to a three-component vector, which represents a direction and a distance). More...

#include "lpoint3.h"

Inheritance diagram for LPoint3d:
LVecBase3d

List of all members.

Public Member Functions

 LPoint3d (const LVecBase3d &copy)
 LPoint3d (double fill_value)
 LPoint3d (double x, double y, double z)
LPoint3d cross (const LVecBase3d &other) const
LPoint2d get_xy () const
 Returns a 2-component vector that shares just the first two components of this vector.
LPoint2d get_xz () const
 Returns a 2-component vector that shares just the first and last components of this vector.
LPoint2d get_yz () const
 Returns a 2-component vector that shares just the last two components of this vector.
LPoint3d operator* (double scalar) const
LVecBase3d operator+ (const LVecBase3d &other) const
LPoint3d operator+ (const LVector3d &other) const
LPoint3d operator- () const
LVecBase3d operator- (const LVecBase3d &other) const
LVector3d operator- (const LPoint3d &other) const
LPoint3d operator- (const LVector3d &other) const
LPoint3d operator/ (double scalar) const
LPoint3doperator= (const LVecBase3d &copy)
LPoint3doperator= (double fill_value)
LPoint3d project (const LVecBase3d &onto) const
 Returns a new vector representing the projection of this vector onto another one.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()
static LPoint3d origin (CoordinateSystem cs=CS_default)
 Returns the origin of the indicated coordinate system.
static LPoint3d rfu (double right, double fwd, double up, CoordinateSystem cs=CS_default)
 Returns a point described by right, forward, up displacements from the origin, wherever that maps to in the given coordinate system.
static const LPoint3dunit_x ()
 Returns a unit X point.
static const LPoint3dunit_y ()
 Returns a unit Y point.
static const LPoint3dunit_z ()
 Returns a unit Z point.
static const LPoint3dzero ()
 Returns a zero-length point.

Detailed Description

This is a three-component point in space (as opposed to a three-component vector, which represents a direction and a distance).

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.

Definition at line 502 of file lpoint3.h.


Member Function Documentation

LPoint2d LPoint3d::get_xy ( ) const [inline]

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

Reimplemented from LVecBase3d.

Definition at line 686 of file lpoint3.h.

LPoint2d LPoint3d::get_xz ( ) const [inline]

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

Reimplemented from LVecBase3d.

Definition at line 697 of file lpoint3.h.

LPoint2d LPoint3d::get_yz ( ) const [inline]

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

Reimplemented from LVecBase3d.

Definition at line 708 of file lpoint3.h.

LPoint3d LPoint3d::origin ( CoordinateSystem  cs = CS_default) [inline, static]

Returns the origin of the indicated coordinate system.

This is always 0, 0, 0 with all of our existing coordinate systems; it's hard to imagine it ever being different.

Definition at line 823 of file lpoint3.h.

LPoint3d LPoint3d::project ( const LVecBase3d onto) const [inline]

Returns a new vector representing the projection of this vector onto another one.

The resulting vector will be a scalar multiple of onto.

Reimplemented from LVecBase3d.

Definition at line 790 of file lpoint3.h.

LPoint3d LPoint3d::rfu ( double  right,
double  fwd,
double  up,
CoordinateSystem  cs = CS_default 
) [inline, static]

Returns a point described by right, forward, up displacements from the origin, wherever that maps to in the given coordinate system.

Definition at line 835 of file lpoint3.h.

const LPoint3d & LPoint3d::unit_x ( ) [inline, static]

Returns a unit X point.

Reimplemented from LVecBase3d.

Definition at line 655 of file lpoint3.h.

const LPoint3d & LPoint3d::unit_y ( ) [inline, static]

Returns a unit Y point.

Reimplemented from LVecBase3d.

Definition at line 665 of file lpoint3.h.

const LPoint3d & LPoint3d::unit_z ( ) [inline, static]

Returns a unit Z point.

Reimplemented from LVecBase3d.

Definition at line 675 of file lpoint3.h.

const LPoint3d & LPoint3d::zero ( ) [inline, static]

Returns a zero-length point.

Reimplemented from LVecBase3d.

Definition at line 645 of file lpoint3.h.

Referenced by MayaNodeTree::get_egg_group(), and EggVertex::get_uvw().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations