FORUMS: list search recent posts

Motion + cameraMatrixAtTime

COW Forums : Apple Motion

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Patric Logan
Motion + cameraMatrixAtTime
on Jun 17, 2010 at 6:49:48 am

Hello.
At last I know how to get camera position from Motion thanks to fxplug:

id 3dnow = [_apiManager apiForProtocol:@protocol(Fx3DAPI)];

NSData* camData = [3dnow cameraMatrixAtTime:renderInfo.frame];

double camMatrix [4][4];

[camData getBytes:&camMatrix
length:16 * sizeof (double)];

NSString *string = [NSString stringWithFormat:
@"Camera position:\n\nX: %f\nY: %f\nZ: %f",
camMatrix [0][3],camMatrix [1][3], camMatrix [2][3]];


Can anybody tell me how to get light position in motion? I don't know what command gives me that possibility.
Thanks!


Return to posts index

Patric Logan
Re: Motion + cameraMatrixAtTime
on Jun 17, 2010 at 10:06:15 am

id fx3DAPI 3dnow = [_apiManager apiForProtocol:@protocol(Fx3DAPI)];

NSData* camData = [3dnow cameraMatrixAtTime:renderInfo.frame];

double camMatrix [4][4];

[camData getBytes:&camMatrix
length:16 * sizeof (double)];

NSString *string = [NSString stringWithFormat:
@"Camera position:\n\nX: %f\nY: %f\nZ: %f",
camMatrix [0][3],camMatrix [1][3], camMatrix [2][3]];
camMatrix [0][3],camMatrix [1][3], camMatrix [2][3]];


p.s. fx3DAPI should be in angle bracket - code doesn't allow me to do that and in last post it dissapeared


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]