Blender  V3.3
Public Attributes | List of all members
PointCache Struct Reference

#include <DNA_pointcache_types.h>

Public Attributes

struct PointCachenext
 
struct PointCacheprev
 
int flag
 
int step
 
int simframe
 
int startframe
 
int endframe
 
int editframe
 
int last_exact
 
int last_valid
 
char _pad [4]
 
int totpoint
 
int index
 
short compression
 
char _pad0 [2]
 
char name [64]
 
char prev_name [64]
 
char info [128]
 
char path [1024]
 
char * cached_frames
 
int cached_frames_len
 
char _pad1 [4]
 
struct ListBase mem_cache
 
struct PTCacheEditedit
 
void(* free_edit )(struct PTCacheEdit *edit)
 

Detailed Description

Definition at line 57 of file DNA_pointcache_types.h.

Member Data Documentation

◆ _pad

char PointCache::_pad[4]

Definition at line 89 of file DNA_pointcache_types.h.

◆ _pad0

char PointCache::_pad0[2]

Definition at line 97 of file DNA_pointcache_types.h.

◆ _pad1

char PointCache::_pad1[4]

Definition at line 111 of file DNA_pointcache_types.h.

◆ cached_frames

char* PointCache::cached_frames

Array of length endframe - startframe + 1 with flags to indicate cached frames. Can be later used for other per frame flags too if needed.

Definition at line 109 of file DNA_pointcache_types.h.

Referenced by BKE_ptcache_free(), BKE_ptcache_id_clear(), BKE_ptcache_id_exist(), BKE_ptcache_id_time(), BKE_ptcache_load_external(), BKE_ptcache_toggle_disk_cache(), BKE_ptcache_write(), direct_link_pointcache(), ptcache_copy(), and timeline_cache_find_next_cached_segment().

◆ cached_frames_len

int PointCache::cached_frames_len

◆ compression

short PointCache::compression

Definition at line 96 of file DNA_pointcache_types.h.

Referenced by ptcache_mem_frame_to_disk().

◆ edit

struct PTCacheEdit* PointCache::edit

◆ editframe

int PointCache::editframe

Frame being edited (runtime only).

Definition at line 84 of file DNA_pointcache_types.h.

◆ endframe

int PointCache::endframe

◆ flag

int PointCache::flag

◆ free_edit

void(* PointCache::free_edit) (struct PTCacheEdit *edit)

Free callback.

Definition at line 117 of file DNA_pointcache_types.h.

Referenced by BKE_ptcache_free(), direct_link_pointcache(), and PE_create_particle_edit().

◆ index

int PointCache::index

◆ info

char PointCache::info[128]

Definition at line 101 of file DNA_pointcache_types.h.

Referenced by BKE_ptcache_update_info().

◆ last_exact

int PointCache::last_exact

◆ last_valid

int PointCache::last_valid

Used for editing cache - what is the last baked frame.

Definition at line 88 of file DNA_pointcache_types.h.

◆ mem_cache

struct ListBase PointCache::mem_cache

◆ name

char PointCache::name[64]

◆ next

struct PointCache* PointCache::next

Definition at line 58 of file DNA_pointcache_types.h.

Referenced by BKE_ptcache_copy_list(), and object_lib_override_apply_post().

◆ path

char PointCache::path[1024]

File path, 1024 = FILE_MAX.

Definition at line 103 of file DNA_pointcache_types.h.

Referenced by ptcache_path().

◆ prev

struct PointCache * PointCache::prev

Definition at line 58 of file DNA_pointcache_types.h.

◆ prev_name

char PointCache::prev_name[64]

Definition at line 100 of file DNA_pointcache_types.h.

◆ simframe

int PointCache::simframe

Current frame of simulation (only if SIMULATION_VALID).

Definition at line 78 of file DNA_pointcache_types.h.

Referenced by BKE_ptcache_invalidate(), BKE_ptcache_read(), BKE_ptcache_validate(), clothModifier_do(), direct_link_pointcache(), ptcache_copy(), sbObjectStep(), and system_step().

◆ startframe

int PointCache::startframe

◆ step

int PointCache::step

The number of frames between cached frames. This should probably be an upper bound for a per point adaptive step in the future, but for now it's the same for all points. Without adaptivity this can effect the perceived simulation quite a bit though. If for example particles are colliding with a horizontal plane (with high damping) they quickly come to a stop on the plane, however there are still forces acting on the particle (gravity and collisions), so the particle velocity isn't necessarily zero for the whole duration of the frame even if the particle seems stationary. If all simulation frames aren't cached (step > 1) these velocities are interpolated into movement for the non-cached frames. The result will look like the point is oscillating around the collision location. So for now cache step should be set to 1 for accurate reproduction of collisions.

Definition at line 75 of file DNA_pointcache_types.h.

Referenced by BKE_fluid_modifier_create_type_data(), BKE_modifier_blend_write(), BKE_ptcache_add(), blo_do_versions_pre250(), dynamics_step(), initData(), ptcache_add_new_exec(), ptcache_particle_interpolate(), ptcache_particle_totwrite(), ptcache_particle_write(), and ptcache_write_needed().

◆ totpoint

int PointCache::totpoint

Number of cached points.

Definition at line 93 of file DNA_pointcache_types.h.

Referenced by BKE_ptcache_load_external(), BKE_ptcache_update_info(), and tot_particles().


The documentation for this struct was generated from the following file: