FreeMat
|
Section: Visualization Toolkit Common Classes
vtkPoints represents 3D points. The data model for vtkPoints is an array of vx-vy-vz triplets accessible by (point or cell) id.
To create an instance of class vtkPoints, simply invoke its constructor as follows
obj = vtkPoints
The class vtkPoints has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj
is an instance of the vtkPoints class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkPoints = obj.NewInstance ()
vtkPoints = obj.SafeDownCast (vtkObject o)
int = obj.Allocate (vtkIdType sz, vtkIdType ext)
- Allocate initial memory size. obj.Initialize ()
- Return object to instantiated state. obj.SetData (vtkDataArray )
- Set/Get the underlying data array. This function must be implemented in a concrete subclass to check for consistency. (The tuple size must match the type of data. For example, 3-tuple data array can be assigned to a vector, normal, or points object, but not a tensor object, which has a tuple dimension of 9. Scalars, on the other hand, can have tuple dimension from 1-4, depending on the type of scalar.) vtkDataArray = obj.GetData ()
- Set/Get the underlying data array. This function must be implemented in a concrete subclass to check for consistency. (The tuple size must match the type of data. For example, 3-tuple data array can be assigned to a vector, normal, or points object, but not a tensor object, which has a tuple dimension of 9. Scalars, on the other hand, can have tuple dimension from 1-4, depending on the type of scalar.) int = obj.GetDataType ()
- Return the underlying data type. An integer indicating data type is returned as specified in vtkSetGet.h. obj.SetDataType (int dataType)
- Specify the underlying data type of the object. obj.SetDataTypeToBit ()
- Specify the underlying data type of the object. obj.SetDataTypeToChar ()
- Specify the underlying data type of the object. obj.SetDataTypeToUnsignedChar ()
- Specify the underlying data type of the object. obj.SetDataTypeToShort ()
- Specify the underlying data type of the object. obj.SetDataTypeToUnsignedShort ()
- Specify the underlying data type of the object. obj.SetDataTypeToInt ()
- Specify the underlying data type of the object. obj.SetDataTypeToUnsignedInt ()
- Specify the underlying data type of the object. obj.SetDataTypeToLong ()
- Specify the underlying data type of the object. obj.SetDataTypeToUnsignedLong ()
- Specify the underlying data type of the object. obj.SetDataTypeToFloat ()
- Specify the underlying data type of the object. obj.SetDataTypeToDouble ()
- Specify the underlying data type of the object. obj.Squeeze ()
- Reclaim any extra memory. obj.Reset ()
- Make object look empty but do not delete memory. obj.DeepCopy (vtkPoints ad)
- Different ways to copy data. Shallow copy does reference count (i.e., assigns pointers and updates reference count); deep copy runs through entire data array assigning values. obj.ShallowCopy (vtkPoints ad)
- Different ways to copy data. Shallow copy does reference count (i.e., assigns pointers and updates reference count); deep copy runs through entire data array assigning values. long = obj.GetActualMemorySize ()
- Return the memory in kilobytes consumed by this attribute data. Used to support streaming and reading/writing data. The value returned is guaranteed to be greater than or equal to the memory required to actually represent the data represented by this object. The information returned is valid only after the pipeline has been updated. vtkIdType = obj.GetNumberOfPoints ()
- Return number of points in array. double = obj.GetPoint (vtkIdType id)
- Return a pointer to a double point x[3] for a specific id. WARNING: Just don't use this error-prone method, the returned pointer and its values are only valid as long as another method invocation is not performed. Prefer GetPoint() with the return value in argument. obj.GetPoint (vtkIdType id, double x[3])
- Copy point components into user provided array v[3] for specified id. obj.SetPoint (vtkIdType id, float x[3])
- Insert point into object. No range checking performed (fast!). Make sure you use SetNumberOfPoints() to allocate memory prior to using SetPoint(). obj.SetPoint (vtkIdType id, double x[3])
- Insert point into object. No range checking performed (fast!). Make sure you use SetNumberOfPoints() to allocate memory prior to using SetPoint(). obj.SetPoint (vtkIdType id, double x, double y, double z)
- Insert point into object. No range checking performed (fast!). Make sure you use SetNumberOfPoints() to allocate memory prior to using SetPoint(). obj.InsertPoint (vtkIdType id, float x[3])
- Insert point into object. Range checking performed and memory allocated as necessary. obj.InsertPoint (vtkIdType id, double x[3])
- Insert point into object. Range checking performed and memory allocated as necessary. obj.InsertPoint (vtkIdType id, double x, double y, double z)
- Insert point into object. Range checking performed and memory allocated as necessary. vtkIdType = obj.InsertNextPoint (float x[3])
- Insert point into next available slot. Returns id of slot. vtkIdType = obj.InsertNextPoint (double x[3])
- Insert point into next available slot. Returns id of slot. vtkIdType = obj.InsertNextPoint (double x, double y, double z)
- Insert point into next available slot. Returns id of slot. obj.SetNumberOfPoints (vtkIdType number)
- Specify the number of points for this object to hold. Does an allocation as well as setting the MaxId ivar. Used in conjunction with SetPoint() method for fast insertion. obj.GetPoints (vtkIdList ptId, vtkPoints fp)
- Given a list of pt ids, return an array of points. obj.ComputeBounds ()
- Determine (xmin,xmax, ymin,ymax, zmin,zmax) bounds of points. double = obj.GetBounds ()
- Return the bounds of the points. obj.GetBounds (double bounds[6])
- Return the bounds of the points.