Man Page for vtkVectors
Table of Contents

NAME

vtkVectors - abstract interface to 3D vectors

SYNOPSIS


#include "/opt/vtk-c++/common/vtkVectors.h"

class VTK_EXPORT vtkVectors : public vtkReferenceCount

vtkVectors();
const char *GetClassName() {return "vtkVectors";};
void PrintSelf(ostream& os, vtkIndent indent);
virtual vtkVectors *MakeObject(int sze, int ext=1000) = 0;
virtual char *GetDataType() = 0;
virtual int GetNumberOfVectors() = 0;
virtual float *GetVector(int id) = 0;
virtual void GetVector(int id, float v[3]);
virtual void SetNumberOfVectors(int number) = 0;
virtual void SetVector(int id, float v[3]) = 0;
virtual void InsertVector(int id, float v[3]) = 0;
void InsertVector(int id, float vx, float vy, float vz);
virtual int InsertNextVector(float v[3]) = 0;
int InsertNextVector(float vx, float vy, float vz);
virtual void Squeeze() = 0;
void GetVectors(vtkIdList& ptId, vtkFloatVectors& fp);
virtual void ComputeMaxNorm();
float GetMaxNorm();

DESCRIPTION

vtkVectors provides an abstract interface to 3D vectors. The data model for vtkVectors is an array of vx-vy-vz triplets accessible by point id. The subclasses of vtkVectors are concrete data types (float, int, etc.) that implement the interface of vtkVectors.

SUMMARY

virtual vtkVectors *MakeObject(int sze, int ext=1000) = 0; Create a copy of this object.

virtual char *GetDataType() = 0;
Return data type. One of "bit", "unsigned char", "short", "int", "float", or "double".

virtual int GetNumberOfVectors() = 0;
Return number of vectors in array.

virtual float *GetVector(int id) = 0;
Return a pointer to a float vector v[3] for a specific point id.

virtual void GetVector(int id, float v[3]);
Copy vector components into user provided array v[3] for specified point id.

virtual void SetNumberOfVectors(int number) = 0;
Specify the number of vectors for this object to hold. Does an allocation as well as setting the MaxId ivar. Used in conjunction with SetVector() method for fast insertion.

virtual void SetVector(int id, float v[3]) = 0;
Insert vector into object. No range checking performed (fast!). Make sure you use SetNumberOfVectors() to allocate memory prior to using SetVector().

virtual void InsertVector(int id, float v[3]) = 0;
Insert vector into object. Range checking performed and memory allocated as necessary.

virtual int InsertNextVector(float v[3]) = 0;
Insert vector into next available slot. Returns point id of slot.

virtual void Squeeze() = 0;
Reclaim any extra memory.

void InsertVector(int id, float vx, float vy, float vz) Insert vector into position indicated.

int InsertNextVector(float vx, float vy, float vz)
Insert vector into position indicated.

void GetVectors(vtkIdList& ptId, vtkFloatVectors& fp)
Given a list of pt ids, return an array of vectors.

void ComputeMaxNorm()
Compute the largest norm for these vectors.

float GetMaxNorm()
Return the maximum norm for these vectors.


Table of Contents