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 | Related Functions
SURay3D Struct Reference

Represents a 3D ray defined by a point and normal vector. The coordinates of the point are represented in inches. More...

`#include <SketchUpAPI/geometry.h>`

## Data Fields
struct SUPoint3D | point
| Origin of the ray.
struct SUVector3D | normal
| Direction of the ray.

## Related Functions
(Note that these are not member functions.)
enum SUResult | SURay3DIsOn (const struct SURay3D *ray, const struct SUPoint3D *point, bool *is_on)
| Gets whether or not the point is on the ray. More...
enum SUResult | SURay3DDistanceTo (const struct SURay3D *ray, const struct SUPoint3D *point, double *distance)
| Gets the distance from the point to the ray. More...
enum SUResult | SURay3DProjectTo (const struct SURay3D *ray, const struct SUPoint3D *point, struct SUPoint3D *projected_point)
| Projects a point onto the ray. More...

## Detailed Description

Represents a 3D ray defined by a point and normal vector. The coordinates of the point are represented in inches.

Since
  SketchUp 2018, API 6.0

## Friends And Related Function Documentation

enum SUResult SURay3DDistanceTo | ( | const struct SURay3D * | ray,
|  | const struct SUPoint3D * | point,
|  | double * | distance
| ) |  |
| related

Gets the distance from the point to the ray.

Since
  SketchUp 2018, API 6.0

Parameters

  [in] | ray | The ray.
  [in] | point | The 3D point.
  [out] | distance | The distance between the ray and point.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_INPUT if ray or point are NULL
  - SU_ERROR_NULL_POINTER_OUTPUT if distance is NULL

enum SUResult SURay3DIsOn | ( | const struct SURay3D * | ray,
|  | const struct SUPoint3D * | point,
|  | bool * | is_on
| ) |  |
| related

Gets whether or not the point is on the ray.

Since
  SketchUp 2018, API 6.0

Parameters

  [in] | ray | The ray.
  [in] | point | The 3D point.
  [out] | is_on | Whether or not the point is on the ray.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_INPUT if ray or point are NULL
  - SU_ERROR_NULL_POINTER_OUTPUT if is_on is NULL

enum SUResult SURay3DProjectTo | ( | const struct SURay3D * | ray,
|  | const struct SUPoint3D * | point,
|  | struct SUPoint3D * | projected_point
| ) |  |
| related

Projects a point onto the ray.

Since
  SketchUp 2018, API 6.0

Parameters

  [in] | ray | The ray.
  [in] | point | The 3D point to project onto the ray.
  [out] | projected_point | The point resulting from the projection.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_INPUT if ray or point are NULL
  - SU_ERROR_NULL_POINTER_OUTPUT if projected_point is NULL

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

- SketchUpAPI/geometry.h
- SketchUpAPI/geometry/ray3d.h