[Index for tmp_for_tar/vrml.doc] [Return to Master Index]

vrml_Viewpoint

(tmp_for_tar/vrml.doc/vrml_Viewpoint.m)


Function Synopsis

s = vrml_Viewpoint (...)

Help text

  s = vrml_Viewpoint (...)    - Vrml Viewpoint node

  s is a string of the form :
  ------------------------------------------------------------------
  Viewpoint { 
    exposedField SFFloat    fieldOfView    0.785398  # (0,pi)
    exposedField SFBool     jump           TRUE
    exposedField SFRotation orientation    0 0 1 0   # [-1,1],(-inf,inf)
    exposedField SFVec3f    position       0 0 10    # (-inf,inf)
    field        SFString   description    ""
  }
  ------------------------------------------------------------------

 Options :
 All the fields of the node

 Last modified: December 2000



Listing of function file tmp_for_tar/vrml.doc/vrml_Viewpoint.m

##  s = vrml_Viewpoint (...)    - Vrml Viewpoint node
##
##  s is a string of the form :
##  ------------------------------------------------------------------
##  Viewpoint { 
##    exposedField SFFloat    fieldOfView    0.785398  # (0,pi)
##    exposedField SFBool     jump           TRUE
##    exposedField SFRotation orientation    0 0 1 0   # [-1,1],(-inf,inf)
##    exposedField SFVec3f    position       0 0 10    # (-inf,inf)
##    field        SFString   description    ""
##  }
##  ------------------------------------------------------------------
##
## Options :
## All the fields of the node

## Author:        Etienne Grossmann  <etienne@isr.ist.utl.pt>
## Last modified: December 2000

function s = vrml_Viewpoint (...)

hash.dummy = 0;

if nargin, hash = setfield (hash, all_va_args); end
hash = rmfield (hash, "dummy");

tpl = struct ("fieldOfView",      "%8.3f",\
	      "description",      "%s",\
	      "jump",             "%s",\
	      "orientation",      "%8.3f %8.3f %8.3f %8.3f",\
	      "position",         "%8.3f %8.3f %8.3f");

body = "";
for [val,key] = hash,
  if !strcmp ("key", "dummy") && !isnan (val),
    body = [body,\
	    sprintf ("   %-20s   %s\n",key, 
		     sprintf (getfield (tpl,key), val))];
  end
end
s = sprintf ("Viewpoint { \n%s}\n", body);

Produced by oct2html on Sat Dec 2 19:08:39 2000
Cross-Directory links are: ON