OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
occtl_geom.h File Reference

OCCT-Light: geometry primitive types and math utilities. More...

#include <stddef.h>
#include <stdint.h>
#include "occtl_core.h"
Include dependency graph for occtl_geom.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  occtl_point2_t
 
struct  occtl_vector2_t
 
struct  occtl_direction2_t
 
struct  occtl_point3_t
 
struct  occtl_vector3_t
 
struct  occtl_direction3_t
 
struct  occtl_axis1_placement_t
 
struct  occtl_axis2_placement_t
 
struct  occtl_axis3_placement_t
 
struct  occtl_transform_t
 
struct  occtl_axis2_placement2d_t
 
struct  occtl_geom_circle_t
 
struct  occtl_geom_ellipse_t
 
struct  occtl_geom_hyperbola_t
 
struct  occtl_geom_parabola_t
 
struct  occtl_geom2d_line_t
 
struct  occtl_geom2d_circle_t
 
struct  occtl_geom2d_ellipse_t
 
struct  occtl_geom2d_hyperbola_t
 
struct  occtl_geom2d_parabola_t
 
struct  occtl_geom_plane_t
 
struct  occtl_geom_cylindrical_surface_t
 
struct  occtl_geom_spherical_surface_t
 
struct  occtl_geom_conical_surface_t
 
struct  occtl_geom_toroidal_surface_t
 

Typedefs

typedef enum occtl_geom_continuity occtl_geom_continuity_t
 
typedef occtl_axis1_placement_t occtl_geom_line_t
 

Enumerations

enum  occtl_geom_continuity {
  OCCTL_GEOM_CONTINUITY_C0 = 0 , OCCTL_GEOM_CONTINUITY_G1 = 1 , OCCTL_GEOM_CONTINUITY_C1 = 2 , OCCTL_GEOM_CONTINUITY_G2 = 3 ,
  OCCTL_GEOM_CONTINUITY_C2 = 4 , OCCTL_GEOM_CONTINUITY_C3 = 5 , OCCTL_GEOM_CONTINUITY_CN = 6 , OCCTL_GEOM_CONTINUITY_RESERVED_FUTURE = 0x7fffffff
}
 

Functions

double occtl_point3_distance (occtl_point3_t a, occtl_point3_t b)
 
occtl_point3_t occtl_point3_midpoint (occtl_point3_t a, occtl_point3_t b)
 
occtl_point3_t occtl_point3_translate (occtl_point3_t p, occtl_vector3_t v)
 
occtl_point3_t occtl_transform_apply_point3 (occtl_transform_t t, occtl_point3_t p)
 
double occtl_point2_distance (occtl_point2_t a, occtl_point2_t b)
 
occtl_point2_t occtl_point2_midpoint (occtl_point2_t a, occtl_point2_t b)
 
double occtl_vector3_dot (occtl_vector3_t a, occtl_vector3_t b)
 
occtl_vector3_t occtl_vector3_cross (occtl_vector3_t a, occtl_vector3_t b)
 
double occtl_vector3_magnitude (occtl_vector3_t v)
 
occtl_status_t occtl_vector3_normalized (occtl_vector3_t v, occtl_vector3_t *out_result)
 
occtl_status_t occtl_vector3_angle (occtl_vector3_t a, occtl_vector3_t b, double *out_radians)
 
occtl_vector3_t occtl_vector3_add (occtl_vector3_t a, occtl_vector3_t b)
 
occtl_vector3_t occtl_vector3_sub (occtl_vector3_t a, occtl_vector3_t b)
 
occtl_vector3_t occtl_vector3_scaled (occtl_vector3_t v, double s)
 
occtl_vector3_t occtl_vector3_reversed (occtl_vector3_t v)
 
double occtl_vector2_dot (occtl_vector2_t a, occtl_vector2_t b)
 
double occtl_vector2_cross (occtl_vector2_t a, occtl_vector2_t b)
 
double occtl_vector2_magnitude (occtl_vector2_t v)
 
occtl_status_t occtl_vector2_normalized (occtl_vector2_t v, occtl_vector2_t *out_result)
 
occtl_status_t occtl_direction3_from_vector (occtl_vector3_t v, occtl_direction3_t *out_direction)
 
