Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# Point3D 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...

Inheritance diagram for Point3D:

List of all members.

## Public Member Functions
| Point3D ()
| Point3D (VBase3D const copy)
| Point3D (double x, double y, double z)
| Point3D (double fill_value)
Point3D | cross (VBase3D const other)
PyObject | getattr (string attr_name)
Point2D | getXy ()
| Returns a 2-component vector that shares just the first two components of this vector.
Point2D | getXz ()
| Returns a 2-component vector that shares just the first and last components of this vector.
Point2D | getYz ()
| Returns a 2-component vector that shares just the last two components of this vector.
Point3D | operator* (double scalar)
VBase3D | operator+ (VBase3D const other)
Point3D | operator+ (Vec3D const other)
VBase3D | operator- (VBase3D const other)
Point3D | operator- (Vec3D const other)
Vec3D | operator- (Point3D const other)
Point3D | operator- ()
Point3D | operator/ (double scalar)
Point3D | operator= (VBase3D const copy)
Point3D | operator= (double fill_value)
Point3D | project (VBase3D const onto)
| Returns a new vector representing the projection of this vector onto another one.
| pythonRepr (ostream out, string class_name)
int | setattr (PyObject self, string attr_name, PyObject assign)
## Static Public Member Functions
static TypeHandle | getClassType ()
static Point3D | origin (CoordinateSystem cs)
| Returns the origin of the indicated coordinate system.
static Point3D | origin ()
| Returns the origin of the indicated coordinate system.
static Point3D | rfu (double right, double fwd, double up)
| Returns a point described by right, forward, up displacements from the origin, wherever that maps to in the given coordinate system.
static Point3D | rfu (double right, double fwd, double up, CoordinateSystem cs)
| Returns a point described by right, forward, up displacements from the origin, wherever that maps to in the given coordinate system.
static Point3D const | unitX ()
| Returns a unit X point.
static Point3D const | unitY ()
| Returns a unit Y point.
static Point3D const | unitZ ()
| Returns a unit Z point.
static Point3D const | zero ()
| 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.

## Constructor & Destructor Documentation

Point3D | ( |  | ) |

Point3D | ( | VBase3D const | copy | ) |

Point3D | ( | double | fill_value | ) |

Point3D | ( | double | x,
|  | double | y,
|  | double | z
| ) |  |

## Member Function Documentation

Point3D cross | ( | VBase3D const | other | ) |

Reimplemented from VBase3D.

PyObject getattr | ( | string | attr_name | ) |

Reimplemented from VBase3D.

static TypeHandle getClassType | ( |  | ) | `[static]`

Reimplemented from VBase3D.

Point2D getXy | ( |  | ) |

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

Reimplemented from VBase3D.

Point2D getXz | ( |  | ) |

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

Reimplemented from VBase3D.

Point2D getYz | ( |  | ) |

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

Reimplemented from VBase3D.

Point3D operator* | ( | double | scalar | ) |

Reimplemented from VBase3D.

VBase3D operator+ | ( | VBase3D const | other | ) |

Reimplemented from VBase3D.

Point3D operator+ | ( | Vec3D const | other | ) |

Point3D operator- | ( | Vec3D const | other | ) |

VBase3D operator- | ( | VBase3D const | other | ) |

Reimplemented from VBase3D.

Point3D operator- | ( |  | ) |

Reimplemented from VBase3D.

Vec3D operator- | ( | Point3D const | other | ) |

Point3D operator/ | ( | double | scalar | ) |

Reimplemented from VBase3D.

Point3D operator= | ( | VBase3D const | copy | ) |

Reimplemented from VBase3D.

Point3D operator= | ( | double | fill_value | ) |

Reimplemented from VBase3D.

static Point3D origin | ( |  | ) | `[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.

static Point3D origin | ( | CoordinateSystem | cs | ) | `[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.

Point3D project | ( | VBase3D const | onto | ) |

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 VBase3D.

pythonRepr | ( | ostream | out,
|  | string | class_name
| ) |  |

Reimplemented from VBase3D.

static Point3D rfu | ( | double | right,
|  | double | fwd,
|  | double | up,
|  | CoordinateSystem | cs
| ) |  | `[static]`

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

static Point3D rfu | ( | double | right,
|  | double | fwd,
|  | double | up
| ) |  | `[static]`

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

int setattr | ( | PyObject | self,
|  | string | attr_name,
|  | PyObject | assign
| ) |  |

Reimplemented from VBase3D.

static Point3D const unitX | ( |  | ) | `[static]`

Returns a unit X point.

Reimplemented from VBase3D.

static Point3D const unitY | ( |  | ) | `[static]`

Returns a unit Y point.

Reimplemented from VBase3D.

static Point3D const unitZ | ( |  | ) | `[static]`

Returns a unit Z point.

Reimplemented from VBase3D.

static Point3D const zero | ( |  | ) | `[static]`

Returns a zero-length point.

Reimplemented from VBase3D.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties