forked from blender/blender
me-main #1
@ -424,10 +424,9 @@ bool GHOST_SystemWin32::processEvents(bool waitForEvent)
|
||||
|
||||
processTrackpad();
|
||||
|
||||
/* PeekMessage above is allowed to dispatch messages to the wndproc without us
|
||||
/* `PeekMessage` above is allowed to dispatch messages to the `wndproc` without us
|
||||
* noticing, so we need to check the event manager here to see if there are
|
||||
* events waiting in the queue.
|
||||
*/
|
||||
* events waiting in the queue. */
|
||||
hasEventHandled |= this->m_eventManager->getNumEvents() > 0;
|
||||
|
||||
} while (waitForEvent && !hasEventHandled);
|
||||
|
@ -176,7 +176,7 @@ struct MeshRuntime {
|
||||
|
||||
/**
|
||||
* A bit vector the size of the number of edges, set to true for edges that should be drawn in
|
||||
* the viewport. Created by the "Optimimal Display" feature of the subdivision surface modifier.
|
||||
* the viewport. Created by the "Optimal Display" feature of the subdivision surface modifier.
|
||||
* Otherwise it will be empty.
|
||||
*/
|
||||
BitVector<> subsurf_optimal_display_edges;
|
||||
|
@ -772,7 +772,7 @@ bool get_effector_data(EffectorCache *eff,
|
||||
if (eff->pd->forcefield == PFIELD_VORTEX || eff->pd->shape == PFIELD_SHAPE_LINE) {
|
||||
add_v3_v3v3(efd->loc, ob->object_to_world[3], translate);
|
||||
}
|
||||
else { /* normally efd->loc is closest point on effector xy-plane */
|
||||
else { /* Normally `efd->loc` is closest point on effector XY-plane. */
|
||||
sub_v3_v3v3(efd->loc, point->loc, translate);
|
||||
}
|
||||
}
|
||||
@ -1125,31 +1125,31 @@ void BKE_effectors_apply(ListBase *effectors,
|
||||
/* WARNING(@ideasman42): historic comment?
|
||||
* Many of these parameters don't exist!
|
||||
*
|
||||
* scene = scene where it runs in, for time and stuff.
|
||||
* lb = listbase with objects that take part in effecting.
|
||||
* opco = global coord, as input.
|
||||
* force = accumulator for force.
|
||||
* wind_force = accumulator for force only acting perpendicular to a surface.
|
||||
* speed = actual current speed which can be altered.
|
||||
* cur_time = "external" time in frames, is constant for static particles.
|
||||
* loc_time = "local" time in frames, range <0-1> for the lifetime of particle.
|
||||
* par_layer = layer the caller is in.
|
||||
* flags = only used for soft-body wind now.
|
||||
* guide = old speed of particle.
|
||||
* `scene` = scene where it runs in, for time and stuff.
|
||||
* `lb` = listbase with objects that take part in effecting.
|
||||
* `opco` = global coord, as input.
|
||||
* `force` = accumulator for force.
|
||||
* `wind_force` = accumulator for force only acting perpendicular to a surface.
|
||||
* `speed` = actual current speed which can be altered.
|
||||
* `cur_time` = "external" time in frames, is constant for static particles.
|
||||
* `loc_time` = "local" time in frames, range <0-1> for the lifetime of particle.
|
||||
* `par_layer` = layer the caller is in.
|
||||
* `flags` = only used for soft-body wind now.
|
||||
* `guide` = old speed of particle.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modifies the force on a particle according to its
|
||||
* relation with the effector object
|
||||
* Different kind of effectors include:
|
||||
* Force-fields: Gravity-like attractor
|
||||
* (force power is related to the inverse of distance to the power of a falloff value)
|
||||
* Vortex fields: swirling effectors
|
||||
* (particles rotate around Z-axis of the object. otherwise, same relation as)
|
||||
* (Force-fields, but this is not done through a force/acceleration)
|
||||
* Guide: particles on a path
|
||||
* (particles are guided along a curve bezier or old nurbs)
|
||||
* (is independent of other effectors)
|
||||
* - Force-fields: Gravity-like attractor
|
||||
* (force power is related to the inverse of distance to the power of a falloff value)
|
||||
* - Vortex fields: swirling effectors
|
||||
* (particles rotate around Z-axis of the object. otherwise, same relation as)
|
||||
* (Force-fields, but this is not done through a force/acceleration)
|
||||
* - Guide: particles on a path
|
||||
* (particles are guided along a curve bezier or old nurbs)
|
||||
* (is independent of other effectors)
|
||||
*/
|
||||
EffectorCache *eff;
|
||||
EffectorData efd;
|
||||
|
@ -117,7 +117,7 @@ struct DupliContext {
|
||||
* decisions. However, new code uses geometry instances in places that weren't using the dupli
|
||||
* system previously. To fix this, keep track of the last dupli generator type that wasn't a
|
||||
* geometry set instance.
|
||||
* */
|
||||
*/
|
||||
Vector<short> *dupli_gen_type_stack;
|
||||
|
||||
int persistent_id[MAX_DUPLI_RECUR];
|
||||
|
@ -590,7 +590,7 @@ static void initialize_all_particles(ParticleSimulationData *sim)
|
||||
{
|
||||
ParticleSystem *psys = sim->psys;
|
||||
ParticleSettings *part = psys->part;
|
||||
/* Grid distributionsets UNEXIST flag, need to take care of
|
||||
/* Grid distribution-sets UNEXIST flag, need to take care of
|
||||
* it here because later this flag is being reset.
|
||||
*
|
||||
* We can't do it for any distribution, because it'll then
|
||||
@ -1931,7 +1931,7 @@ static void sphclassical_density_accum_cb(void *userdata,
|
||||
return;
|
||||
}
|
||||
|
||||
/* Smoothing factor. Utilize the Wendland kernel. gnuplot:
|
||||
/* Smoothing factor. Utilize the Wendland kernel. `gnuplot`:
|
||||
* q1(x) = (2.0 - x)**4 * ( 1.0 + 2.0 * x)
|
||||
* plot [0:2] q1(x) */
|
||||
q = qfac / pow3f(pfr->h) * pow4f(2.0f - rij_h) * (1.0f + 2.0f * rij_h);
|
||||
@ -2021,7 +2021,7 @@ static void sphclassical_force_cb(void *sphdata_v,
|
||||
NULL, psys, state->co, &pfr, interaction_radius, sphclassical_neighbor_accum_cb);
|
||||
pressure = stiffness * (pow7f(pa->sphdensity / rest_density) - 1.0f);
|
||||
|
||||
/* multiply by mass so that we return a force, not accel */
|
||||
/* Multiply by mass so that we return a force, not acceleration. */
|
||||
qfac2 *= sphdata->mass / pow3f(pfr.h);
|
||||
|
||||
pfn = pfr.neighbors;
|
||||
@ -2047,7 +2047,7 @@ static void sphclassical_force_cb(void *sphdata_v,
|
||||
npressure = stiffness * (pow7f(npa->sphdensity / rest_density) - 1.0f);
|
||||
|
||||
/* First derivative of smoothing factor. Utilize the Wendland kernel.
|
||||
* gnuplot:
|
||||
* `gnuplot`:
|
||||
* q2(x) = 2.0 * (2.0 - x)**4 - 4.0 * (2.0 - x)**3 * (1.0 + 2.0 * x)
|
||||
* plot [0:2] q2(x)
|
||||
* Particles > 2h away are excluded above. */
|
||||
@ -2438,15 +2438,17 @@ static float nr_distance_to_vert(float *p,
|
||||
{
|
||||
return len_v3v3(p, pce->x0) - radius;
|
||||
}
|
||||
/**
|
||||
* \param t: is the current time for newton rhapson.
|
||||
* \param fac: is the starting factor for current collision iteration.
|
||||
* \param col: The particle collision, `col->fac's` are factors for the
|
||||
* particle sub-frame step start and end during collision modifier step.
|
||||
*/
|
||||
static void collision_interpolate_element(ParticleCollisionElement *pce,
|
||||
float t,
|
||||
float fac,
|
||||
ParticleCollision *col)
|
||||
{
|
||||
/* t is the current time for newton rhapson */
|
||||
/* fac is the starting factor for current collision iteration */
|
||||
/* The col->fac's are factors for the particle subframe step start
|
||||
* and end during collision modifier step. */
|
||||
float f = fac + t * (1.0f - fac);
|
||||
float mul = col->fac1 + f * (col->fac2 - col->fac1);
|
||||
if (pce->tot > 0) {
|
||||
@ -3598,19 +3600,21 @@ static void save_hair(ParticleSimulationData *sim, float UNUSED(cfra))
|
||||
psys_sim_data_free(sim);
|
||||
}
|
||||
|
||||
/* Code for an adaptive time step based on the Courant-Friedrichs-Lewy
|
||||
* condition. */
|
||||
/** Code for an adaptive time step based on the Courant-Friedrichs-Lewy condition. */
|
||||
static const float MIN_TIMESTEP = 1.0f / 101.0f;
|
||||
/* Tolerance of 1.5 means the last subframe neither favors growing nor
|
||||
* shrinking (e.g if it were 1.3, the last subframe would tend to be too
|
||||
* small). */
|
||||
/**
|
||||
* Tolerance of 1.5 means the last sub-frame neither favors growing nor shrinking
|
||||
* (e.g if it were 1.3, the last sub-frame would tend to be too small).
|
||||
*/
|
||||
static const float TIMESTEP_EXPANSION_FACTOR = 0.1f;
|
||||
static const float TIMESTEP_EXPANSION_TOLERANCE = 1.5f;
|
||||
|
||||
/* Calculate the speed of the particle relative to the local scale of the
|
||||
/**
|
||||
* Calculate the speed of the particle relative to the local scale of the
|
||||
* simulation. This should be called once per particle during a simulation
|
||||
* step, after the velocity has been updated. element_size defines the scale of
|
||||
* the simulation, and is typically the distance to neighboring particles. */
|
||||
* the simulation, and is typically the distance to neighboring particles.
|
||||
*/
|
||||
static void update_courant_num(
|
||||
ParticleSimulationData *sim, ParticleData *pa, float dtime, SPHData *sphdata, SpinLock *spin)
|
||||
{
|
||||
|
@ -449,7 +449,7 @@ void ShadowDirectional::cascade_tilemaps_distribution(Light &light, const Camera
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* Clipmap Distribution *
|
||||
* Clip-map Distribution *
|
||||
************************************************************************/
|
||||
|
||||
IndexRange ShadowDirectional::clipmap_level_range(const Camera &camera)
|
||||
@ -593,7 +593,7 @@ void ShadowDirectional::end_sync(Light &light, const Camera &camera, float lod_b
|
||||
for (int64_t i = 0; i < before_range; i++) {
|
||||
tilemaps_.append(tilemap_pool.acquire());
|
||||
}
|
||||
/* Keep cached lods. */
|
||||
/* Keep cached LOD's. */
|
||||
tilemaps_.extend(cached_tilemaps);
|
||||
for (int64_t i = 0; i < after_range; i++) {
|
||||
tilemaps_.append(tilemap_pool.acquire());
|
||||
|
@ -268,7 +268,7 @@ class ShadowModule {
|
||||
/** \name Debugging
|
||||
* \{ */
|
||||
|
||||
/** Display informations about the virtual shadows. */
|
||||
/** Display information about the virtual shadows. */
|
||||
PassSimple debug_draw_ps_ = {"Shadow.Debug"};
|
||||
|
||||
/** \} */
|
||||
|
@ -150,7 +150,7 @@ bool select_pick(const ViewContext &vc,
|
||||
const int2 mval);
|
||||
|
||||
/**
|
||||
* Select points or curves in a (screenspace) rectangle.
|
||||
* Select points or curves in a (screen-space) rectangle.
|
||||
*/
|
||||
bool select_box(const ViewContext &vc,
|
||||
bke::CurvesGeometry &curves,
|
||||
|
@ -21,7 +21,7 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
.description(N_("Index of the face group inside each boundary edge region"));
|
||||
}
|
||||
|
||||
/* Join all uinque unordered combinations of indices. */
|
||||
/** Join all unique unordered combinations of indices. */
|
||||
static void join_indices(AtomicDisjointSet &set, const Span<int> indices)
|
||||
{
|
||||
for (const int i : indices.index_range()) {
|
||||
|
Loading…
Reference in New Issue
Block a user