Blender V4.3
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 59 of file DNA_pointcache_types.h.

Member Data Documentation

◆ _pad

char PointCache::_pad[4]

Definition at line 91 of file DNA_pointcache_types.h.

◆ _pad0

char PointCache::_pad0[2]

Definition at line 100 of file DNA_pointcache_types.h.

◆ _pad1

char PointCache::_pad1[4]

Definition at line 114 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 112 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

◆ compression

short PointCache::compression

PTCACHE_COMPRESS_NO and others.

Definition at line 99 of file DNA_pointcache_types.h.

Referenced by ptcache_mem_frame_to_disk().

◆ edit

◆ editframe

int PointCache::editframe

Frame being edited (runtime only).

Definition at line 86 of file DNA_pointcache_types.h.

◆ endframe

◆ flag

◆ free_edit

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

Free callback.

Definition at line 120 of file DNA_pointcache_types.h.

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

◆ index

◆ info

char PointCache::info[128]

Definition at line 104 of file DNA_pointcache_types.h.

Referenced by BKE_ptcache_update_info(), and rna_def_pointcache_common().

◆ last_exact

◆ last_valid

int PointCache::last_valid

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

Definition at line 90 of file DNA_pointcache_types.h.

◆ mem_cache

◆ name

char PointCache::name[64]

◆ next

struct PointCache* PointCache::next

Definition at line 60 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 106 of file DNA_pointcache_types.h.

Referenced by ptcache_path().

◆ prev

struct PointCache * PointCache::prev

Definition at line 60 of file DNA_pointcache_types.h.

◆ prev_name

char PointCache::prev_name[64]

Definition at line 103 of file DNA_pointcache_types.h.

◆ simframe

int PointCache::simframe

Current frame of simulation (only if SIMULATION_VALID).

Definition at line 80 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

◆ 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 77 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(), init_data(), 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 95 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: