Eyeon:Script/Reference/Applications/Fuse/Classes/Region3D/Contains

From VFXPedia

< Eyeon:Script | Reference | Applications | Fuse | Classes | Region3D
Revision as of 07:34, 14 December 2007 by Daniel (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents


Summary

The Contains function is used to test if the region includes the given position, and to find out the color of the region at that point, if any.

Usage

value = Region3D:Contains(Vector3f pos, Pixel& color)


pos (Vector3f, required)

A Vector3f containing the position to be tested.

color (Pixel reference, optional)

This argument must be a Pixel variable, which is set to the color of the region at position 'pos' on return. This is usually black (0,0,0) or white (1,1,1), but may be other values when e.g. an image region is used.


value (number)

The value of the region at position 'pos'. Usually 0.0 or 1.0, but may be in between for regions with soft edges.

Example

  local color
 
  -- p is a Particle object
  local val = region:Contains(p.Position, color)
 
  if val > 0.0 then
     -- p is inside the region's outer edges
     -- color is a Pixel containing the region's color, or white
   end


Tips for Contains (edit)

EyeonTips:Script/Reference/Applications/Fuse/Classes/Region3D/Contains