Changeset View
Changeset View
Standalone View
Standalone View
intern/opensubdiv/opensubdiv_topology_refiner_capi.h
| Show All 32 Lines | |||||
| // Those settings don't really belong to OpenSubdiv's topology refiner, but | // Those settings don't really belong to OpenSubdiv's topology refiner, but | ||||
| // we are keeping track of them on our side of topology refiner. This is to | // we are keeping track of them on our side of topology refiner. This is to | ||||
| // make it possible to ensure we are not trying to abuse same OpenSubdiv's | // make it possible to ensure we are not trying to abuse same OpenSubdiv's | ||||
| // topology refiner with different subdivision levels or with different | // topology refiner with different subdivision levels or with different | ||||
| // adaptive settings. | // adaptive settings. | ||||
| typedef struct OpenSubdiv_TopologyRefinerSettings { | typedef struct OpenSubdiv_TopologyRefinerSettings { | ||||
| bool is_adaptive; | bool is_adaptive; | ||||
| int level; | int level; | ||||
| int num_extra_vertex_data; | |||||
sergey: I am not convinced this belongs here.
Intuitively, neither topology refiner nor topology… | |||||
| } OpenSubdiv_TopologyRefinerSettings; | } OpenSubdiv_TopologyRefinerSettings; | ||||
| // C-style wrapper around actual topology refiner. | // C-style wrapper around actual topology refiner. | ||||
| // | // | ||||
| // The only purpose is to allow C-only code to access C++ implementation of the | // The only purpose is to allow C-only code to access C++ implementation of the | ||||
| // topology refiner. | // topology refiner. | ||||
| typedef struct OpenSubdiv_TopologyRefiner { | typedef struct OpenSubdiv_TopologyRefiner { | ||||
| // Query subdivision level the refiner is created for. | // Query subdivision level the refiner is created for. | ||||
| ▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | typedef struct OpenSubdiv_TopologyRefiner { | ||||
| // | // | ||||
| // This is an array of indices inside of face-varying array, array elements | // This is an array of indices inside of face-varying array, array elements | ||||
| // are aligned with face corners (or loops in Blender terminology). | // are aligned with face corners (or loops in Blender terminology). | ||||
| const int *(*getFaceFVarValueIndices)(const struct OpenSubdiv_TopologyRefiner *topology_refiner, | const int *(*getFaceFVarValueIndices)(const struct OpenSubdiv_TopologyRefiner *topology_refiner, | ||||
| const int face_index, | const int face_index, | ||||
| const int channel); | const int channel); | ||||
| ////////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////////// | ||||
| // Extra vertex data. | |||||
| int (*getNumExtraVertexData)(const struct OpenSubdiv_TopologyRefiner *topology_refiner); | |||||
| ////////////////////////////////////////////////////////////////////////////// | |||||
| // Internal use. | // Internal use. | ||||
| // Implementation of the topology refiner. | // Implementation of the topology refiner. | ||||
| struct OpenSubdiv_TopologyRefinerImpl *impl; | struct OpenSubdiv_TopologyRefinerImpl *impl; | ||||
| } OpenSubdiv_TopologyRefiner; | } OpenSubdiv_TopologyRefiner; | ||||
| // NOTE: Will return NULL in cases of bad topology. | // NOTE: Will return NULL in cases of bad topology. | ||||
| // NOTE: Mesh without faces is considered a bad topology. | // NOTE: Mesh without faces is considered a bad topology. | ||||
| Show All 20 Lines | |||||
I am not convinced this belongs here.
Intuitively, neither topology refiner nor topology itself depends on the number of vertex-varying data, and one would think that it should be possible to modify the amount of vertex-varying data after topology has been refined.
What am i missing here?