|
| void | add_collection (const std::vector< PointVertex > &vertices, float mass_multiplier=1.0F) |
| | Add a single physics collection.
|
| |
| void | add_force_field (Kinesis::VectorField field) |
| | Add an external force field evaluated per-particle per-frame.
|
| |
| void | apply_global_impulse (const glm::vec3 &impulse) |
| | Apply impulse to all particles.
|
| |
| void | apply_impulse (size_t index, const glm::vec3 &impulse) |
| | Apply impulse to specific particle.
|
| |
| void | apply_one_to_one (std::string_view param, const std::shared_ptr< NodeNetwork > &source) override |
| | Apply ONE_TO_ONE parameter for physics-specific properties.
|
| |
| size_t | bond_count () const |
| | Number of particles currently bonded to a root other than themselves.
|
| |
| bool | bonds_enabled () const |
| |
| std::vector< uint32_t > | build_cluster_ids () const override |
| | Per-particle collection index, global index order.
|
| |
| void | clear_attraction_point () |
| |
| void | clear_bonds () |
| | Drop every adopted bond.
|
| |
| void | clear_force_fields () |
| | Remove all external force fields.
|
| |
| std::optional< Portal::Graphics::PrimitiveTopology > | declared_topology () const override |
| | Forwards to the first collection's own get_primitive_topology().
|
| |
| void | enable_bonds (bool enable) |
| | Enable or disable adopting bonds from sync_bonds_from_claims.
|
| |
| void | enable_spatial_interactions (bool enable) |
| | Enable or disable spatial interactions between particles.
|
| |
| std::vector< std::pair< std::string, Kakshya::DataVariant > > | extract_vertex_attributes () const override |
| | Adds "mass" (PhysicsState::mass) and "accreted_mass" (get_accreted_mass_span()) as named float attributes, in the same global vertex-index order get_vertex_data() produces.
|
| |
| std::vector< glm::vec3 > | extract_vertex_velocities () const override |
| | Per-particle PhysicsState::velocity, in the same global vertex-index order get_vertex_data() produces.
|
| |
| std::vector< PointVertex > | extract_vertices () const |
| | Extract current vertex data as PointVertex array.
|
| |
| size_t | force_field_count () const |
| | Get number of active external force fields.
|
| |
| float | get_accreted_mass (size_t global_index) const |
| | This particle's currently accreted mass.
|
| |
| std::span< const float > | get_accreted_mass_span () |
| | Every particle's currently accreted mass, in global index order.
|
| |
| glm::vec3 | get_attraction_point () const |
| |
| float | get_bond_rest_length () const |
| |
| float | get_bond_stiffness () const |
| |
| BoundsMode | get_bounds_mode () const |
| | Get the current bounds mode.
|
| |
| std::vector< CollectionGroup > & | get_collections () |
| | Direct access to collections for advanced per-particle control.
|
| |
| float | get_drag () const |
| | Get the current drag coefficient.
|
| |
| glm::vec3 | get_gravity () const |
| | Get the current gravity vector.
|
| |
| float | get_interaction_radius () const |
| | Get the interaction radius for physics calculations.
|
| |
| float | get_internal_dt () const |
| |
| std::optional< double > | get_particle_velocity (size_t global_index) const |
| | Get velocity magnitude for specific particle.
|
| |
| size_t | get_point_count () const override |
| | Get source point count (before topology expansion)
|
| |
| float | get_repulsion_strength () const |
| | Get the current repulsion strength for spatial interactions.
|
| |
| float | get_total_mass () const |
| | Sum of every particle's accreted mass.
|
| |
| std::string_view | get_type_name () const override |
| | Type name for introspection.
|
| |
| size_t | get_vertex_count () const override |
| | Get number of vertices (may differ from point count for topology/path)
|
| |
| std::span< const uint8_t > | get_vertex_data () const override |
| | Get vertex data for GPU upload.
|
| |
| std::span< const uint8_t > | get_vertex_data_for_collection (uint32_t idx) const override |
| | Get vertex data for specific collection (if multiple)
|
| |
| Kakshya::VertexLayout | get_vertex_layout () const override |
| | Get vertex layout describing vertex structure.
|
| |
| const char * | get_vertex_type_name () const override |
| | Get human-readable vertex type name (for validation/debugging)
|
| |
| bool | has_attraction_point () const |
| |
| void | initialize (const std::vector< PointVertex > &vertices) |
| | Initialize with a single physics collection.
|
| |
| void | initialize_collections (const std::vector< std::vector< PointVertex > > &collections) |
| | Initialize multiple physics collections.
|
| |
| bool | is_vertex_data_dirty () const override |
| | Check if geometry changed this frame.
|
| |
| void | mark_vertex_data_clean () override |
| | Clear dirty flag after GPU upload.
|
| |
| | PhysicsOperator () |
| |
| void | process (float dt) override |
| | Process for one batch cycle.
|
| |
| std::optional< double > | query_state (std::string_view query) const override |
| | Query operator internal state.
|
| |
| void | seed_from_upstream (const GraphicsOperator *upstream) override |
| | Seed physics state from upstream operator's vertex data.
|
| |
| void | set_attraction_point (const glm::vec3 &point) |
| |
| void | set_attraction_strength (float strength) |
| | Set the strength of attraction towards the attraction point.
|
| |
| void | set_bond_rest_length (float rest_length) |
| | Distance a bond settles at.
|
| |
| void | set_bond_stiffness (float stiffness) |
| | Spring constant pulling a bonded particle toward its root.
|
| |
| void | set_bounds (const glm::vec3 &min, const glm::vec3 &max) |
| | Set the simulation bounds.
|
| |
| void | set_bounds_mode (BoundsMode mode) |
| | Set the current bounds mode.
|
| |
| void | set_drag (float drag) |
| | Set the drag coefficient.
|
| |
| void | set_gravity (const glm::vec3 &gravity) |
| | Set the gravity vector.
|
| |
| void | set_interaction_radius (float radius) |
| | Set the interaction radius for physics calculations.
|
| |
| void | set_internal_dt (float dt) |
| | Fixed dt substituted when set_force_internal_dt(true).
|
| |
| void | set_parameter (std::string_view param, double value) override |
| | Set operator parameter.
|
| |
| void | set_point_size (float size) |
| | Set the rendered point size.
|
| |
| void | set_repulsion_strength (float strength) |
| | Set the strength of repulsion between particles when spatial interactions are enabled.
|
| |
| void | set_spring_stiffness (float stiffness) |
| | Set the spring stiffness for interactions.
|
| |
| void | set_turbulence_strength (float strength) |
| | Set the strength of attraction towards the attraction point.
|
| |
| bool | spatial_interactions_enabled () const |
| | Check if spatial interactions between particles are enabled.
|
| |
| void | sync_bonds_from_claims (std::span< const uint32_t > claimed_by) |
| | Adopt this cycle's GPU claim/absorption clustering as bonds.
|
| |
| std::vector< DrawRun > | topology_runs () const override |
| | Coalesces adjacent point collections sharing a concatenable topology into one run.
|
| |
| | ~PhysicsOperator () override |
| |
| bool | consumes_upstream () const |
| | Whether this operator requests upstream vertex state before process().
|
| |
| virtual std::vector< DirtyVertexRange > | dirty_vertex_ranges () const |
| | Vertex sub-ranges that changed since the last mark_vertex_data_clean().
|
| |
| bool | participates_in_rendering () const |
| | Whether this operator contributes a vertex slice to rendering.
|
| |
| void | set_consumes_upstream (bool value) |
| |
| void | set_force_internal_dt (bool value) |
| | Override the dt passed by the caller with a fixed internal value.
|
| |
| void | set_participates_in_rendering (bool value) |
| |
| virtual bool | supports_incremental_upload () const |
| | Whether every vertex mutation on this operator sets a group's dirty flag, so dirty_vertex_ranges() is the complete record of what changed since the last mark_vertex_data_clean().
|
| |
| bool | uses_force_internal_dt () const |
| |
| virtual bool | demands_full_vertex_restore () const |
| | Whether a downstream compute pass writes the network's vertex buffer in place each cycle, so the geometry producer must keep restoring the CPU-authoritative vertex data every frame.
|
| |
| virtual | ~NetworkOperator ()=default |
| |
N-body physics simulation with point rendering.
Delegates rendering to PointCollectionNode. Physics state (velocity, force, mass) stored in parallel array. Each frame:
- Apply forces
- Integrate motion
- Update PointCollectionNode vertices
- PointCollectionNode handles GPU upload
Definition at line 53 of file PhysicsOperator.hpp.