Go to the documentation of this file.
29 #include "vtkCommonCoreModule.h"
94 void *
GetVoidPointer(
const int id) {
return this->Data->GetVoidPointer(
id); }
99 virtual void Squeeze() { this->Data->Squeeze(); }
104 virtual void Reset();
151 void SetPoint(
vtkIdType id,
double x,
double y);
158 { this->Data->InsertTuple(
id,x); }
160 { this->Data->InsertTuple(
id,x); }
161 void InsertPoint(
vtkIdType id,
double x,
double y);
167 {
return this->Data->InsertNextTuple(x); }
169 {
return this->Data->InsertNextTuple(x); }
170 vtkIdType InsertNextPoint(
double x,
double y);
182 void SetNumberOfPoints(
vtkIdType numPoints);
220 void operator=(const
vtkPoints2D&) VTK_DELETE_FUNCTION;
231 this->Data->SetNumberOfComponents(2);
232 this->Data->SetNumberOfTuples(numPoints);
238 this->Data->SetNumberOfComponents(2);
240 return this->Data->Resize(numPoints);
245 double p[2] = { x, y };
246 this->Data->SetTuple(
id, p);
251 double p[2] = { x, y };
252 this->Data->InsertTuple(
id, p);
257 double p[2] = { x, y };
258 return this->Data->InsertNextTuple(p);
represent and manipulate 2D points
void GetBounds(double bounds[4])
Return the bounds of the points.
static vtkPoints2D * New()
void InsertPoint(vtkIdType id, const float x[2])
Insert point into object.
#define VTK_UNSIGNED_SHORT
record modification and/or execution time
virtual void Modified()
Update the modification time for this object.
void SetDataTypeToUnsignedChar()
void * GetVoidPointer(const int id)
Return a void pointer.
abstract base class for most VTK objects
void GetPoints(vtkIdList *ptId, vtkPoints2D *fp)
Given a list of pt ids, return an array of points.
abstract superclass for arrays of numeric data
virtual void SetDataType(int dataType)
Specify the underlying data type of the object.
void SetDataTypeToUnsignedShort()
void SetNumberOfPoints(vtkIdType numPoints)
Specify the number of points for this object to hold.
void GetPoint(vtkIdType id, double x[2])
Copy point components into user provided array v[2] for specified id.
virtual void Initialize()
Return object to instantiated state.
virtual int GetDataType()
Return the underlying data type.
void Reset()
Reset to an empty state, without freeing any memory.
virtual int Allocate(const vtkIdType sz, const vtkIdType ext=1000)
Allocate initial memory size.
a simple class to control print indentation
virtual void ComputeBounds()
Determine (xmin,xmax, ymin,ymax) bounds of points.
vtkPoints2D(int dataType=VTK_FLOAT)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void Squeeze()
Reclaim any extra memory.
list of point or cell ids
#define VTK_UNSIGNED_CHAR
void SetPoint(vtkIdType id, const float x[2])
Insert point into object.
double * GetPoint(vtkIdType id)
Return a pointer to a double point x[2] for a specific id.
void SetDataTypeToUnsignedInt()
#define VTK_UNSIGNED_LONG
vtkIdType InsertNextPoint(const float x[2])
Insert point into next available slot.
void SetPoint(vtkIdType id, const double x[2])
void RemovePoint(vtkIdType id)
Remove point described by its id.
int Resize(vtkIdType numPoints)
Resize the internal array while conserving the data.
virtual void DeepCopy(vtkPoints2D *ad)
Different ways to copy data.
virtual void ShallowCopy(vtkPoints2D *ad)
double * GetBounds()
Return the bounds of the points.
vtkIdType GetNumberOfPoints()
Return number of points in array.
void SetDataTypeToFloat()
void SetDataTypeToShort()
virtual void SetData(vtkDataArray *)
Set/Get the underlying data array.
vtkIdType InsertNextPoint(const double x[2])
static vtkPoints2D * New(int dataType)
void SetDataTypeToUnsignedLong()
unsigned long GetActualMemorySize()
Return the memory in kibibytes (1024 bytes) consumed by this attribute data.
void SetDataTypeToDouble()
void InsertPoint(vtkIdType id, const double x[2])