Notifications
Clear all

[Closed] GetAltitudeAzimuth

 em3

I am trying to print the altitude and azimuth in the listener but don’t know how to call this function.

<void>GetAltitudeAzimuth <time>time <&float>altitude <&float>azimuth

There is no other documentation I can find on this. Can someone help me out?

7 Replies
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

where did you get this function?

 em3

Max 2012 Help

<void>GetAltitudeAzimuth <time>time <&float>altitude <&float>azimuth altitude is In and Out parameter azimuth is In and Out parameter Returns the altitude and azimuth values corresponding to the time given as first argument into the by-reference variables given by the second and third argument.

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

ok… it’s a method of IDaylightSystem interface. so to get it works you have to call:


 altitude = azimuth = 0
 <DaylightAssemblyHead>.GetAltitudeAzimuth currenttime &altitude &azimuth
 

[size=2][size=2]
[/size][/size]
where <DaylightAssemblyHead> is daylight system group head

 em3

Thank you Denis. I did that but it just returns “OK”

theInt = DaylightSystemFactory2.Create sunClass:mr_Sun skyClass:mr_Sky
--> <MixinInterface:IDaylightSystem>
theInt.getSun()
--> mr Sun
theInt.getSky()
--> mr Sky
theInt = DaylightSystemFactory2.Create sunClass:DirectionalLight
--> <MixinInterface:IDaylightSystem>
theInt.getSun()
--> Free Directional Light
theInt.getSky()
--> Skylight
altitude = azimuth = 0.0
aa = $Daylight001.GetAltitudeAzimuth currenttime &altitude &azimuth
theint

it puts values in altitude and azimuth in my sample. get it from there

1 Reply
 em3
(@em3)
Joined: 11 months ago

Posts: 0

DOH! Thank you Denis!

 em3

for anyone who might be doing this the azimuth and altitude are returned in radians which need to be converted to degrees.

az = ((180*azimuth)/pi)