722{
724 return;
725 }
726
727 constexpr float damping = 0.8F;
728
730 auto&
points = group.collection->get_points();
731
732 for (
size_t i = 0; i <
points.size(); ++i) {
734 auto& state = group.physics_state[i];
735
736 for (int axis = 0; axis < 3; ++axis) {
741 state.velocity[axis] *= -damping;
742 break;
745 break;
748 state.velocity[axis] = 0.0F;
749 break;
751 break;
752 }
753 }
else if (vertex.position[axis] >
m_bounds.
max[axis]) {
757 state.velocity[axis] *= -damping;
758 break;
761 break;
764 state.velocity[axis] = 0.0F;
765 break;
767 break;
768 }
769 }
770 }
771 }
772 }
773}
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.