97 #ifndef vtkCollisionDetectionFilter_h
98 #define vtkCollisionDetectionFilter_h
101 #include "vtkFiltersModelingModule.h"
125 VTK_ALL_CONTACTS = 0,
126 VTK_FIRST_CONTACT = 1,
127 VTK_HALF_CONTACTS = 2
136 vtkSetClampMacro(CollisionMode,
int, VTK_ALL_CONTACTS, VTK_HALF_CONTACTS);
137 vtkGetMacro(CollisionMode,
int);
144 if (this->CollisionMode == VTK_ALL_CONTACTS)
146 return "AllContacts";
148 else if (this->CollisionMode == VTK_FIRST_CONTACT)
150 return "FirstContact";
154 return "HalfContacts";
168 double bounds2[6],
double tol2,
double x1[2],
double x2[3],
int CollisionMode);
215 vtkSetMacro(BoxTolerance,
float);
216 vtkGetMacro(BoxTolerance,
float);
222 vtkSetMacro(CellTolerance,
double);
223 vtkGetMacro(CellTolerance,
double);
231 vtkSetMacro(GenerateScalars,
int);
232 vtkGetMacro(GenerateScalars,
int);
233 vtkBooleanMacro(GenerateScalars,
int);
250 vtkGetMacro(NumberOfBoxTests,
int);
257 vtkSetMacro(NumberOfCellsPerNode,
int);
258 vtkGetMacro(NumberOfCellsPerNode,
int);
266 vtkSetClampMacro(Opacity,
float, 0.0, 1.0);
267 vtkGetMacro(Opacity,
float);
vtkIdType GetNumberOfTuples() const
Get the number of complete tuples (a component group) in the array.
Proxy object to connect input/output ports.
vtkAlgorithmOutput * GetOutputPort()
performs collision determination between two polyhedral surfaces
void SetCollisionModeToFirstContact()
vtkMatrix4x4 * GetMatrix(int i)
void SetTransform(int i, vtkLinearTransform *transform)
static vtkCollisionDetectionFilter * New()
Standard methods for construction, type and printing.
vtkMTimeType GetMTime() override
Return this object's modified time.
vtkIdTypeArray * GetContactCells(int i)
Get an array of the contacting cells.
vtkLinearTransform * GetTransform(int i)
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int GetNumberOfContacts()
~vtkCollisionDetectionFilter() override
void SetCollisionModeToHalfContacts()
vtkPolyData * GetInputData(int i)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetInputData(int i, vtkPolyData *model)
Set and Get the input vtk polydata models.
vtkCollisionDetectionFilter()
void SetMatrix(int i, vtkMatrix4x4 *matrix)
const char * GetCollisionModeAsString(void)
void SetCollisionModeToAllContacts()
int IntersectPolygonWithPolygon(int npts, double *pts, double bounds[6], int npts2, double *pts2, double bounds2[6], double tol2, double x1[2], double x2[3], int CollisionMode)
Description: Intersect two polygons, return x1 and x2 as the two points of intersection.
vtkAlgorithmOutput * GetContactsOutputPort()
Get the output with the points where the contacting cells intersect.
vtkPolyData * GetContactsOutput()
virtual vtkFieldData * GetFieldData()
vtkDataArray * GetArray(int i)
Not recommended for use.
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
generate oriented bounding box (OBB) tree
represent and manipulate 3D points
Superclass for algorithms that produce only polydata as output.
vtkPolyData * GetOutput()
Get the output data object for a port on this algorithm.
concrete dataset represents vertices, lines, polygons, and triangle strips
vtkTypeUInt32 vtkMTimeType