double occtl_direction3_dot (occtl_direction3_t a, occtl_direction3_t b)
 
occtl_vector3_t occtl_direction3_cross (occtl_direction3_t a, occtl_direction3_t b)
 
double occtl_direction3_angle (occtl_direction3_t a, occtl_direction3_t b)
 
occtl_direction3_t occtl_direction3_reversed (occtl_direction3_t d)
 
occtl_status_t occtl_direction3_transform (occtl_direction3_t d, occtl_transform_t t, occtl_direction3_t *out_direction)
 
occtl_status_t occtl_direction2_from_vector (occtl_vector2_t v, occtl_direction2_t *out_direction)
 
double occtl_direction2_angle (occtl_direction2_t a, occtl_direction2_t b)
 
occtl_transform_t occtl_transform_identity (void)
 
occtl_transform_t occtl_transform_translation (occtl_vector3_t v)
 
occtl_status_t occtl_transform_rotation (occtl_axis1_placement_t axis, double angle, occtl_transform_t *out_transform)
 
occtl_status_t occtl_transform_scale (occtl_point3_t center, double s, occtl_transform_t *out_transform)
 
occtl_transform_t occtl_transform_compose (occtl_transform_t first, occtl_transform_t second)
 
occtl_status_t occtl_transform_inverted (occtl_transform_t t, occtl_transform_t *out_transform)
 
occtl_vector3_t occtl_transform_apply_vector3 (occtl_transform_t t, occtl_vector3_t v)
 
occtl_status_t occtl_transform_from_axis2 (occtl_axis2_placement_t frame, occtl_transform_t *out_transform)
 
occtl_status_t occtl_transform_from_axis3 (occtl_axis3_placement_t frame, occtl_transform_t *out_transform)
 

Detailed Description

OCCT-Light: geometry primitive types and math utilities.

Exposes nine POD value types — 2D/3D points, vectors, unit directions, axis-placement coordinate systems, and a 3-by-4 affine transform — together with pure-math utility functions that operate on them. All types are plain C structs; no allocation, no handles, no ownership semantics.

Type name conventions follow the design documents (full English words, not OCCT-internal abbreviations) and the ISO 10303 STEP "axis placement" terminology for coordinate-system types.

All functions in this header are thread-safe: they perform stateless floating-point arithmetic on value-typed arguments; the only shared state they touch (on failure) is the caller's thread-local error slot.

Typedef Documentation

◆ occtl_geom_continuity_t

Continuity classification used by curve and surface handles.

Values match those of GeomAbs_Shape in OCCT (C0=0, G1=1, …). Append-only; do not reorder.

◆ occtl_geom_line_t

3D infinite line data.

Structurally identical to occtl_axis1_placement_t (origin + unit direction). Used as input to occtl_curve_create_line and output of occtl_curve_as_line.

Enumeration Type Documentation

◆ occtl_geom_continuity

Continuity classification used by curve and surface handles.

Values match those of GeomAbs_Shape in OCCT (C0=0, G1=1, …). Append-only; do not reorder.

Enumerator
OCCTL_GEOM_CONTINUITY_C0 

Positional continuity only.

OCCTL_GEOM_CONTINUITY_G1 

Tangent (geometric) continuity.

OCCTL_GEOM_CONTINUITY_C1 

First-derivative continuity.

OCCTL_GEOM_CONTINUITY_G2 

Curvature (geometric) continuity.

OCCTL_GEOM_CONTINUITY_C2 

Second-derivative continuity.

OCCTL_GEOM_CONTINUITY_C3 

Third-derivative continuity.

OCCTL_GEOM_CONTINUITY_CN 

Infinite (analytical) continuity.

Function Documentation

◆ occtl_direction2_angle()

double occtl_direction2_angle ( occtl_direction2_t  a,
occtl_direction2_t  b 
)

Angle from direction a to direction b, in radians, in [0, π].

Parameters
[in]aFirst direction.
[in]bSecond direction.
Returns
Angle in [0, π].

\par Thread Safety Yes.

See also
occtl_direction3_angle

◆ occtl_direction2_from_vector()

occtl_status_t occtl_direction2_from_vector ( occtl_vector2_t  v,
occtl_direction2_t out_direction 
)

Builds a 2D unit-direction from a 2D vector, normalising it.

Parameters
[in]vSource vector.
[out]out_directionOwns it (caller-allocated output slot). Must be non-NULL. On success receives the normalised direction; left unchanged on failure.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_direction is NULL.
OCCTL_GEOMETRY_INVALIDv has zero length.

\par Thread Safety Yes.

See also
occtl_vector2_normalized, occtl_direction3_from_vector

◆ occtl_direction3_angle()

double occtl_direction3_angle ( occtl_direction3_t  a,
occtl_direction3_t  b 
)

Angle between two unit directions, in radians.

Uses acos(a·b), clamped to [0, π] to avoid domain errors from floating-point rounding.

Parameters
[in]aFirst direction.
[in]bSecond direction.
Returns
Angle in [0, π].

\par Thread Safety Yes.

See also
occtl_direction3_dot, occtl_vector3_angle

◆ occtl_direction3_cross()

occtl_vector3_t occtl_direction3_cross ( occtl_direction3_t  a,
occtl_direction3_t  b 
)

Cross product of two unit directions, returned as a free vector.

The result is the zero vector when a and b are parallel or anti-parallel.

Parameters
[in]aFirst direction.
[in]bSecond direction.
Returns
a×b as a free occtl_vector3_t.

\par Thread Safety Yes.

See also
occtl_vector3_cross, occtl_direction3_dot

◆ occtl_direction3_dot()

double occtl_direction3_dot ( occtl_direction3_t  a,
occtl_direction3_t  b 
)

Dot product of two unit directions.

Parameters
[in]aFirst direction.
[in]bSecond direction.
Returns
Value in [-1, 1].

\par Thread Safety Yes.

See also
occtl_direction3_angle, occtl_vector3_dot

◆ occtl_direction3_from_vector()

occtl_status_t occtl_direction3_from_vector ( occtl_vector3_t  v,
occtl_direction3_t out_direction 
)

Builds a unit-direction from a 3D vector, normalising it.

Parameters
[in]vSource vector.
[out]out_directionOwns it (caller-allocated output slot). Must be non-NULL. On success receives the normalised direction; left unchanged on failure.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_direction is NULL.
OCCTL_GEOMETRY_INVALIDv has zero (or near-zero) length.

\par Thread Safety Yes.

See also
occtl_vector3_normalized, occtl_direction2_from_vector

◆ occtl_direction3_reversed()

occtl_direction3_t occtl_direction3_reversed ( occtl_direction3_t  d)

Reverses a unit direction.

Parameters
[in]dDirection.
Returns
-d.

\par Thread Safety Yes.

See also
occtl_vector3_reversed

◆ occtl_direction3_transform()

occtl_status_t occtl_direction3_transform ( occtl_direction3_t  d,
occtl_transform_t  t,
occtl_direction3_t out_direction 
)

Applies the linear (rotation/scale) part of a transform to a unit direction, then re-normalises the result.

Translation is not applied; only the 3×3 sub-matrix of t is used.

Parameters
[in]dDirection to transform.
[in]tTransform.
[out]out_directionOwns it (caller-allocated output slot). Must be non-NULL. On success receives the transformed and re-normalised direction; left unchanged on failure.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_direction is NULL.
OCCTL_GEOMETRY_INVALIDThe transform collapses the direction to zero (e.g. a zero-scale transform).

\par Thread Safety Yes.

See also
occtl_transform_apply_vector3, occtl_transform_apply_point3

◆ occtl_point2_distance()

double occtl_point2_distance ( occtl_point2_t  a,
occtl_point2_t  b 
)

Euclidean distance between two 2D points.

Parameters
[in]aFirst point.
[in]bSecond point.
Returns
Non-negative distance; zero when a == b.

\par Thread Safety Yes.

See also
occtl_point2_midpoint, occtl_point3_distance

◆ occtl_point2_midpoint()

occtl_point2_t occtl_point2_midpoint ( occtl_point2_t  a,
occtl_point2_t  b 
)

Midpoint of two 2D points.

