Panda3D

- Main Page
- Packages
- Classes

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

Public Member Functions | Static Public Member Functions

# Vec2 Class Reference

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

Inheritance diagram for Vec2:

List of all members.

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

## Detailed Description

This is a two-component vector offset.

## Constructor & Destructor Documentation

Vec2 | ( |  | ) |

Vec2 | ( | VBase2 const | copy | ) |

Vec2 | ( | float | fill_value | ) |

Vec2 | ( | float | x,
|  | float | y
| ) |  |

## Member Function Documentation

PyObject getattr | ( | string | attr_name | ) |

Reimplemented from VBase2.

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

Reimplemented from VBase2.

Vec2 operator* | ( | float | scalar | ) |

Reimplemented from VBase2.

VBase2 operator+ | ( | VBase2 const | other | ) |

Reimplemented from VBase2.

Vec2 operator+ | ( | Vec2 const | other | ) |

Vec2 operator- | ( |  | ) |

Reimplemented from VBase2.

VBase2 operator- | ( | VBase2 const | other | ) |

Reimplemented from VBase2.

Vec2 operator- | ( | Vec2 const | other | ) |

Vec2 operator/ | ( | float | scalar | ) |

Reimplemented from VBase2.

Vec2 operator= | ( | float | fill_value | ) |

Reimplemented from VBase2.

Vec2 operator= | ( | VBase2 const | copy | ) |

Reimplemented from VBase2.

Vec2 project | ( | VBase2 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 VBase2.

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

Reimplemented from VBase2.

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

Reimplemented from VBase2.

float signedAngleDeg | ( | Vec2 const | other | ) |

returns the signed angled between two vectors.

normalization is NOT necessary

float signedAngleRad | ( | Vec2 const | other | ) |

returns the signed angled between two vectors.

normalization is NOT necessary

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

Returns a unit X vector.

Reimplemented from VBase2.

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

Returns a unit Y vector.

Reimplemented from VBase2.

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

Returns a zero-length vector.

Reimplemented from VBase2.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties