691{
693 return;
694 }
695
696 constexpr float damping = 0.8F;
697
699 auto&
points = group.collection->get_points();
700
701 for (
size_t i = 0; i <
points.size(); ++i) {
703 auto& state = group.physics_state[i];
704
705 for (int axis = 0; axis < 3; ++axis) {
710 state.velocity[axis] *= -damping;
711 break;
714 break;
717 state.velocity[axis] = 0.0F;
718 break;
720 break;
721 }
722 }
else if (vertex.position[axis] >
m_bounds.
max[axis]) {
726 state.velocity[axis] *= -damping;
727 break;
730 break;
733 state.velocity[axis] = 0.0F;
734 break;
736 break;
737 }
738 }
739 }
740 }
741 }
742}
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.