Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_subdiv_eval.h
| Show All 9 Lines | |||||
| #include "BLI_sys_types.h" | #include "BLI_sys_types.h" | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| #endif | #endif | ||||
| struct Mesh; | struct Mesh; | ||||
| struct OpenSubdiv_EvaluatorCache; | struct OpenSubdiv_EvaluatorCache; | ||||
| struct OpenSubdiv_EvaluatorSettings; | |||||
| struct Subdiv; | struct Subdiv; | ||||
| typedef enum eSubdivEvaluatorType { | typedef enum eSubdivEvaluatorType { | ||||
| SUBDIV_EVALUATOR_TYPE_CPU, | SUBDIV_EVALUATOR_TYPE_CPU, | ||||
| SUBDIV_EVALUATOR_TYPE_GLSL_COMPUTE, | SUBDIV_EVALUATOR_TYPE_GLSL_COMPUTE, | ||||
| } eSubdivEvaluatorType; | } eSubdivEvaluatorType; | ||||
| /* Returns true if evaluator is ready for use. */ | /* Returns true if evaluator is ready for use. */ | ||||
| bool BKE_subdiv_eval_begin(struct Subdiv *subdiv, | bool BKE_subdiv_eval_begin(struct Subdiv *subdiv, | ||||
| eSubdivEvaluatorType evaluator_type, | eSubdivEvaluatorType evaluator_type, | ||||
| struct OpenSubdiv_EvaluatorCache *evaluator_cache); | struct OpenSubdiv_EvaluatorCache *evaluator_cache, | ||||
| const struct OpenSubdiv_EvaluatorSettings *settings); | |||||
| /* coarse_vertex_cos is an optional argument which allows to override coordinates of the coarse | /* coarse_vertex_cos is an optional argument which allows to override coordinates of the coarse | ||||
| * mesh. */ | * mesh. */ | ||||
| bool BKE_subdiv_eval_begin_from_mesh(struct Subdiv *subdiv, | bool BKE_subdiv_eval_begin_from_mesh(struct Subdiv *subdiv, | ||||
| const struct Mesh *mesh, | const struct Mesh *mesh, | ||||
| const float (*coarse_vertex_cos)[3], | const float (*coarse_vertex_cos)[3], | ||||
| eSubdivEvaluatorType evaluator_type, | eSubdivEvaluatorType evaluator_type, | ||||
| struct OpenSubdiv_EvaluatorCache *evaluator_cache); | struct OpenSubdiv_EvaluatorCache *evaluator_cache); | ||||
| Show All 18 Lines | void BKE_subdiv_eval_limit_point_and_derivatives(struct Subdiv *subdiv, | ||||
| float u, | float u, | ||||
| float v, | float v, | ||||
| float r_P[3], | float r_P[3], | ||||
| float r_dPdu[3], | float r_dPdu[3], | ||||
| float r_dPdv[3]); | float r_dPdv[3]); | ||||
| void BKE_subdiv_eval_limit_point_and_normal( | void BKE_subdiv_eval_limit_point_and_normal( | ||||
| struct Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3], float r_N[3]); | struct Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3], float r_N[3]); | ||||
| /* Evaluate smoothly interpolated vertex data (such as orco). */ | |||||
| void BKE_subdiv_eval_vertex_data(struct Subdiv *subdiv, | |||||
| const int ptex_face_index, | |||||
| const float u, | |||||
| const float v, | |||||
| float r_vertex_data[]); | |||||
| /* Evaluate face-varying layer (such as UV). */ | /* Evaluate face-varying layer (such as UV). */ | ||||
| void BKE_subdiv_eval_face_varying(struct Subdiv *subdiv, | void BKE_subdiv_eval_face_varying(struct Subdiv *subdiv, | ||||
| int face_varying_channel, | int face_varying_channel, | ||||
| int ptex_face_index, | int ptex_face_index, | ||||
| float u, | float u, | ||||
| float v, | float v, | ||||
| float r_face_varying[2]); | float r_face_varying[2]); | ||||
| Show All 21 Lines | |||||