Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/06/2008 at 08:05, xxxxxxxx wrote:
User Information: Cinema 4D Version: 10.5 Platform: Windows ; Language(s) : C++ ;
--------- Hi
I have defined a BaseObject *cam = BaseObject::Alloc(Ocamera);
How can I otain the objects field of view ? The documentation says, this value is not stored inside a container (see GetData()), but I haven't found the appropriate Getter for this data.
Cheers SnakeByte
On 05/06/2008 at 08:23, xxxxxxxx wrote:
You have to use GetParameter()/SetParameter(). Check the code below, cam is the camera object:
> \> GeData d; \> if (cam->GetParameter(DescLevel(CAMERAOBJECT_FOV),d,0)) \> { \> Real fov = d.GetReal(); \> GePrint(RealToString(fov)); //print current FOV \> d = pi/2; //set FOV to 90 degree \> cam->SetParameter(DescLevel(CAMERAOBJECT_FOV),d,0); \> cam->Message(MSG_UPDATE); \> EventAdd(); \> } \>
\> GeData d; \> if (cam->GetParameter(DescLevel(CAMERAOBJECT_FOV),d,0)) \> { \> Real fov = d.GetReal(); \> GePrint(RealToString(fov)); //print current FOV \> d = pi/2; //set FOV to 90 degree \> cam->SetParameter(DescLevel(CAMERAOBJECT_FOV),d,0); \> cam->Message(MSG_UPDATE); \> EventAdd(); \> } \>
cheers, Matthias
On 05/06/2008 at 10:22, xxxxxxxx wrote:
Thanks Matthias, that was it. I wasn't sure about the GetParameter()'s param GeData d.