Changeset View
Changeset View
Standalone View
Standalone View
intern/opensubdiv/internal/evaluator/evaluator_impl.h
| Show All 26 Lines | ||||||||||
| #include <opensubdiv/far/patchTable.h> | #include <opensubdiv/far/patchTable.h> | |||||||||
| #include "internal/base/memory.h" | #include "internal/base/memory.h" | |||||||||
| #include "opensubdiv_capi_type.h" | #include "opensubdiv_capi_type.h" | |||||||||
| struct OpenSubdiv_Buffer; | struct OpenSubdiv_Buffer; | |||||||||
| struct OpenSubdiv_EvaluatorCacheImpl; | struct OpenSubdiv_EvaluatorCacheImpl; | |||||||||
| struct OpenSubdiv_EvaluatorSettings; | ||||||||||
| struct OpenSubdiv_PatchCoord; | struct OpenSubdiv_PatchCoord; | |||||||||
| struct OpenSubdiv_TopologyRefiner; | struct OpenSubdiv_TopologyRefiner; | |||||||||
| namespace blender { | namespace blender { | |||||||||
| namespace opensubdiv { | namespace opensubdiv { | |||||||||
| class PatchMap; | class PatchMap; | |||||||||
| Show All 12 Lines | public: | |||||||||
| EvalOutputAPI(EvalOutput *implementation, PatchMap *patch_map); | EvalOutputAPI(EvalOutput *implementation, PatchMap *patch_map); | |||||||||
| ~EvalOutputAPI(); | ~EvalOutputAPI(); | |||||||||
| // Set coarse positions from a continuous array of coordinates. | // Set coarse positions from a continuous array of coordinates. | |||||||||
| void setCoarsePositions(const float *positions, | void setCoarsePositions(const float *positions, | |||||||||
| const int start_vertex_index, | const int start_vertex_index, | |||||||||
| const int num_vertices); | const int num_vertices); | |||||||||
| // Set extra vertex data from a continuous array of data. | ||||||||||
sergeyUnsubmitted Not Done Inline Actions
sergey: | ||||||||||
| void setVertexData(const float *extra_data, | ||||||||||
| const int start_vertex_index, | ||||||||||
| const int num_vertices); | ||||||||||
| // Set varying data from a continuous array of data. | // Set varying data from a continuous array of data. | |||||||||
| void setVaryingData(const float *varying_data, | void setVaryingData(const float *varying_data, | |||||||||
| const int start_vertex_index, | const int start_vertex_index, | |||||||||
| const int num_vertices); | const int num_vertices); | |||||||||
| // Set face varying data from a continuous array of data. | // Set face varying data from a continuous array of data. | |||||||||
| // | // | |||||||||
| // TODO(sergey): Find a better name for vertex here. It is not the vertex of | // TODO(sergey): Find a better name for vertex here. It is not the vertex of | |||||||||
| // geometry, but a vertex of UV map. | // geometry, but a vertex of UV map. | |||||||||
| Show All 39 Lines | public: | |||||||||
| void evaluateLimit(const int ptex_face_index, | void evaluateLimit(const int ptex_face_index, | |||||||||
| float face_u, | float face_u, | |||||||||
| float face_v, | float face_v, | |||||||||
| float P[3], | float P[3], | |||||||||
| float dPdu[3], | float dPdu[3], | |||||||||
| float dPdv[3]); | float dPdv[3]); | |||||||||
| // Evaluate varying data at a given bilinear coordinate of given ptex face. | // Evaluate varying data at a given bilinear coordinate of given ptex face. | |||||||||
| void evaluateVertexData(const int ptes_face_index, | ||||||||||
| float face_u, | ||||||||||
| float face_v, | ||||||||||
| float extra_data[]); | ||||||||||
| // Evaluate varying data at a given bilinear coordinate of given ptex face. | ||||||||||
| void evaluateVarying(const int ptes_face_index, float face_u, float face_v, float varying[3]); | void evaluateVarying(const int ptes_face_index, float face_u, float face_v, float varying[3]); | |||||||||
| // Evaluate facee-varying data at a given bilinear coordinate of given | // Evaluate facee-varying data at a given bilinear coordinate of given | |||||||||
| // ptex face. | // ptex face. | |||||||||
| void evaluateFaceVarying(const int face_varying_channel, | void evaluateFaceVarying(const int face_varying_channel, | |||||||||
| const int ptes_face_index, | const int ptes_face_index, | |||||||||
| float face_u, | float face_u, | |||||||||
| float face_v, | float face_v, | |||||||||
| ▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | public: | |||||||||
| const OpenSubdiv::Far::PatchTable *patch_table; | const OpenSubdiv::Far::PatchTable *patch_table; | |||||||||
| MEM_CXX_CLASS_ALLOC_FUNCS("OpenSubdiv_EvaluatorImpl"); | MEM_CXX_CLASS_ALLOC_FUNCS("OpenSubdiv_EvaluatorImpl"); | |||||||||
| }; | }; | |||||||||
| OpenSubdiv_EvaluatorImpl *openSubdiv_createEvaluatorInternal( | OpenSubdiv_EvaluatorImpl *openSubdiv_createEvaluatorInternal( | |||||||||
| struct OpenSubdiv_TopologyRefiner *topology_refiner, | struct OpenSubdiv_TopologyRefiner *topology_refiner, | |||||||||
| eOpenSubdivEvaluator evaluator_type, | eOpenSubdivEvaluator evaluator_type, | |||||||||
| OpenSubdiv_EvaluatorCacheImpl *evaluator_cache_descr); | OpenSubdiv_EvaluatorCacheImpl *evaluator_cache_descr, | |||||||||
| const OpenSubdiv_EvaluatorSettings *settings); | ||||||||||
| void openSubdiv_deleteEvaluatorInternal(OpenSubdiv_EvaluatorImpl *evaluator); | void openSubdiv_deleteEvaluatorInternal(OpenSubdiv_EvaluatorImpl *evaluator); | |||||||||
| #endif // OPENSUBDIV_EVALUATOR_IMPL_H_ | #endif // OPENSUBDIV_EVALUATOR_IMPL_H_ | |||||||||