Chemical Data Processing Library Python API - Version 1.1.1
Public Member Functions | List of all members
CDPL.Vis.PointArray2D Class Reference

Stores a set of points in 2D space. More...

+ Inheritance diagram for CDPL.Vis.PointArray2D:

Public Member Functions

None __init__ ()
 Initializes the PointArray2D instance.
 
None __init__ (PointArray2D array)
 Initializes a copy of the PointArray2D instance array. More...
 
None translate (Math.Vector2D vec)
 Translates all points by vec. More...
 
None getBounds (Rectangle2D bbox)
 
- Public Member Functions inherited from CDPL.Math.Vector2DArray
None __init__ (Vector2DArray array)
 Initializes a copy of the Vector2DArray instance array. More...
 
None __init__ (object a)
 Initializes the Vector2DArray instance. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
int getSize ()
 Returns the number of elements stored in the array. More...
 
bool isEmpty ()
 Tells whether the array is empty (getSize() == 0). More...
 
None resize (int num_elem, Vector2D value)
 Inserts or erases elements at the end so that the size becomes num_elem. More...
 
None reserve (int num_elem)
 Preallocates memory for (at least) num_elem elements. More...
 
int getCapacity ()
 Returns the number of elements for which memory has been allocated. More...
 
None clear ()
 Erases all elements.
 
Vector2DArray assign (Vector2DArray array)
 Replaces the current state of self with a copy of the state of the Vector2DArray instance array. More...
 
None assign (int num_elem, Vector2D value)
 This function fills the array with num_elem copies of the given value. More...
 
None assign (object a)
 Replaces the current state of self with a copy of the state of the object instance a. More...
 
None addElement (Vector2D value)
 Inserts a new element at the end of the array. More...
 
None addElements (Vector2DArray values)
 
None insertElement (int idx, Vector2D value)
 Inserts a new element before the location specified by the index idx. More...
 
None insertElements (int idx, int num_elem, Vector2D value)
 Inserts num_elem copies of value before the location specified by the index idx. More...
 
None insertElements (int index, Vector2DArray values)
 
None popLastElement ()
 Removes the last element of the array. More...
 
None removeElement (int idx)
 Removes the element at the position specified by the index idx. More...
 
None removeElements (int begin_idx, int end_idx)
 
Vector2D getFirstElement ()
 Returns a reference to the first element of the array. More...
 
Vector2D getLastElement ()
 Returns a reference to the last element of the array. More...
 
Vector2D getElement (int idx)
 Returns a reference to the element at index idx. More...
 
None setElement (int idx, Vector2D value)
 Assigns a new value to the element specified by the index idx. More...
 
object toArray (bool as_vec)
 
None __delitem__ (int idx)
 
Vector2D __getitem__ (int idx)
 
int __len__ ()
 
None __setitem__ (int index, Vector2D value)
 
bool __eq__ (object array)
 Returns the result of the comparison operation self == array. More...
 
bool __ne__ (object array)
 Returns the result of the comparison operation self != array. More...
 

Additional Inherited Members

- Properties inherited from CDPL.Math.Vector2DArray
 objectID = property(getObjectID)
 
 size = property(getSize)
 

Detailed Description

Stores a set of points in 2D space.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Vis.PointArray2D.__init__ ( PointArray2D  array)

Initializes a copy of the PointArray2D instance array.

Parameters
arrayThe PointArray2D instance to copy.

Member Function Documentation

◆ translate()

None CDPL.Vis.PointArray2D.translate ( Math.Vector2D  vec)

Translates all points by vec.

Parameters
vecThe translation vector.

◆ getBounds()

None CDPL.Vis.PointArray2D.getBounds ( Rectangle2D  bbox)
Parameters
bbox