From cbe754813cf9e532640506fb433fd420c893e60c Mon Sep 17 00:00:00 2001 From: dlegland Date: Wed, 8 Dec 2021 19:29:34 +0100 Subject: [PATCH] geom3d/orientedBox3d.m: update doc comments --- matGeom/geom3d/orientedBox3d.m | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/matGeom/geom3d/orientedBox3d.m b/matGeom/geom3d/orientedBox3d.m index ac0cee72..ecd481ca 100644 --- a/matGeom/geom3d/orientedBox3d.m +++ b/matGeom/geom3d/orientedBox3d.m @@ -1,7 +1,17 @@ -function box3d = orientedBox3d(pts) -%ORIENTEDBOX3D Object-oriented bounding box of a set of 3D points. +function [box3d, rotMat] = orientedBox3d(pts) +% Object-oriented bounding box of a set of 3D points. % % OOBB = orientedBox3d(PTS) +% REturns the oriented bounding box of the collection of points in the +% N-by-3 array PTS. The result is given as: +% [XC YC ZC L W H PHI THETA PSI] +% where (XC,YC,ZC) corresponds to the center of the box, (L,W,H) +% corresponds to the length, width, and depth of the box, and (PHI, +% THETA, PSI) is the orientation of the box as Euler angles. +% +% [OOBB, ROT] = orientedBox3d(PTS) +% Also returns the rotation matrix of the point cloud, as a 3-by-3 +% numeric array. % % Example % [v, f] = sphereMesh; @@ -14,11 +24,11 @@ % set(h, 'facecolor', 'none'); % % See also -% meshes3d, drawCuboid +% meshes3d, drawCuboid, rotation3dToEulerAngles % ------ % Author: David Legland -% e-mail: david.legland@nantes.inra.fr +% e-mail: david.legland@inrae.fr % Created: 2015-12-01, using Matlab 8.6.0.267246 (R2015b) % Copyright 2015 INRA - Cepia Software Platform.