SketchUp C API

- Main Page
- Related Pages
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Data Fields
SUMaterialInput Struct Reference

SUMaterialInput contains information that is needed to apply a material to a face. More...

`#include <SketchUpAPI/model/geometry_input.h>`

## Data Fields
size_t | num_uv_coords
struct SUPoint2D | uv_coords [4]
| Texture coordinates.
size_t | vertex_indices [4]
SUMaterialRef | material
| Material to be applied.

## Detailed Description

SUMaterialInput contains information that is needed to apply a material to a face.

Deprecated:
  This struct is made obsolete by the newer SUMaterialPositionInput and left in place only for compatibility.

Note
  Prior to SketchUp 2021.1, API 9.1 it was not possible to apply a textured material without providing explicit UV coordinates.

See Also
  SUMaterialPositionInput

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. Once the `material` input is used (e.g. with SUEntitiesFill()), the material object must not be released since it will be associated with a parent object.

## Field Documentation

size_t SUMaterialInput::num_uv_coords

      Number of texture coordinates. 0 if the material

should be applied using default UV coordinates. 1 to 4 otherwise.

size_t SUMaterialInput::vertex_indices[4]

Vertex indices corresponding to the texture coordinates. Should reference the vertex array of the parent SUGeometryInputRef.

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

- SketchUpAPI/model/geometry_input.h