LayOut C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Fields | Related Functions
SUPlane3D Struct Reference

Represents a 3D plane by the parameters a, b, c, d. For any point on the plane, ax + by + cz + d = 0. The coeficients are normalized so that a*a + b*b + c*c = 1. More...

#include <geometry.h>

Data Fields

double a
 The "a" factor in the plane equation. More...
 
double b
 The "b" factor in the plane equation. More...
 
double c
 The "c" factor in the plane equation. More...
 
double d
 The "d" factor in the plane equation. More...
 

Related Functions

(Note that these are not member functions.)

SU_RESULT SUPlane3DSetWithPoints (struct SUPlane3D *plane, const struct SUPoint3D *point1, const struct SUPoint3D *point2, const struct SUPoint3D *point3)
 Sets the plane using three points. More...
 
SU_RESULT SUPlane3DSetWithPointAndNormal (struct SUPlane3D *plane, const struct SUPoint3D *point, const struct SUVector3D *normal)
 Sets the plane using a point and normal vector. More...
 
SU_RESULT SUPlane3DSetWithCoefficients (struct SUPlane3D *plane, double a, double b, double c, double d)
 Sets the plane using equation coefficients. More...
 
SU_RESULT SUPlane3DGetPosition (const struct SUPlane3D *plane, struct SUPoint3D *position)
 Gets the position on the plane closest to the origin. More...
 
SU_RESULT SUPlane3DGetNormal (const struct SUPlane3D *plane, struct SUVector3D *normal)
 Gets the plane's unit normal vector. More...
 
SU_RESULT SUPlane3DIsOn (const struct SUPlane3D *plane, const struct SUPoint3D *point, bool *is_on)
 Gets whether or not the point is on the plane. More...
 
SU_RESULT SUPlane3DDistanceTo (const struct SUPlane3D *plane, const struct SUPoint3D *point, double *distance)
 Gets the distance from the point to the nearest point on the plane. More...
 
SU_RESULT SUPlane3DProjectTo (const struct SUPlane3D *plane, const struct SUPoint3D *point, struct SUPoint3D *projected_point)
 Projects a point onto the plane. More...
 
SU_RESULT SUPlane3DTransform (const struct SUTransformation *transform, struct SUPlane3D *plane)
 Transforms the provided 3D plane by applying the provided 3D transformation. More...
 

Detailed Description

Represents a 3D plane by the parameters a, b, c, d. For any point on the plane, ax + by + cz + d = 0. The coeficients are normalized so that a*a + b*b + c*c = 1.

Friends And Related Function Documentation

SU_RESULT SUPlane3DDistanceTo ( const struct SUPlane3D plane,
const struct SUPoint3D point,
double *  distance 
)
related

Gets the distance from the point to the nearest point on the plane.

Since
SketchUp 2018, API 6.0
Parameters
[in]planeThe plane.
[in]pointThe 3D point.
[out]distanceThe distance between the plane and point.
Returns
SU_RESULT SUPlane3DGetNormal ( const struct SUPlane3D plane,
struct SUVector3D normal 
)
related

Gets the plane's unit normal vector.

Since
SketchUp 2017, API 5.0
Parameters
[in]planeThe plane from which to get the normal.
[out]normalThe 3D vector struct retrieved.
Returns
SU_RESULT SUPlane3DGetPosition ( const struct SUPlane3D plane,
struct SUPoint3D position 
)
related

Gets the position on the plane closest to the origin.

Since
SketchUp 2016, API 4.0
Parameters
[in]planeThe plane from which to get the position.
[out]positionThe 3D point struct retrieved.
Returns
SU_RESULT SUPlane3DIsOn ( const struct SUPlane3D plane,
const struct SUPoint3D point,
bool *  is_on 
)
related

Gets whether or not the point is on the plane.

Since
SketchUp 2018, API 6.0
Parameters
[in]planeThe plane.
[in]pointThe 3D point.
[out]is_onWhether or not the point is on the plane.
Returns
SU_RESULT SUPlane3DProjectTo ( const struct SUPlane3D plane,
const struct SUPoint3D point,
struct SUPoint3D projected_point 
)
related

Projects a point onto the plane.

Since
SketchUp 2018, API 6.0
Parameters
[in]planeThe plane.
[in]pointThe 3D point to project onto the plane.
[out]projected_pointThe point resulting from the projection.
Returns
SU_RESULT SUPlane3DSetWithCoefficients ( struct SUPlane3D plane,
double  a,
double  b,
double  c,
double  d 
)
related

Sets the plane using equation coefficients.

Since
SketchUp 2018, API 6.0
Parameters
[out]planeThe plane defined by the coefficients.
[in]aThe first coefficient.
[in]bThe second coefficient.
[in]cThe third coefficient.
[in]dThe fourth coefficient.
Returns
SU_RESULT SUPlane3DSetWithPointAndNormal ( struct SUPlane3D plane,
const struct SUPoint3D point,
const struct SUVector3D normal 
)
related

Sets the plane using a point and normal vector.

Since
SketchUp 2018, API 6.0
Parameters
[out]planeThe plane defined by the point and normal.
[in]pointThe point.
[in]normalThe normal vector.
Returns
SU_RESULT SUPlane3DSetWithPoints ( struct SUPlane3D plane,
const struct SUPoint3D point1,
const struct SUPoint3D point2,
const struct SUPoint3D point3 
)
related

Sets the plane using three points.

Since
SketchUp 2018, API 6.0
Parameters
[out]planeThe plane defined by the three points.
[in]point1The first point.
[in]point2The second point.
[in]point3The third point.
Returns
SU_RESULT SUPlane3DTransform ( const struct SUTransformation transform,
struct SUPlane3D plane 
)
related

Transforms the provided 3D plane by applying the provided 3D transformation.

Since
SketchUp 2018, API 6.0
Parameters
[in]transformThe transformation to be applied.
[in,out]planeThe plane to be transformed.
Returns

Field Documentation

double SUPlane3D::a

The "a" factor in the plane equation.

double SUPlane3D::b

The "b" factor in the plane equation.

double SUPlane3D::c

The "c" factor in the plane equation.

double SUPlane3D::d

The "d" factor in the plane equation.


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