Panda3D

- Main Page
- Packages
- Classes

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

Public Member Functions | Static Public Member Functions

# Vec2D Class Reference

This is a two-component vector offset. More...

Inheritance diagram for Vec2D:

List of all members.

## Public Member Functions
| Vec2D ()
| Vec2D (VBase2D const copy)
| Vec2D (double x, double y)
| Vec2D (double fill_value)
PyObject | getattr (string attr_name)
Vec2D | operator* (double scalar)
VBase2D | operator+ (VBase2D const other)
Vec2D | operator+ (Vec2D const other)
Vec2D | operator- ()
VBase2D | operator- (VBase2D const other)
Vec2D | operator- (Vec2D const other)
Vec2D | operator/ (double scalar)
Vec2D | operator= (double fill_value)
Vec2D | operator= (VBase2D const copy)
Vec2D | project (VBase2D 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)
double | signedAngleDeg (Vec2D const other)
| returns the signed angled between two vectors.
double | signedAngleRad (Vec2D const other)
| returns the signed angled between two vectors.
## Static Public Member Functions
static TypeHandle | getClassType ()
static Vec2D const | unitX ()
| Returns a unit X vector.
static Vec2D const | unitY ()
| Returns a unit Y vector.
static Vec2D const | zero ()
| Returns a zero-length vector.

## Detailed Description

This is a two-component vector offset.

## Constructor & Destructor Documentation

Vec2D | ( |  | ) |

Vec2D | ( | VBase2D const | copy | ) |

Vec2D | ( | double | fill_value | ) |

Vec2D | ( | double | x,
|  | double | y
| ) |  |

## Member Function Documentation

PyObject getattr | ( | string | attr_name | ) |

Reimplemented from VBase2D.

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

Reimplemented from VBase2D.

Vec2D operator* | ( | double | scalar | ) |

Reimplemented from VBase2D.

VBase2D operator+ | ( | VBase2D const | other | ) |

Reimplemented from VBase2D.

Vec2D operator+ | ( | Vec2D const | other | ) |

Vec2D operator- | ( |  | ) |

Reimplemented from VBase2D.

VBase2D operator- | ( | VBase2D const | other | ) |

Reimplemented from VBase2D.

Vec2D operator- | ( | Vec2D const | other | ) |

Vec2D operator/ | ( | double | scalar | ) |

Reimplemented from VBase2D.

Vec2D operator= | ( | double | fill_value | ) |

Reimplemented from VBase2D.

Vec2D operator= | ( | VBase2D const | copy | ) |

Reimplemented from VBase2D.

Vec2D project | ( | VBase2D 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 VBase2D.

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

Reimplemented from VBase2D.

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

Reimplemented from VBase2D.

double signedAngleDeg | ( | Vec2D const | other | ) |

returns the signed angled between two vectors.

normalization is NOT necessary

double signedAngleRad | ( | Vec2D const | other | ) |

returns the signed angled between two vectors.

normalization is NOT necessary

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

Returns a unit X vector.

Reimplemented from VBase2D.

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

Returns a unit Y vector.

Reimplemented from VBase2D.

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

Returns a zero-length vector.

Reimplemented from VBase2D.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties