summaryrefslogtreecommitdiff
path: root/graphics/asymptote/base/three.asy
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/base/three.asy')
-rw-r--r--graphics/asymptote/base/three.asy8
1 files changed, 8 insertions, 0 deletions
diff --git a/graphics/asymptote/base/three.asy b/graphics/asymptote/base/three.asy
index de03d7c5ec..d7a20b516c 100644
--- a/graphics/asymptote/base/three.asy
+++ b/graphics/asymptote/base/three.asy
@@ -1880,6 +1880,14 @@ transform3 align(triple u)
return c >= 0 ? identity(4) : diagonal(1,-1,-1,1);
}
+// Align Label with normal in direction dir.
+Label align(Label L, triple dir)
+{
+ Label L=L.copy();
+ L.transform3(align(unit(dir)));
+ return L;
+}
+
// return a rotation that maps X,Y to the projection plane.
transform3 transform3(projection P=currentprojection)
{