Blender V5.3
BKE_rigidbody.h File Reference

API for Blender-side Rigid Body stuff. More...

#include "BKE_lib_query.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

Macros

Utility Macros
#define RBO_GET_MASS(rbo)
#define RBO_GET_MARGIN(rbo)

Functions

Memory Management
void blender::BKE_rigidbody_free_world (struct Scene *scene)
void blender::BKE_rigidbody_free_object (struct Object *ob, struct RigidBodyWorld *rbw)
void blender::BKE_rigidbody_free_constraint (struct Object *ob)
void blender::BKE_rigidbody_object_copy (struct Main *bmain, struct Object *ob_dst, const struct Object *ob_src, int flag)
Setup
struct RigidBodyWorld * blender::BKE_rigidbody_create_world (struct Scene *scene)
struct RigidBodyOb * blender::BKE_rigidbody_create_object (struct Scene *scene, struct Object *ob, eRigidBodyOb_Type type)
struct RigidBodyCon * blender::BKE_rigidbody_create_constraint (struct Scene *scene, struct Object *ob, eRigidBodyCon_Type type)
void blender::BKE_rigidbody_objects_collection_validate (struct Main *bmain, struct Scene *scene, struct RigidBodyWorld *rbw)
void blender::BKE_rigidbody_constraints_collection_validate (struct Scene *scene, struct RigidBodyWorld *rbw)
void blender::BKE_rigidbody_main_collection_object_add (struct Main *bmain, struct Collection *collection, struct Object *object)
struct RigidBodyWorld * blender::BKE_rigidbody_world_copy (struct RigidBodyWorld *rbw, int flag)
void blender::BKE_rigidbody_world_groups_relink (struct RigidBodyWorld *rbw)
void blender::BKE_rigidbody_world_init_runtime (struct RigidBodyWorld *rbw)
rbDynamicsWorld * blender::BKE_rigidbody_world_physics (struct RigidBodyWorld *rbw)
void blender::BKE_rigidbody_validate_sim_world (struct Scene *scene, struct RigidBodyWorld *rbw, bool rebuild)
void blender::BKE_rigidbody_calc_volume (struct Object *ob, float *r_vol)
void blender::BKE_rigidbody_calc_center_of_mass (struct Object *ob, float r_center[3])
Utilities
struct RigidBodyWorld * blender::BKE_rigidbody_get_world (struct Scene *scene)
bool blender::BKE_rigidbody_add_object (struct Main *bmain, struct Scene *scene, struct Object *ob, eRigidBodyOb_Type type, struct ReportList *reports)
void blender::BKE_rigidbody_ensure_local_object (struct Main *bmain, struct Object *ob)
void blender::BKE_rigidbody_remove_object (struct Main *bmain, struct Scene *scene, struct Object *ob, bool free_us)
void blender::BKE_rigidbody_remove_constraint (struct Main *bmain, struct Scene *scene, struct Object *ob, bool free_us)
Simulation
void blender::BKE_rigidbody_aftertrans_update (struct Object *ob, float loc[3], float rot[3], float quat[4], float rotAxis[3], float rotAngle)
void blender::BKE_rigidbody_sync_transforms (struct RigidBodyWorld *rbw, struct Object *ob, float ctime)
bool blender::BKE_rigidbody_check_sim_running (struct RigidBodyWorld *rbw, float ctime)
bool blender::BKE_rigidbody_is_affected_by_simulation (struct Object *ob)
void blender::BKE_rigidbody_cache_reset (struct RigidBodyWorld *rbw)
void blender::BKE_rigidbody_rebuild_world (struct Depsgraph *depsgraph, struct Scene *scene, float ctime)
void blender::BKE_rigidbody_do_simulation (struct Depsgraph *depsgraph, struct Scene *scene, float ctime)
Depsgraph evaluation
void blender::BKE_rigidbody_rebuild_sim (struct Depsgraph *depsgraph, struct Scene *scene)
void blender::BKE_rigidbody_eval_simulation (struct Depsgraph *depsgraph, struct Scene *scene)
void blender::BKE_rigidbody_object_sync_transforms (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)

Iterator

typedef void(*) blender::RigidbodyWorldIDFunc(struct RigidBodyWorld *rbw, struct ID **idpoin, void *userdata, LibraryForeachIDCallbackFlag cb_flag)
void blender::BKE_rigidbody_world_id_loop (struct RigidBodyWorld *rbw, RigidbodyWorldIDFunc func, void *userdata)

Detailed Description

API for Blender-side Rigid Body stuff.

Definition in file BKE_rigidbody.h.

Macro Definition Documentation

◆ RBO_GET_MARGIN

#define RBO_GET_MARGIN ( rbo)
Value:
(((rbo)->flag & RBO_FLAG_USE_MARGIN || (rbo)->shape == RB_SHAPE_CONVEXH || \
(rbo)->shape == RB_SHAPE_TRIMESH || (rbo)->shape == RB_SHAPE_CONE) ? \
((rbo)->margin) : \
(0.04f))

Get collision margin for Rigid Body Object, triangle mesh and cone shapes cannot embed margin, convex hull always uses custom margin.

Definition at line 191 of file BKE_rigidbody.h.

◆ RBO_GET_MASS

#define RBO_GET_MASS ( rbo)
Value:
(((rbo) && (((rbo)->type == RBO_TYPE_PASSIVE) || ((rbo)->flag & RBO_FLAG_KINEMATIC) || \
((rbo)->flag & RBO_FLAG_DISABLED))) ? \
(0.0f) : \
((rbo)->mass))

Get mass of Rigid Body Object to supply to RigidBody simulators.

Definition at line 182 of file BKE_rigidbody.h.