Blender  V2.93
DEG_depsgraph_physics.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2018 Blender Foundation.
17  * All rights reserved.
18  */
19 
26 #pragma once
27 
28 #include "DEG_depsgraph.h"
29 
30 struct DepsNodeHandle;
31 struct Depsgraph;
32 struct EffectorWeights;
33 struct ListBase;
34 struct Object;
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 typedef enum ePhysicsRelationType {
47 
48 /* Get collision/effector relations from collection or entire scene. These
49  * created during depsgraph relations building and should only be accessed
50  * during evaluation. */
52  struct Collection *collection);
54  struct Collection *collection,
55  unsigned int modifier_type);
56 
57 /* Build collision/effector relations for depsgraph. */
58 typedef bool (*DEG_CollobjFilterFunction)(struct Object *obj, struct ModifierData *md);
59 
60 void DEG_add_collision_relations(struct DepsNodeHandle *handle,
61  struct Object *object,
62  struct Collection *collection,
63  unsigned int modifier_type,
64  DEG_CollobjFilterFunction filter_function,
65  const char *name);
66 void DEG_add_forcefield_relations(struct DepsNodeHandle *handle,
67  struct Object *object,
68  struct EffectorWeights *eff,
69  bool add_absorption,
70  int skip_forcefield,
71  const char *name);
72 
73 #ifdef __cplusplus
74 } /* extern "C" */
75 #endif
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
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