Parameters
[in]aFirst point.
[in]bSecond point.
Returns
Point halfway between a and b.

\par Thread Safety Yes.

See also
occtl_point2_distance, occtl_point3_midpoint

◆ occtl_point3_distance()

double occtl_point3_distance ( occtl_point3_t  a,
occtl_point3_t  b 
)

Euclidean distance between two 3D points.

Parameters
[in]aFirst point.
[in]bSecond point.
Returns
Non-negative distance; zero when a == b.

\par Thread Safety Yes.

See also
occtl_point3_midpoint, occtl_vector3_magnitude

◆ occtl_point3_midpoint()

occtl_point3_t occtl_point3_midpoint ( occtl_point3_t  a,
occtl_point3_t  b 
)

Midpoint of two 3D points.

Parameters
[in]aFirst point.
[in]bSecond point.
Returns
Point halfway between a and b.

\par Thread Safety Yes.

See also
occtl_point3_distance, occtl_point3_translate

◆ occtl_point3_translate()

occtl_point3_t occtl_point3_translate ( occtl_point3_t  p,
occtl_vector3_t  v 
)

Translates a 3D point by a vector.

Parameters
[in]pPoint to translate.
[in]vTranslation vector.
Returns
p + v.

\par Thread Safety Yes.

See also
occtl_transform_apply_point3, occtl_transform_translation

◆ occtl_transform_apply_point3()

occtl_point3_t occtl_transform_apply_point3 ( occtl_transform_t  t,
occtl_point3_t  p 
)

Applies the full affine transform to a 3D point (includes translation).

Parameters
[in]tTransform to apply.
[in]pPoint to transform.
Returns
Transformed point.

\par Thread Safety Yes.

See also
occtl_transform_apply_vector3, occtl_transform_identity, occtl_point3_translate

◆ occtl_transform_apply_vector3()

occtl_vector3_t occtl_transform_apply_vector3 ( occtl_transform_t  t,
occtl_vector3_t  v 
)

Applies only the linear (3×3) part of a transform to a 3D vector (no translation).

Parameters
[in]tTransform.
[in]vVector to transform.
Returns
Transformed vector.

\par Thread Safety Yes.

See also
occtl_transform_apply_point3, occtl_direction3_transform

◆ occtl_transform_compose()

occtl_transform_t occtl_transform_compose ( occtl_transform_t  first,
occtl_transform_t  second 
)

Composes two transforms: applies first, then second.

Equivalent to the matrix product second * first (standard right-to-left composition convention).

Parameters
[in]firstTransform applied first.
[in]secondTransform applied second.
Returns
Composed transform.

\par Thread Safety Yes.

See also
occtl_transform_inverted, occtl_transform_identity

◆ occtl_transform_from_axis2()

occtl_status_t occtl_transform_from_axis2 ( occtl_axis2_placement_t  frame,
occtl_transform_t out_transform 
)

Builds a transform that maps the world frame onto the given coordinate frame (occtl_axis2_placement_t).

The returned transform takes a point expressed in the world frame and produces its equivalent expressed relative to frame. The Y direction is derived from frame.x_dir and frame.x_dir_ref.

Parameters
[in]frameFrame to map onto.
[out]out_transformOwns it (caller-allocated output slot). Must be non-NULL. On success receives the world→frame transform; left unchanged on failure.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_transform is NULL.
OCCTL_GEOMETRY_INVALIDframe.x_dir and frame.x_dir_ref are parallel, or any direction has zero length.

\par Thread Safety Yes.

See also
occtl_transform_from_axis3, occtl_transform_compose

◆ occtl_transform_from_axis3()

occtl_status_t occtl_transform_from_axis3 ( occtl_axis3_placement_t  frame,
occtl_transform_t out_transform 
)

Builds a transform from an explicit 3-axis frame (occtl_axis3_placement_t).

The 3×3 linear part of the result is the matrix whose columns are frame.x_dir, frame.y_dir, frame.z_dir; the translation column is frame.location. Useful for round-tripping arbitrary (possibly left-handed) frames produced by an external system.

Parameters
[in]frameFrame to map onto.
[out]out_transformOwns it (caller-allocated output slot). Must be non-NULL. On success receives the frame transform; left unchanged on failure.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_transform is NULL.
OCCTL_GEOMETRY_INVALIDThe three axis directions are linearly dependent (the frame is degenerate).

\par Thread Safety Yes.

See also
occtl_transform_from_axis2, occtl_transform_compose

◆ occtl_transform_identity()

occtl_transform_t occtl_transform_identity ( void  )

Returns the identity transform.

Applying the identity to a point or vector leaves it unchanged.

Returns
Identity transform.

\par Thread Safety Yes.

See also
occtl_transform_apply_point3, occtl_transform_compose

◆ occtl_transform_inverted()

occtl_status_t occtl_transform_inverted ( occtl_transform_t  t,
occtl_transform_t out_transform 
)

Computes the inverse of an affine transform.

Parameters
[in]tTransform to invert.
[out]out_transformOwns it (caller-allocated output slot). Must be non-NULL. On success receives the inverse transform; left unchanged on failure.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_transform is NULL.
OCCTL_GEOMETRY_INVALIDt is singular (determinant near zero).

\par Thread Safety Yes.

See also
occtl_transform_compose

◆ occtl_transform_rotation()

occtl_status_t occtl_transform_rotation ( occtl_axis1_placement_t  axis,
double  angle,
occtl_transform_t out_transform 
)

Builds a rotation transform around an axis by an angle.

Uses the Rodrigues rotation formula. The rotation is about the line defined by axis: points on the axis are fixed; other points rotate by angle radians (right-hand rule).

Parameters
[in]axisRotation axis (origin + unit direction).
[in]angleRotation angle in radians.
[out]out_transformOwns it (caller-allocated output slot). Must be non-NULL. On success receives the rotation transform; left unchanged on failure.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_transform is NULL.
OCCTL_GEOMETRY_INVALIDaxis.direction has zero (or near-zero) length.

\par Thread Safety Yes.

See also
occtl_transform_compose, occtl_transform_translation

◆ occtl_transform_scale()

occtl_status_t occtl_transform_scale ( occtl_point3_t  center,
double  s,
occtl_transform_t out_transform 
)

Builds a uniform-scale transform centred on a point.

Parameters
[in]centerCentre of scaling.
[in]sScale factor. Must not be zero.
[out]out_transformOwns it (caller-allocated output slot). Must be non-NULL. On success receives the scale transform; left unchanged on failure.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_transform is NULL.
OCCTL_GEOMETRY_INVALIDs is zero.

\par Thread Safety Yes.

See also
occtl_transform_compose

◆ occtl_transform_translation()

occtl_transform_t occtl_transform_translation ( occtl_vector3_t  v)

Returns a pure-translation transform.

Parameters
[in]vTranslation vector.
Returns
Transform that moves points by v.

\par Thread Safety Yes.

See also
occtl_transform_compose, occtl_point3_translate

◆ occtl_vector2_cross()

double occtl_vector2_cross ( occtl_vector2_t  a,
occtl_vector2_t  b 
)

Signed Z-component of the cross product of two 2D vectors.

Equivalent to the determinant a.x*b.y - a.y*b.x. Positive when b is counter-clockwise from a.

Parameters
[in]aFirst vector.
[in]bSecond vector.
Returns
Scalar Z of a×b.

\par Thread Safety Yes.

See also
occtl_vector2_dot, occtl_vector3_cross

◆ occtl_vector2_dot()

double occtl_vector2_dot ( occtl_vector2_t  a,
occtl_vector2_t  b 
)

Dot product of two 2D vectors.

Parameters
[in]aFirst vector.
[in]bSecond vector.
Returns
a·b.

\par Thread Safety Yes.

See also
occtl_vector2_cross, occtl_vector3_dot

◆ occtl_vector2_magnitude()

double occtl_vector2_magnitude ( occtl_vector2_t  v)

Euclidean magnitude of a 2D vector.

Parameters
[in]vVector.
Returns
Non-negative length.

\par Thread Safety Yes.

See also
occtl_vector2_normalized, occtl_vector3_magnitude

◆ occtl_vector2_normalized()

occtl_status_t occtl_vector2_normalized ( occtl_vector2_t  v,
occtl_vector2_t out_result 
)

