Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
LPoint3i 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 LPoint3i:
LVecBase3i

Public Member Functions

object __getattr__ (str attr_name)
 
 __init__ ()
 
 __init__ (const LPoint3i)
 
 __init__ (const LVecBase2i copy, int z)
 
 __init__ (const LVecBase3i copy)
 
 __init__ (int fill_value)
 
 __init__ (int x, int y, int z)
 
str __repr__ ()
 
int __setattr__ (str attr_name, object assign)
 
LPoint3i cross (const LVecBase3i other)
 
LPoint2i getXy ()
 Returns a 2-component vector that shares just the first two components of this vector. More...
 
LPoint2i getXz ()
 Returns a 2-component vector that shares just the first and last components of this vector. More...
 
LPoint2i getYz ()
 Returns a 2-component vector that shares just the last two components of this vector. More...
 
LPoint3i operator * (int scalar)
 
LPoint3i operator - ()
 
LVector3i operator - (const LPoint3i other)
 
LVecBase3i operator - (const LVecBase3i other)
 
LPoint3i operator - (const LVector3i other)
 
LVecBase3i operator+ (const LVecBase3i other)
 
LPoint3i operator+ (const LVector3i other)
 
LPoint3i operator/ (int scalar)
 
- Public Member Functions inherited from LVecBase3i
object __getattr__ (str attr_name)
 
 __init__ ()
 
 __init__ (const LVecBase2i copy, int z)
 
 __init__ (const LVecBase3i)
 
 __init__ (int fill_value)
 
 __init__ (int x, int y, int z)
 
object __ipow__ (int exponent)
 
LVecBase3i __pow__ (int exponent)
 
object __reduce__ ()
 
str __repr__ ()
 
int __setattr__ (str attr_name, object assign)
 
int addHash (int hash)
 Adds the vector into the running hash. More...
 
 addToCell (int i, int value)
 
 addX (int value)
 
 addY (int value)
 
 addZ (int value)
 
bool almostEqual (const LVecBase3i other)
 Returns true if two vectors are memberwise equal within a default tolerance based on the numeric type. More...
 
bool almostEqual (const LVecBase3i other, int threshold)
 Returns true if two vectors are memberwise equal within a specified tolerance. More...
 
int compareTo (const LVecBase3i other)
 This flavor of compare_to uses a default threshold value based on the numeric type. More...
 
 componentwiseMult (const LVecBase3i other)
 
LVecBase3i cross (const LVecBase3i other)
 
 crossInto (const LVecBase3i other)
 
int dot (const LVecBase3i other)
 
 fill (int fill_value)
 Sets each element of the vector to the indicated fill_value. More...
 
LVecBase3i fmax (const LVecBase3i other)
 
LVecBase3i fmin (const LVecBase3i other)
 
 generateHash (ChecksumHashGenerator hashgen)
 Adds the vector to the indicated hash generator. More...
 
int getCell (int i)
 
 getData ()
 Returns the address of the first of the three data elements in the vector. More...
 
int getHash ()
 Returns a suitable hash for phash_map. More...
 
int getX ()
 
LVecBase2i getXy ()
 Returns a 2-component vector that shares just the first two components of this vector. More...
 
LVecBase2i getXz ()
 Returns a 2-component vector that shares just the first and last components of this vector. More...
 
int getY ()
 
LVecBase2i getYz ()
 Returns a 2-component vector that shares just the last two components of this vector. More...
 
int getZ ()
 
bool isNan ()
 Returns true if any component of the vector is not-a-number, false otherwise. More...
 
int lengthSquared ()
 Returns the square of the vector's length, cheap and easy. More...
 
bool operator != (const LVecBase3i other)
 
LVecBase3i operator * (int scalar)
 
LVecBase3i operator *= (int scalar)
 
LVecBase3i operator - ()
 
LVecBase3i operator - (const LVecBase3i other)
 
LVecBase3i operator -= (const LVecBase3i other)
 
 operator [] (int i, int assign_val)
 
int operator [] (int i)
 
 operator new (int size)
 
LVecBase3i operator+ (const LVecBase3i other)
 
LVecBase3i operator+= (const LVecBase3i other)
 
LVecBase3i operator/ (int scalar)
 
LVecBase3i operator/= (int scalar)
 
bool operator< (const LVecBase3i other)
 
LVecBase3i operator= (const LVecBase3i copy)
 
LVecBase3i operator= (int fill_value)
 
