Panda3D
Public Member Functions | Static Public Member Functions | List of all members
LPoint2i Class Reference

This is a two-component point in space. More...

Inheritance diagram for LPoint2i:
LVecBase2i

Public Member Functions

object __getattr__ (str attr_name)
 
 __init__ ()
 
 __init__ (const LPoint2i)
 
 __init__ (const LVecBase2i copy)
 Constructs a new LPoint2 from a LVecBase2. More...
 
 __init__ (int fill_value)
 Constructs a new LPoint2 all components set to the fill value. More...
 
 __init__ (int x, int y)
 Constructs a new LPoint2 with the given components. More...
 
str __repr__ ()
 
int __setattr__ (str attr_name, object assign)
 
LPoint2i operator * (int scalar)
 
LPoint2i operator - ()
 
LVector2i operator - (const LPoint2i other)
 
LVecBase2i operator - (const LVecBase2i other)
 
LPoint2i operator - (const LVector2i other)
 
LVecBase2i operator+ (const LVecBase2i other)
 
LPoint2i operator+ (const LVector2i other)
 
LPoint2i operator/ (int scalar)
 
- Public Member Functions inherited from LVecBase2i
object __getattr__ (str attr_name)
 
 __init__ ()
 
 __init__ (const LVecBase2i)
 
 __init__ (int fill_value)
 
 __init__ (int x, int y)
 
object __ipow__ (int exponent)
 
LVecBase2i __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)
 
bool almostEqual (const LVecBase2i other)
 Returns true if two vectors are memberwise equal within a default tolerance based on the numeric type. More...
 
bool almostEqual (const LVecBase2i other, int threshold)
 Returns true if two vectors are memberwise equal within a specified tolerance. More...
 
int compareTo (const LVecBase2i other)
 This flavor of compare_to uses a default threshold value based on the numeric type. More...
 
 componentwiseMult (const LVecBase2i other)
 
int dot (const LVecBase2i other)
 
 fill (int fill_value)
 Sets each element of the vector to the indicated fill_value. More...
 
LVecBase2i fmax (const LVecBase2i other)
 
LVecBase2i fmin (const LVecBase2i 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 two data elements in the vector. More...
 
int getHash ()
 Returns a suitable hash for phash_map. More...
 
int getX ()
 
int getY ()
 
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 LVecBase2i other)
 
LVecBase2i operator * (int scalar)
 
LVecBase2i operator *= (int scalar)
 
LVecBase2i operator - ()
 
LVecBase2i operator - (const LVecBase2i other)
 
LVecBase2i operator -= (const LVecBase2i other)
 
 operator [] (int i, int assign_val)
 
int operator [] (int i)
 
 operator new (int size)
 
LVecBase2i operator+ (const LVecBase2i other)
 
LVecBase2i operator+= (const LVecBase2i other)
 
LVecBase2i operator/ (int scalar)
 
LVecBase2i operator/= (int scalar)
 
bool operator< (const LVecBase2i other)
 
LVecBase2i operator= (const LVecBase2i copy)
 
LVecBase2i operator= (int fill_value)
 
bool operator== (const LVecBase2i 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)
 
 setCell (int i, int value)
 
 setX (int value)
 
 setY (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 LPoint2i unitX ()
 Returns a unit X point. More...
 
static const LPoint2i unitY ()
 Returns a unit Y point. More...
 
static const LPoint2i zero ()
 Returns a zero-length point. More...
 
- Static Public Member Functions inherited from LVecBase2i
static TypeHandle getClassType ()
 
static int getNumComponents ()
 
static int size ()
 
static const LVecBase2i unitX ()
 Returns a unit X vector. More...
 
static const LVecBase2i unitY ()
 Returns a unit Y vector. More...
 
static const LVecBase2i zero ()
 Returns a zero-length vector. More...
 

Additional Inherited Members

- Public Types inherited from LVecBase2i
enum  { num_components = 2, is_int = 1 }
 
- Public Attributes inherited from LVecBase2i
int x
 
int y
 

Detailed Description

This is a two-component point in space.

Member Function Documentation

◆ __getattr__()

object __getattr__ ( str  attr_name)

◆ __init__() [1/5]

__init__ ( )

◆ __init__() [2/5]

__init__ ( const  LPoint2i)

◆ __init__() [3/5]

__init__ ( const LVecBase2i  copy)

Constructs a new LPoint2 from a LVecBase2.

◆ __init__() [4/5]

__init__ ( int  fill_value)

Constructs a new LPoint2 all components set to the fill value.

◆ __init__() [5/5]

__init__ ( int  x,
int  y 
)

Constructs a new LPoint2 with the given components.

◆ __repr__()

str __repr__ ( )

◆ __setattr__()

int __setattr__ ( str  attr_name,
object  assign 
)

◆ getClassType()

static TypeHandle getClassType ( )
static

◆ operator *()

LPoint2i operator * ( int  scalar)

◆ operator -() [1/4]

LPoint2i operator - ( )

◆ operator -() [2/4]

LVector2i operator - ( const LPoint2i  other)

◆ operator -() [3/4]

LVecBase2i operator - ( const LVecBase2i  other)

◆ operator -() [4/4]

LPoint2i operator - ( const LVector2i  other)

◆ operator+() [1/2]

LVecBase2i operator+ ( const LVecBase2i  other)

◆ operator+() [2/2]

LPoint2i operator+ ( const LVector2i  other)

◆ operator/()

LPoint2i operator/ ( int  scalar)

◆ unitX()

static const LPoint2i unitX ( )
static

Returns a unit X point.

◆ unitY()

static const LPoint2i unitY ( )
static

Returns a unit Y point.

◆ zero()

static const LPoint2i zero ( )
static

Returns a zero-length point.