110#ifndef vtkCollisionDetectionFilter_h
111#define vtkCollisionDetectionFilter_h
114#include "vtkFiltersModelingModule.h"
138 VTK_ALL_CONTACTS = 0,
139 VTK_FIRST_CONTACT = 1,
140 VTK_HALF_CONTACTS = 2
149 vtkSetClampMacro(CollisionMode,
int, VTK_ALL_CONTACTS, VTK_HALF_CONTACTS);
150 vtkGetMacro(CollisionMode,
int);
157 if (this->CollisionMode == VTK_ALL_CONTACTS)
159 return "AllContacts";
161 else if (this->CollisionMode == VTK_FIRST_CONTACT)
163 return "FirstContact";
167 return "HalfContacts";
181 double bounds2[6],
double tol2,
double x1[2],
double x2[3],
int CollisionMode);
228 vtkSetMacro(BoxTolerance,
float);
229 vtkGetMacro(BoxTolerance,
float);
235 vtkSetMacro(CellTolerance,
double);
236 vtkGetMacro(CellTolerance,
double);
244 vtkSetMacro(GenerateScalars,
int);
245 vtkGetMacro(GenerateScalars,
int);
246 vtkBooleanMacro(GenerateScalars,
int);
264 vtkGetMacro(NumberOfBoxTests,
int);
271 vtkSetMacro(NumberOfCellsPerNode,
int);
272 vtkGetMacro(NumberOfCellsPerNode,
int);
280 vtkSetClampMacro(Opacity,
float, 0.0, 1.0);
281 vtkGetMacro(Opacity,
float);
Proxy object to connect input/output ports.
vtkAlgorithmOutput * GetOutputPort()
performs collision determination between two polyhedral surfaces
vtkAlgorithmOutput * GetContactsOutputPort()
Get the output with the points where the contacting cells intersect.
vtkPolyData * GetContactsOutput()
Get the output with the points where the contacting cells intersect.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetCollisionModeToFirstContact()
Set the collision mode to VTK_ALL_CONTACTS to find all the contacting cell pairs with two points per ...
void SetTransform(int i, vtkLinearTransform *transform)
vtkIdTypeArray * GetContactCells(int i)
Get an array of the contacting cells.
vtkPolyData * GetInputData(int i)
Set and Get the input vtk polydata models.
vtkMTimeType GetMTime() override
Return this object's modified time.
vtkMatrix4x4 * GetMatrix(int i)
static vtkCollisionDetectionFilter * New()
Standard methods for construction, type and printing.
int GetNumberOfContacts()
~vtkCollisionDetectionFilter() override
void SetCollisionModeToHalfContacts()
Set the collision mode to VTK_ALL_CONTACTS to find all the contacting cell pairs with two points per ...
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for construction, type and printing.
void SetInputData(int i, vtkPolyData *model)
Set and Get the input vtk polydata models.
const char * GetCollisionModeAsString(void)
Set the collision mode to VTK_ALL_CONTACTS to find all the contacting cell pairs with two points per ...
vtkCollisionDetectionFilter()
void SetMatrix(int i, vtkMatrix4x4 *matrix)
void SetCollisionModeToAllContacts()
Set the collision mode to VTK_ALL_CONTACTS to find all the contacting cell pairs with two points per ...
vtkLinearTransform * GetTransform(int i)
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.
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