SketchUp SDK
|
SUMaterialInput contains information that is needed to apply a material to a face. The conventional method for applying a material to a face is to use 1 to 4 UV coordinates, which are Cartesian textures coordinates and corresponding vertex indices on the face. The vertices are referenced by index into the top level SUGeometryInputRef's vertex array. The member variable 'material' must be a valid material object, and once the material input is used (e.g. with /ref SUEntitiesFill), the material object must not be released since it will be associated with a parent object. More...
#include <geometry_input.h>
Data Fields | |
size_t | num_uv_coords |
struct SUPoint2D | uv_coords [4] |
Texture coordinates. More... | |
size_t | vertex_indices [4] |
SUMaterialRef | material |
Material to be applied. More... | |
SUMaterialInput contains information that is needed to apply a material to a face. The conventional method for applying a material to a face is to use 1 to 4 UV coordinates, which are Cartesian textures coordinates and corresponding vertex indices on the face. The vertices are referenced by index into the top level SUGeometryInputRef's vertex array. The member variable 'material' must be a valid material object, and once the material input is used (e.g. with /ref SUEntitiesFill), the material object must not be released since it will be associated with a parent object.
SUMaterialRef SUMaterialInput::material |
Material to be applied.
size_t SUMaterialInput::num_uv_coords |
Number of texture coordinates. 0 if no texture.
1 to 4 otherwise.
struct SUPoint2D SUMaterialInput::uv_coords[4] |
Texture coordinates.
size_t SUMaterialInput::vertex_indices[4] |
Vertex indices corresponding to the texture coordinates. Should reference the vertex array of the parent SUGeometryInputRef.