554{
556 return;
557 }
558
559 constexpr float damping = 0.8F;
560
562 auto&
points = group.collection->get_points();
563
564 for (
size_t i = 0; i <
points.size(); ++i) {
566 auto& state = group.physics_state[i];
567
568 for (int axis = 0; axis < 3; ++axis) {
573 state.velocity[axis] *= -damping;
574 break;
577 break;
580 state.velocity[axis] = 0.0F;
581 break;
583 break;
584 }
585 }
else if (vertex.position[axis] >
m_bounds.
max[axis]) {
589 state.velocity[axis] *= -damping;
590 break;
593 break;
596 state.velocity[axis] = 0.0F;
597 break;
599 break;
600 }
601 }
602 }
603 }
604 }
605}
std::vector< glm::vec2 > * points
Kinesis::SamplerBounds m_bounds
std::vector< CollectionGroup > m_collections
@ BOUNCE
Reflect off boundaries with damping.
@ NONE
No bounds checking.
@ WRAP
Teleport to opposite side.