Back to class index
| float4::SetFromSphericalCoordinatesSyntaxvoid float4::SetFromSphericalCoordinates(float azimuth, float inclination, float radius); [10 lines of code]void float4::SetFromSphericalCoordinates(const float3 &spherical); [1 lines of code] Converts the given vector represented in spherical coordinates to an euclidean vector (x,y,z,w=0) triplet. Note The returned vector will be a direction vector with w==0. ParametersfloatazimuthThe direction, or yaw, of the vector. This function uses the convention that the X-Z plane is the 2D horizontal "map" plane, with the vector (0,0,radius) corresponding to the vector in the direction azimuth=0 and inclination=0. This value is typically in the range [-pi, pi] (, or [0, 2pi]). floatinclinationThe elevation, or pitch, of the vector. This function uses the convention that the +Y axis points towards up, i.e. +Y is the "Zenith direction". This value is typically in the range [-pi/2, pi/2]. floatradiusThe magnitude of the vector. This is usually >= 0, although passing in the zero vector as radius returns (0,0,0), and passing in a negative radius mirrors the coordinate along the origin. See AlsoSyntaxvoid float4::SetFromSphericalCoordinates(float azimuth, float inclination); [11 lines of code]Converts the given vector represented in spherical coordinates to an euclidean direction vector. ParametersfloatazimuthThe direction, or yaw, of the vector. This function uses the convention that the X-Z plane is the 2D horizontal "map" plane, with the vector (0,0,radius) corresponding to the vector in the direction azimuth=0 and inclination=0. This value is typically in the range [-pi, pi] (, or [0, 2pi]). floatinclinationThe elevation, or pitch, of the vector. This function uses the convention that the +Y axis points towards up, i.e. +Y is the "Zenith direction". This value is typically in the range [-pi/2, pi/2]. |