Blender  V3.3
DEG_depsgraph_physics.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2018 Blender Foundation. All rights reserved. */
3 
10 #pragma once
11 
12 #include "DEG_depsgraph.h"
13 
14 struct DepsNodeHandle;
15 struct Depsgraph;
16 struct EffectorWeights;
17 struct ListBase;
18 struct Object;
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 typedef enum ePhysicsRelationType {
31 
32 /* Get collision/effector relations from collection or entire scene. These
33  * created during depsgraph relations building and should only be accessed
34  * during evaluation. */
36  struct Collection *collection);
38  struct Collection *collection,
39  unsigned int modifier_type);
40 
41 /* Build collision/effector relations for depsgraph. */
42 typedef bool (*DEG_CollobjFilterFunction)(struct Object *obj, struct ModifierData *md);
43 
44 void DEG_add_collision_relations(struct DepsNodeHandle *handle,
45  struct Object *object,
46  struct Collection *collection,
47  unsigned int modifier_type,
48  DEG_CollobjFilterFunction filter_function,
49  const char *name);
50 void DEG_add_forcefield_relations(struct DepsNodeHandle *handle,
51  struct Object *object,
52  struct EffectorWeights *eff,
53  bool add_absorption,
54  int skip_forcefield,
55  const char *name);
56 
57 #ifdef __cplusplus
58 } /* extern "C" */
59 #endif
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
struct ListBase * DEG_get_effector_relations(const struct Depsgraph *depsgraph, struct Collection *collection)
ePhysicsRelationType
@ DEG_PHYSICS_DYNAMIC_BRUSH
@ DEG_PHYSICS_SMOKE_COLLISION
@ DEG_PHYSICS_COLLISION
@ DEG_PHYSICS_RELATIONS_NUM
@ DEG_PHYSICS_EFFECTOR
void DEG_add_collision_relations(struct DepsNodeHandle *handle, struct Object *object, struct Collection *collection, unsigned int modifier_type, DEG_CollobjFilterFunction filter_function, const char *name)
struct ListBase * DEG_get_collision_relations(const struct Depsgraph *depsgraph, struct Collection *collection, unsigned int modifier_type)
bool(* DEG_CollobjFilterFunction)(struct Object *obj, struct ModifierData *md)
void DEG_add_forcefield_relations(struct DepsNodeHandle *handle, struct Object *object, struct EffectorWeights *eff, bool add_absorption, int skip_forcefield, const char *name)
const Depsgraph * depsgraph