WorldElementVisible
WorldElementVisible WorldIndex, Element, State
 
Parameters:

    WorldIndex = The Index of the world you wish to query
    Element= The Index of the captured world element you wish change to states upon
    State = The state flag of this element (0=hidden, 1 = Visible)
Returns: NONE
 

      The WorldElementVisible command lets the user toggle the visibility of any captured element within a world.



FACTS:


      * Hidden elements are neither drawn or checked during collision or ray intersection operations with the world



Mini Tutorial:


      This example creates a world, captures some of lines to it, then displays the visibility status of these elements.

  
; create a world and capture some lines to it
  id=NewWorld()
  CaptureToWorld Id
  
  For lp=0 To 10
     Line 100,100+(lp*5),200,200+(lp*10)
  Next
  
; Hide element 5 in this world
  WorldElementVisible id,5,off
  
; restore drawing to immediate mode
  DrawGFXImmediate
  
; display the number of elements
  Print GetWorldElements(1)
  
; display the Visible status of the element
; in this world
  For lp=0 To GetWorldElements(1)
     Print GetWorldElementVisible(1,lp)
  Next
  
; Display the screen and wait for a key press
  Sync
  WaitKey
  



This example would output.

  
  11
  1
  1
  1
  1
  0
  1
  1
  1
  1
  1
  0
  

 
Related Info: CameraGrabWorld | CreateWorld | DeleteWorld | GetFreeWorld | GetWorldStatus :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com