Blender V5.0
blender::bke::subdiv::Displacement Struct Reference

#include <BKE_subdiv.hh>

Public Attributes

void(* initialize )(Displacement *displacement)
void(* eval_displacement )(Displacement *displacement, int ptex_face_index, float u, float v, const float3 &dPdu, const float3 &dPdv, float3 &r_D)
void(* free )(Displacement *displacement)
void * user_data

Detailed Description

Functor which evaluates displacement at a given (u, v) of given ptex face.

Definition at line 132 of file BKE_subdiv.hh.

Member Data Documentation

◆ eval_displacement

void(* blender::bke::subdiv::Displacement::eval_displacement) (Displacement *displacement, int ptex_face_index, float u, float v, const float3 &dPdu, const float3 &dPdv, float3 &r_D)

Return displacement which is to be added to the original coordinate.

Note
This function is supposed to return "continuous" displacement for each pf PTex faces created for special (non-quad) face. This means, if displacement is stored on per-corner manner (like MDisps for multires) this is up the displacement implementation to average boundaries of the displacement grids if needed.

Averaging of displacement for vertices created for over coarse vertices and edges is done by subdiv code.

Definition at line 154 of file BKE_subdiv.hh.

Referenced by blender::bke::subdiv::displacement_init_functions().

◆ free

void(* blender::bke::subdiv::Displacement::free) (Displacement *displacement)

Free the data, not the evaluator itself.

Definition at line 163 of file BKE_subdiv.hh.

Referenced by blender::bke::subdiv::displacement_init_functions().

◆ initialize

void(* blender::bke::subdiv::Displacement::initialize) (Displacement *displacement)

Initialize displacement evaluator.

Is called right before evaluation is actually needed. This allows to do some lazy initialization, like allocate evaluator from a main thread but then do actual evaluation from background job.

Definition at line 140 of file BKE_subdiv.hh.

Referenced by blender::bke::subdiv::displacement_init_functions().

◆ user_data


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