[Ves] Rotating 3D Model On a Single Axis Alone

shamsudheen shamsutk87 at gmail.com
Sat Feb 16 18:47:58 EST 2013


Hi All,

Im using vesKiwiViewerApp in my iOS application.

In my code, Im trying to rotate my 3D model manually using the below code

              vesVector4f rot ;
        
       	rot[0] = 1;
	rot[0] = 0;
	rot[0] = 0;       
       
        rot[3] = 90 * (M_PI/180.0);

  
        vesKiwiPolyDataRepresentation* polyDataRepresentation =  self->renderer.app->getKiwiPolyDataRepresentation(0);
        
        vesSharedPtr<vesActor> vesActor = polyDataRepresentation->actor();
      
        vesVector3f center = vesActor->center();
               
        vesActor->setRotation(vector);

       [self scheduleRender];


This would rotate my model on a particular direction.However when I change the axis ,the old rotated position is lost . Example code is given  below 

       	rot[0] = 0;
	rot[0] = 1;
	rot[0] = 0;       
       
        rot[3] = 90 * (M_PI/180.0);

I cannot find any methods which I can use to rotate the object on a single axis alone like vesActor->rotateX(90); or vesActor->rotateY(90) or vesActor->rotateZ(90)

Are there any similar methods available in VES/Kiwi ?

 Any help on this is appreciated

Thanks .

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20130216/7a8365d1/attachment.html>


More information about the Ves mailing list