38 if (this->stateContacts()->isEmpty()) {
39 this->stateContacts()->allocate();
42 if (this->stateNormals()->isEmpty()) {
43 this->stateNormals()->allocate();
46 auto shapeA = this->getShapeA();
47 auto shapeB = this->getShapeB();
56 auto sA = modelA->outCube()->getValue();
57 auto sB = modelB->outCube()->getValue();
67 auto sA = modelA->outSphere()->getValue();
68 auto sB = modelB->outSphere()->getValue();
78 auto sA = modelA->outCapsule()->getValue();
79 auto sB = modelB->outCapsule()->getValue();
93 auto sA = modelA->outCube()->getValue();
94 auto sB = modelB->outCapsule()->getValue();
96 Real radius2 = sB.radius;
105 auto sA = modelA->outCapsule()->getValue();
106 auto sB = modelB->outCube()->getValue();
108 Real radius1 = sA.radius;
117 auto sA = modelA->outCube()->getValue();
118 auto sB = modelB->outSphere()->getValue();
128 auto sA = modelA->outSphere()->getValue();
129 auto sB = modelB->outCube()->getValue();
139 auto sA = modelA->outSphere()->getValue();
140 auto sB = modelB->outCapsule()->getValue();
143 Real radius2 = sB.radius;
153 auto sA = modelA->outCapsule()->getValue();
154 auto sB = modelB->outSphere()->getValue();
156 Real radius1 = sA.radius;
162 std::cout <<
"Not supported yet" << std::endl;
165 std::vector<Coord> points;
167 std::vector<Coord> vertices;
168 std::vector<TopologyModule::Edge> edges;
172 for (
uint i = 0; i < num; i++)
174 points.push_back(manifold.
contacts[i].position);
175 vertices.push_back(manifold.
contacts[i].position);
176 vertices.push_back(manifold.
contacts[i].position + manifold.
normal * 0.05);
180 auto ptSet = this->stateContacts()->getDataPtr();
181 ptSet->setPoints(points);
184 auto edgeSet = this->stateNormals()->getDataPtr();
185 edgeSet->setPoints(vertices);
186 edgeSet->setEdges(edges);