NAME
vtkTensors - abstract interface to tensors
SYNOPSIS
#include "/opt/vtk-c++/common/vtkTensors.h"
class VTK_EXPORT vtkTensors : public vtkReferenceCount
vtkTensors(int dim=3);
const char *GetClassName() {return "vtkTensors";};
void PrintSelf(ostream& os, vtkIndent indent);
virtual vtkTensors *MakeObject(int sze, int d=3, int ext=1000) = 0;
virtual char *GetDataType() = 0;
virtual int GetNumberOfTensors() = 0;
virtual vtkTensor *GetTensor(int id) = 0;
virtual void GetTensor(int id, vtkTensor& t);
virtual void SetNumberOfTensors(int number) = 0;
virtual void SetTensor(int id, vtkTensor *t) = 0;
virtual void InsertTensor(int id, vtkTensor *t) = 0;
void InsertTensor(int id, float t11, float t12, float t13,
float t21, float t22, float t23,
float t31, float t32, float t33);
virtual int InsertNextTensor(vtkTensor *t) = 0;
int InsertNextTensor(float t11, float t12, float t13,
float t21, float t22, float t23,
float t31, float t32, float t33);
virtual void Squeeze() = 0;
void GetTensors(vtkIdList& ptId, vtkFloatTensors& ft);
void SetDimension(int);
int GetDimension();
DESCRIPTION
vtkTensors provides an abstract interface to n-dimensional tensors. The data model for vtkTensors is a list of arrays of nxn tensor matrices accessible by point id. The subclasses of vtkTensors are concrete data types (float, int, etc.) that implement the interface of vtkTensors.
SUMMARY
virtual vtkTensors *MakeObject(int sze, int d=3, 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 GetNumberOfTensors() = 0;
Return number of tensors in array.
virtual vtkTensor *GetTensor(int id) = 0;
Return a float tensor t[dim*dim] for a particular point id.
virtual void GetTensor(int id, vtkTensor& t);
Copy float tensor into user provided tensor for specified point id.
virtual void SetNumberOfTensors(int number) = 0;
Specify the number of tensors for this object to hold. Does an allocation as well as setting the MaxId ivar. Used in conjunction with SetTensor() method for fast insertion.
virtual void SetTensor(int id, vtkTensor *t) = 0;
Insert tensor into object. No range checking performed (fast!).
virtual void InsertTensor(int id, vtkTensor *t) = 0; Insert tensor into object. Range checking performed and memory allocated as necessary.
virtual int InsertNextTensor(vtkTensor *t) = 0;
Insert tensor into next available slot. Returns point id of slot.
virtual void Squeeze() = 0;
Reclaim any extra memory.
void GetTensors(vtkIdList& ptId, vtkFloatTensors& ft)
Given a list of pt ids, return an array of tensors.