Line | |
---|
1 | % drawobject ... draws a (calibration) object of a specific type |
---|
2 | % |
---|
3 | % [fig] = drawobject(X, ctype, fig, {color}) |
---|
4 | % |
---|
5 | % X ...... 3xn matrix containg the object's corner points |
---|
6 | % if X is 4xn only the first 3 rows are used |
---|
7 | % ctype .. a string specifying the type of the object |
---|
8 | % according to the type the appropriate drawing functions is called |
---|
9 | % supported types are: |
---|
10 | % 'cube' - a cube |
---|
11 | % 'octagon' - a planar octagon |
---|
12 | % 'cloud' - a point cloud |
---|
13 | % fig .... figure handle |
---|
14 | % color .. color of plotting; defaults to blue |
---|
15 | % |
---|
16 | % fig .... returns the figure handle |
---|
17 | % |
---|
18 | % $Id: drawobject.m,v 2.0 2003/06/19 12:07:12 svoboda Exp $ |
---|
19 | |
---|
20 | function [fig] = drawobject(X,ctype,fig,color) |
---|
21 | |
---|
22 | if nargin < 4 |
---|
23 | color = 'b'; % default color |
---|
24 | end |
---|
25 | |
---|
26 | switch ctype |
---|
27 | case 'cube', |
---|
28 | drawcube(X,fig,color); |
---|
29 | case 'octagon', |
---|
30 | drawoctagon(X,fig,color); |
---|
31 | case 'cloud', |
---|
32 | drawcloud(X,fig,color); |
---|
33 | otherwise, |
---|
34 | error('unknown object type: ', ctype) |
---|
35 | end |
---|
36 | |
---|
37 | return |
---|
Note: See
TracBrowser
for help on using the repository browser.