SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Fields
SUMaterialPositionInput 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.
 
struct SUPoint3D points [4]
 
SUMaterialRef material
 Material to be applied.
 
struct SUVector3D projection
 

Detailed Description

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 3D points on the face's plane. If the 3D points are not on the face's plane they will be projected onto it. 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.

Since
SketchUp 2021.1, API 9.1

Field Documentation

size_t SUMaterialPositionInput::num_uv_coords
  Number of texture coordinates. 0 if the material

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

struct SUPoint3D SUMaterialPositionInput::points[4]

3D point corresponding to the texture coordinates. The points should all lie on the plane of the face the material is applied to.

struct SUVector3D SUMaterialPositionInput::projection

Optional projection direction. Leave as invalid (0, 0, 0) for no projection.


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