Normalises a 2D vector to unit length.

Parameters
[in]vVector.
[out]out_resultOwns it (caller-allocated output slot). Must be non-NULL. On success receives the unit-length vector; left unchanged on failure.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_result is NULL.
OCCTL_GEOMETRY_INVALIDv has zero length.

\par Thread Safety Yes.

See also
occtl_vector2_magnitude, occtl_direction2_from_vector

◆ occtl_vector3_add()

occtl_vector3_t occtl_vector3_add ( occtl_vector3_t  a,
occtl_vector3_t  b 
)

Adds two 3D vectors.

Parameters
[in]aFirst vector.
[in]bSecond vector.
Returns
a + b.

\par Thread Safety Yes.

See also
occtl_vector3_sub, occtl_vector3_scaled

◆ occtl_vector3_angle()

occtl_status_t occtl_vector3_angle ( occtl_vector3_t  a,
occtl_vector3_t  b,
double *  out_radians 
)

Angle between two 3D vectors, in radians.

Parameters
[in]aFirst vector.
[in]bSecond vector.
[out]out_radiansOwns it (caller-allocated output slot). Must be non-NULL. On success receives a value in [0, π]; left unchanged on failure.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_radians is NULL.
OCCTL_GEOMETRY_INVALIDEither vector has zero length.

\par Thread Safety Yes.

See also
occtl_direction3_angle

◆ occtl_vector3_cross()

occtl_vector3_t occtl_vector3_cross ( occtl_vector3_t  a,
occtl_vector3_t  b 
)

Cross product of two 3D vectors.

Parameters
[in]aFirst vector.
[in]bSecond vector.
Returns
a×b. Result is the zero vector when a and b are parallel.

\par Thread Safety Yes.

See also
occtl_vector3_dot, occtl_direction3_cross

◆ occtl_vector3_dot()

double occtl_vector3_dot ( occtl_vector3_t  a,
occtl_vector3_t  b 
)

Dot product of two 3D vectors.

Parameters
[in]aFirst vector.
[in]bSecond vector.
Returns
a·b.

\par Thread Safety Yes.

See also
occtl_vector3_cross, occtl_direction3_dot

◆ occtl_vector3_magnitude()

double occtl_vector3_magnitude ( occtl_vector3_t  v)

Euclidean magnitude (length) of a 3D vector.

Parameters
[in]vVector.
Returns
Non-negative length; zero for the zero vector.

\par Thread Safety Yes.

See also
occtl_vector3_normalized, occtl_vector2_magnitude

◆ occtl_vector3_normalized()

occtl_status_t occtl_vector3_normalized ( occtl_vector3_t  v,
occtl_vector3_t out_result 
)

Normalises a 3D vector to unit length.

Parameters
[in]vVector to normalise.
[out]out_resultOwns it (caller-allocated output slot). Must be non-NULL. On success receives the unit-length vector; left unchanged on failure.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTout_result is NULL.
OCCTL_GEOMETRY_INVALIDv has zero (or near-zero) length.

\par Thread Safety Yes.

See also
occtl_vector3_magnitude, occtl_direction3_from_vector

◆ occtl_vector3_reversed()

occtl_vector3_t occtl_vector3_reversed ( occtl_vector3_t  v)

Reverses a 3D vector.

Parameters
[in]vVector.
Returns
-v.

\par Thread Safety Yes.

See also
occtl_direction3_reversed, occtl_vector3_scaled

◆ occtl_vector3_scaled()

occtl_vector3_t occtl_vector3_scaled ( occtl_vector3_t  v,
double  s 
)

Scales a 3D vector by a scalar.

Parameters
[in]vVector.
[in]sScalar factor.
Returns
s*v.

\par Thread Safety Yes.

See also
occtl_vector3_magnitude, occtl_vector3_add

◆ occtl_vector3_sub()

occtl_vector3_t occtl_vector3_sub ( occtl_vector3_t  a,
occtl_vector3_t  b 
)

Subtracts two 3D vectors.

Parameters
[in]aMinuend.
[in]bSubtrahend.
Returns
a - b.

\par Thread Safety Yes.

See also
occtl_vector3_add, occtl_vector3_reversed