Mercurial > hg > octave-lyh
diff src/graphics.cc @ 7435:464a55f1a5c2
[project @ 2008-02-01 06:47:48 by jwe]
author | jwe |
---|---|
date | Fri, 01 Feb 2008 06:47:48 +0000 |
parents | 65f0a8ced9d2 |
children | 4e3b073e910e |
line wrap: on
line diff
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -2068,6 +2068,44 @@ return pos; } +ColumnVector +graphics_xform::xform_vector (double x, double y, double z) +{ return ::xform_vector (x, y, z); } + +Matrix +graphics_xform::xform_eye (void) +{ return ::xform_matrix (); } + +ColumnVector +graphics_xform::transform (double x, double y, double z, + bool use_scale) const +{ + if (use_scale) + { + x = sx.scale (x); + y = sy.scale (y); + z = sz.scale (z); + } + + return ::transform (xform, x, y, z); +} + +ColumnVector +graphics_xform::untransform (double x, double y, double z, + bool use_scale) const +{ + ColumnVector v = ::transform (xform_inv, x, y, z); + + if (use_scale) + { + v(0) = sx.unscale (v(0)); + v(1) = sy.unscale (v(1)); + v(2) = sz.unscale (v(2)); + } + + return v; +} + octave_value axes::get_default (const caseless_str& name) const {