bool operator== (const LVecBase3i other)
 
 output (Ostream out)
 
 readDatagram (DatagramIterator source)
 Reads the vector from the Datagram using get_stdfloat(). More...
 
 readDatagramFixed (DatagramIterator source)
 Reads the vector from the Datagram using get_float32() or get_float64(). More...
 
 set (int x, int y, int z)
 
 setCell (int i, int value)
 
 setX (int value)
 
 setY (int value)
 
 setZ (int value)
 
 writeDatagram (Datagram destination)
 Writes the vector to the Datagram using add_stdfloat(). More...
 
 writeDatagramFixed (Datagram destination)
 Writes the vector to the Datagram using add_float32() or add_float64(), depending on the type of floats in the vector, regardless of the setting of Datagram::set_stdfloat_double(). More...
 

Static Public Member Functions

static TypeHandle getClassType ()
 
static const LPoint3i origin (CoordinateSystem cs)
 Returns the origin of the indicated coordinate system. More...
 
static LPoint3i rfu (int right, int fwd, int up, CoordinateSystem cs)
 Returns a point described by right, forward, up displacements from the origin, wherever that maps to in the given coordinate system. More...
 
static const LPoint3i unitX ()
 Returns a unit X point. More...
 
static const LPoint3i unitY ()
 Returns a unit Y point. More...
 
static const LPoint3i unitZ ()
 Returns a unit Z point. More...
 
static const LPoint3i zero ()
 Returns a zero-length point. More...
 
- Static Public Member Functions inherited from LVecBase3i
static TypeHandle getClassType ()
 
static int getNumComponents ()
 
static int size ()
 
static const LVecBase3i unitX ()
 Returns a unit X vector. More...
 
static const LVecBase3i unitY ()
 Returns a unit Y vector. More...
 
static const LVecBase3i unitZ ()
 Returns a unit Z vector. More...
 
static const LVecBase3i zero ()
 Returns a zero-length vector. More...
 

Public Attributes

LPoint2i xy
 Returns a 2-component vector that shares just the first two components of this vector. More...
 
LPoint2i xz
 Returns a 2-component vector that shares just the first and last components of this vector. More...
 
LPoint2i yz
 Returns a 2-component vector that shares just the last two components of this vector. More...
 
- Public Attributes inherited from LVecBase3i
int x
 
LVecBase2i xy
 Returns a 2-component vector that shares just the first two components of this vector. More...
 
LVecBase2i xz
 Returns a 2-component vector that shares just the first and last components of this vector. More...
 
int y
 
LVecBase2i yz
 Returns a 2-component vector that shares just the last two components of this vector. More...
 
int z
 

Additional Inherited Members

- Public Types inherited from LVecBase3i
enum  { num_components = 3, is_int = 1 }
 

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.

Member Function Documentation

◆ __getattr__()

object __getattr__ ( str  attr_name)

◆ __init__() [1/6]

__init__ ( )

◆ __init__() [2/6]

__init__ ( const  LPoint3i)

◆ __init__() [3/6]

__init__ ( const LVecBase2i  copy,
int  z 
)

◆ __init__() [4/6]

__init__ ( const LVecBase3i  copy)

◆ __init__() [5/6]

__init__ ( int  fill_value)

◆ __init__() [6/6]

__init__ ( int  x,
int  y,
int  z 
)

◆ __repr__()

str __repr__ ( )

◆ __setattr__()

int __setattr__ ( str  attr_name,
object  assign 
)

◆ cross()

LPoint3i cross ( const LVecBase3i  other)

◆ getClassType()

static TypeHandle getClassType ( )
static

◆ getXy()

LPoint2i getXy ( )

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

◆ getXz()

LPoint2i getXz ( )

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

◆ getYz()

LPoint2i getYz ( )

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

◆ operator *()

LPoint3i operator * ( int  scalar)

◆ operator -() [1/4]

LPoint3i operator - ( )

◆ operator -() [2/4]

LVector3i operator - ( const LPoint3i  other)

◆ operator -() [3/4]

LVecBase3i operator - ( const LVecBase3i  other)

◆ operator -() [4/4]

LPoint3i operator - ( const LVector3i  other)

◆ operator+() [1/2]

LVecBase3i operator+ ( const LVecBase3i  other)

◆ operator+() [2/2]

LPoint3i operator+ ( const LVector3i  other)

◆ operator/()

LPoint3i operator/ ( int  scalar)

◆ origin()

static const LPoint3i 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.

◆ rfu()

static LPoint3i rfu ( int  right,
int  fwd,
int  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.

◆ unitX()

static const LPoint3i unitX ( )
static

Returns a unit X point.

◆ unitY()

static const LPoint3i unitY ( )
static

Returns a unit Y point.

◆ unitZ()

static const LPoint3i unitZ ( )
static

Returns a unit Z point.

◆ zero()

static const LPoint3i zero ( )
static

Returns a zero-length point.

Member Data Documentation

◆ xy

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

◆ xz

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

◆ yz

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