Blender V5.0
blender::eevee::VelocityModule Class Reference

#include <eevee_velocity.hh>

Classes

struct  VelocityObjectData
struct  VelocityGeometryData

Public Member Functions

 VelocityModule (Instance &inst)
 ~VelocityModule ()
template<typename PassType>
void bind_resources (PassType &pass)

Public Attributes

Map< ObjectKey, VelocityObjectDatavelocity_map
Map< uint64_t, VelocityGeometryDatageometry_map
std::array< VelocityObjectBuf *, 3 > object_steps
std::array< VelocityGeometryBuf *, 3 > geometry_steps
int3 object_steps_usage = int3(0)
VelocityIndexBuf indirection_buf
float3 step_time
std::array< CameraDataBuf *, 3 > camera_steps

VelocityModule

void init ()
void step_camera_sync ()
void step_sync (eVelocityStep step, float time)
bool step_object_sync (ObjectKey &object_key, const ObjectRef &object_ref, int recalc, ResourceHandleRange resource_handle, ModifierData *modifier_data=nullptr, ParticleSystem *particle_sys=nullptr)
void step_swap ()
void begin_sync ()
void end_sync ()
bool camera_has_motion () const
bool camera_changed_projection () const
float step_time_delta_get (eVelocityStep start, eVelocityStep end) const
void geometry_steps_fill ()

Detailed Description

Container for scene velocity data.

Definition at line 41 of file eevee_velocity.hh.

Constructor & Destructor Documentation

◆ VelocityModule()

blender::eevee::VelocityModule::VelocityModule ( Instance & inst)
inline

Definition at line 116 of file eevee_velocity.hh.

References camera_steps, geometry_steps, and object_steps.

◆ ~VelocityModule()

blender::eevee::VelocityModule::~VelocityModule ( )
inline

Definition at line 129 of file eevee_velocity.hh.

References camera_steps, geometry_steps, and object_steps.

Member Function Documentation

◆ begin_sync()

void blender::eevee::VelocityModule::begin_sync ( )

◆ bind_resources()

◆ camera_changed_projection()

bool blender::eevee::VelocityModule::camera_changed_projection ( ) const

◆ camera_has_motion()

bool blender::eevee::VelocityModule::camera_has_motion ( ) const

◆ end_sync()

◆ geometry_steps_fill()

◆ init()

◆ step_camera_sync()

void blender::eevee::VelocityModule::step_camera_sync ( )

◆ step_object_sync()

◆ step_swap()

void blender::eevee::VelocityModule::step_swap ( )

In Render, moves the next frame data to previous frame data. Nullify next frame data. In Viewport, the current frame data will be used as previous frame data in the next frame.

Definition at line 305 of file eevee_velocity.cc.

References camera_steps, geometry_steps, geometry_steps_fill(), object_steps, object_steps_usage, blender::eevee::STEP_CURRENT, blender::eevee::STEP_NEXT, blender::eevee::STEP_PREVIOUS, step_time, and velocity_map.

◆ step_sync()

void blender::eevee::VelocityModule::step_sync ( eVelocityStep step,
float time )

◆ step_time_delta_get()

float blender::eevee::VelocityModule::step_time_delta_get ( eVelocityStep start,
eVelocityStep end ) const

Definition at line 450 of file eevee_velocity.cc.

References step_time.

Member Data Documentation

◆ camera_steps

std::array<CameraDataBuf *, 3> blender::eevee::VelocityModule::camera_steps

Copies of camera data. One for previous and one for next time step.

Definition at line 105 of file eevee_velocity.hh.

Referenced by bind_resources(), camera_changed_projection(), camera_has_motion(), end_sync(), step_camera_sync(), step_swap(), VelocityModule(), and ~VelocityModule().

◆ geometry_map

Map<uint64_t, VelocityGeometryData> blender::eevee::VelocityModule::geometry_map

Geometry to be copied to VelocityGeometryBuf. Indexed by evaluated ID hash. Empty after

Definition at line 90 of file eevee_velocity.hh.

Referenced by end_sync(), geometry_steps_fill(), and step_object_sync().

◆ geometry_steps

std::array<VelocityGeometryBuf *, 3> blender::eevee::VelocityModule::geometry_steps

Contains all Geometry steps from deforming objects for each time step.

Definition at line 94 of file eevee_velocity.hh.

Referenced by bind_resources(), geometry_steps_fill(), step_swap(), VelocityModule(), and ~VelocityModule().

◆ indirection_buf

VelocityIndexBuf blender::eevee::VelocityModule::indirection_buf

Buffer of all VelocityIndex used in this frame. Indexed by draw manager resource id.

Definition at line 98 of file eevee_velocity.hh.

Referenced by bind_resources(), and end_sync().

◆ object_steps

std::array<VelocityObjectBuf *, 3> blender::eevee::VelocityModule::object_steps

Contains all objects matrices for each time step.

Definition at line 92 of file eevee_velocity.hh.

Referenced by bind_resources(), end_sync(), step_object_sync(), step_swap(), VelocityModule(), and ~VelocityModule().

◆ object_steps_usage

int3 blender::eevee::VelocityModule::object_steps_usage = int3(0)

Number of occupied slot in each object_steps.

Definition at line 96 of file eevee_velocity.hh.

Referenced by begin_sync(), step_object_sync(), step_swap(), and step_sync().

◆ step_time

float3 blender::eevee::VelocityModule::step_time

Frame time at which each steps were evaluated.

Definition at line 100 of file eevee_velocity.hh.

Referenced by step_camera_sync(), step_swap(), and step_time_delta_get().

◆ velocity_map

Map<ObjectKey, VelocityObjectData> blender::eevee::VelocityModule::velocity_map

The map contains indirection indices to the obmat and geometry in each step buffer. Note that each object component gets its own resource id so one component correspond to one geometry offset.

Definition at line 88 of file eevee_velocity.hh.

Referenced by end_sync(), geometry_steps_fill(), step_object_sync(), and step_swap().


The documentation for this class was generated from the following files: