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

vrml_PointLight

(tmp_for_tar/vrml.doc/vrml_PointLight.m)


Function Synopsis

s = vrml_PointLight (...)

Help text

  s = vrml_PointLight (...)   - Vrml PointLight node

  s is a string of the form :
  ------------------------------------------------------------------
  PointLight { 
    exposedField SFFloat ambientIntensity  0       ## [0,1]
    exposedField SFVec3f attenuation       1 0 0   ## [0,inf)
    exposedField SFColor color             1 1 1   ## [0,1]
    exposedField SFFloat intensity         1       ## [0,1]
    exposedField SFVec3f location          0 0 0   ## (-inf,inf)
    exposedField SFBool  on                TRUE 
    exposedField SFFloat radius            100     ## [0,inf)
  }
  ------------------------------------------------------------------

 Options :
 All the fields of the node

 Last modified: December 2000



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

##  s = vrml_PointLight (...)   - Vrml PointLight node
##
##  s is a string of the form :
##  ------------------------------------------------------------------
##  PointLight { 
##    exposedField SFFloat ambientIntensity  0       ## [0,1]
##    exposedField SFVec3f attenuation       1 0 0   ## [0,inf)
##    exposedField SFColor color             1 1 1   ## [0,1]
##    exposedField SFFloat intensity         1       ## [0,1]
##    exposedField SFVec3f location          0 0 0   ## (-inf,inf)
##    exposedField SFBool  on                TRUE 
##    exposedField SFFloat radius            100     ## [0,inf)
##  }
##  ------------------------------------------------------------------
##
## Options :
## All the fields of the node

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

function s = vrml_PointLight (...)

hash.dummy = 0;

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

tpl = struct ("ambientIntensity", "%8.3f",\
	      "intensity",        "%8.3f",\
	      "radius",           "%8.3f",\
	      "on",               "%s",\
	      "attenuation",      "%8.3f %8.3f %8.3f",\
	      "color",            "%8.3f %8.3f %8.3f",\
	      "location",         "%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 ("PointLight { \n%s}\n", body);

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