Man Page for vtkNormals
Table of Contents

NAME

vtkNormals - abstract interface to 3D normals

SYNOPSIS


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

class VTK_EXPORT vtkNormals : public vtkReferenceCount

vtkNormals() {};
virtual ~vtkNormals() {};
const char *GetClassName() {return "vtkNormals";};
void PrintSelf(ostream& os, vtkIndent indent);
virtual vtkNormals *MakeObject(int sze, int ext=1000) = 0;
virtual char *GetDataType() = 0;
virtual int GetNumberOfNormals() = 0;
virtual float *GetNormal(int id) = 0;
virtual void GetNormal(int id, float n[3]);
virtual void SetNumberOfNormals(int number) = 0;
virtual void SetNormal(int id, float n[3]) = 0;
virtual void InsertNormal(int id, float n[3]) = 0;
void InsertNormal(int id, float nx, float ny, float nz);
virtual int InsertNextNormal(float n[3]) = 0;
int InsertNextNormal(float nx, float ny, float nz);
virtual void Squeeze() = 0;
void GetNormals(vtkIdList& ptId, vtkFloatNormals& fp);

DESCRIPTION

vtkNormals provides an abstract interface to 3D normals. The data model for vtkNormals is an array of nx-ny-nz triplets accessible by point id. (Each normal is assumed normalized |n| = 1.) The subclasses of vtkNormals are concrete data types (float, int, etc.) that implement the interface of vtkNormals.

SUMMARY

virtual vtkNormals *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 GetNumberOfNormals() = 0;
Return number of normals in array.

virtual float *GetNormal(int id) = 0;
Return a float normal n[3] for a particular point id.

virtual void GetNormal(int id, float n[3]);
Copy normal components into user provided array n[3] for specified point id.

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

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

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

virtual int InsertNextNormal(float n[3]) = 0;
Insert normal into next available slot. Returns point id of slot.

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

void InsertNormal(int id, float nx, float ny, float nz) Insert normal into position indicated.

int InsertNextNormal(float nx, float ny, float nz)
Insert normal into position indicated.

void GetNormals(vtkIdList& ptId, vtkFloatNormals& fp)
Given a list of pt ids, return an array of corresponding normals.


Table of Contents