Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions
Point3 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 Point3:
VBase3

List of all members.

Public Member Functions

 Point3 ()
 Point3 (VBase3 const copy)
 Point3 (float fill_value)
 Point3 (float x, float y, float z)
Point3 cross (VBase3 const other)
PyObject getattr (string attr_name)
Point2 getXy ()
 Returns a 2-component vector that shares just the first two components of this vector.
Point2 getXz ()
 Returns a 2-component vector that shares just the first and last components of this vector.
Point2 getYz ()
 Returns a 2-component vector that shares just the last two components of this vector.
Point3 operator* (float scalar)
VBase3 operator+ (VBase3 const other)
Point3 operator+ (Vec3 const other)
Point3 operator- ()
Vec3 operator- (Point3 const other)
VBase3 operator- (VBase3 const other)
Point3 operator- (Vec3 const other)
Point3 operator/ (float scalar)
Point3 operator= (VBase3 const copy)
Point3 operator= (float fill_value)
Point3 project (VBase3 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 Point3 origin (CoordinateSystem cs)
 Returns the origin of the indicated coordinate system.
static Point3 origin ()
 Returns the origin of the indicated coordinate system.
static Point3 rfu (float right, float fwd, float 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 Point3 rfu (float right, float fwd, float up)
 Returns a point described by right, forward, up displacements from the origin, wherever that maps to in the given coordinate system.
static Point3 const unitX ()
 Returns a unit X point.
static Point3 const unitY ()
 Returns a unit Y point.
static Point3 const unitZ ()
 Returns a unit Z point.
static Point3 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

Point3 ( )
Point3 ( VBase3 const  copy)
Point3 ( float  fill_value)
Point3 ( float  x,
float  y,
float  z 
)

Member Function Documentation

Point3 cross ( VBase3 const  other)

Reimplemented from VBase3.

PyObject getattr ( string  attr_name)

Reimplemented from VBase3.

static TypeHandle getClassType ( ) [static]

Reimplemented from VBase3.

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

Reimplemented from VBase3.

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

Reimplemented from VBase3.

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

Reimplemented from VBase3.

Point3 operator* ( float  scalar)

Reimplemented from VBase3.

VBase3 operator+ ( VBase3 const  other)

Reimplemented from VBase3.

Point3 operator+ ( Vec3 const  other)
Point3 operator- ( )

Reimplemented from VBase3.

Vec3 operator- ( Point3 const  other)
VBase3 operator- ( VBase3 const  other)

Reimplemented from VBase3.

Point3 operator- ( Vec3 const  other)
Point3 operator/ ( float  scalar)

Reimplemented from VBase3.

Point3 operator= ( VBase3 const  copy)

Reimplemented from VBase3.

Point3 operator= ( float  fill_value)

Reimplemented from VBase3.

static Point3 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.

static Point3 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.

Point3 project ( VBase3 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 VBase3.

pythonRepr ( ostream  out,
string  class_name 
)

Reimplemented from VBase3.

static Point3 rfu ( float  right,
float  fwd,
float  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 Point3 rfu ( float  right,
float  fwd,
float  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 VBase3.

static Point3 const unitX ( ) [static]

Returns a unit X point.

Reimplemented from VBase3.

static Point3 const unitY ( ) [static]

Returns a unit Y point.

Reimplemented from VBase3.

static Point3 const unitZ ( ) [static]

Returns a unit Z point.

Reimplemented from VBase3.

static Point3 const zero ( ) [static]

Returns a zero-length point.

Reimplemented from VBase3.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties