Blender
V5.3
source
blender
geometry
xpbd
GEO_xpbd_updater_velocity.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2026 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
GEO_xpbd_geometry_ref.hh
"
8
9
namespace
blender::xpbd
{
10
14
class
VelocityUpdater
{
15
private
:
16
Span<GeometryRef>
geometry_refs_;
17
18
public
:
19
VelocityUpdater
(
const
Span<GeometryRef>
geometry_refs) : geometry_refs_(geometry_refs) {}
20
21
void
update_velocity
(
const
int
geo_i,
const
int
point_i,
const
float3
&offset)
22
{
23
geometry_refs_[geo_i].velocities[point_i] += offset;
24
}
25
26
void
update_angular_velocity
(
const
int
geo_i,
const
int
point_i,
const
float3
&offset)
27
{
28
geometry_refs_[geo_i].angular_velocities[point_i] += offset;
29
}
30
};
31
32
}
// namespace blender::xpbd
GEO_xpbd_geometry_ref.hh
blender::Span
Definition
BLI_span.hh:74
blender::xpbd::VelocityUpdater::VelocityUpdater
VelocityUpdater(const Span< GeometryRef > geometry_refs)
Definition
GEO_xpbd_updater_velocity.hh:19
blender::xpbd::VelocityUpdater::update_velocity
void update_velocity(const int geo_i, const int point_i, const float3 &offset)
Definition
GEO_xpbd_updater_velocity.hh:21
blender::xpbd::VelocityUpdater::update_angular_velocity
void update_angular_velocity(const int geo_i, const int point_i, const float3 &offset)
Definition
GEO_xpbd_updater_velocity.hh:26
blender::xpbd
Definition
GEO_xpbd_constraint_align_rotations.hh:10
blender::float3
VecBase< float, 3 > float3
Definition
BLI_math_vector_types.hh:799
Generated on
for Blender by
doxygen
1.18.0