[vtkusers] How to let the program know if an actor is at the back side of the renderwindow?

cokio cokio at sjtu.edu.cn
Sun Feb 22 21:40:56 EST 2004


Hi,all:
    I want to realize this effect: 
    If an actor in the renderwindow is at the back side, which I mean I cannot see it from the screen unless I adjust the camera by pressing the left button of the mouse, I want to do something .
    But how can the program know if the actor is at the back side?
    Using actor->Getposition()? 
    The code I'm writing now are as follows:
    {
    vtkCamera *cam1= vtkCamera::New();
	cam1= Renderer->GetActiveCamera();
    
    //if an actor is at the back side that we cannot see it directly, we adjust the camera.
    The code? 

    cam1->Azimuth(180); 
    }    
                                       
	And I don't know what is the position of an actor. We know the position of a point. But an actor is made up of many 
    points. Using actor->Getposition() returns which point's position? The center point? 

    Thank for ur advice!

    

 				

        cokio
        cokio at sjtu.edu.cn
          2004-02-23





More information about the vtkusers mailing list