Skip to content

Commit

Permalink
Match changes in cesium-native branch
Browse files Browse the repository at this point in the history
  • Loading branch information
azrogers committed Jan 31, 2024
1 parent 954145f commit 53784ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Runtime/CesiumSimplePlanarEllipsoidCurve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
namespace CesiumForUnity
{
/// <summary>
/// Describes an ellipsoidal curve that lies on a plane intersecting the center of the earth and
/// both the source and destination points. This curve can be sampled at any point along its length.
/// Describes a curve that's a section of an ellipse that lies on a plane intersecting the center of the earth and
/// both the source and destination points on a WGS84 ellipsoid. This curve can be sampled at any point along its length.
/// </summary>
[ReinteropNativeImplementation("CesiumForUnityNative::CesiumSimplePlanarEllipsoidCurveImpl", "CesiumSimplePlanarEllipsoidCurveImpl.h")]
[IconAttribute("Packages/com.cesium.unity/Editor/Resources/Cesium-24x24.png")]
Expand Down
8 changes: 4 additions & 4 deletions native~/Runtime/src/CesiumSimplePlanarEllipsoidCurveImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ CesiumSimplePlanarEllipsoidCurveImpl::~CesiumSimplePlanarEllipsoidCurveImpl() {}

bool CesiumSimplePlanarEllipsoidCurveImpl::
CreateFromEarthCenteredEarthFixedCoordinates(
const DotNet::CesiumForUnity::CesiumSimplePlanarEllipsoidCurve&
path,
const DotNet::CesiumForUnity::CesiumSimplePlanarEllipsoidCurve& path,
const DotNet::Unity::Mathematics::double3 sourceEcef,
const DotNet::Unity::Mathematics::double3 destinationEcef) {
std::optional<SimplePlanarEllipsoidCurve> flightPath =
SimplePlanarEllipsoidCurve::fromEarthCenteredEarthFixedCoordinates(
Ellipsoid::WGS84,
glm::dvec3(sourceEcef.x, sourceEcef.y, sourceEcef.z),
glm::dvec3(destinationEcef.x, destinationEcef.y, destinationEcef.z));
if (!flightPath.has_value()) {
Expand All @@ -39,6 +39,7 @@ bool CesiumSimplePlanarEllipsoidCurveImpl::CreateFromLongitudeLatitudeHeight(
const DotNet::Unity::Mathematics::double3 destinationLlh) {
std::optional<SimplePlanarEllipsoidCurve> flightPath =
SimplePlanarEllipsoidCurve::fromLongitudeLatitudeHeight(
Ellipsoid::WGS84,
Cartographic(sourceLlh.x, sourceLlh.y, sourceLlh.z),
Cartographic(destinationLlh.x, destinationLlh.y, destinationLlh.z));

Expand All @@ -58,8 +59,7 @@ CesiumSimplePlanarEllipsoidCurveImpl::GetPosition(
double additionalHeight) const {
assert(this->_curve != nullptr);

glm::dvec3 result =
this->_curve->getPosition(percentage, additionalHeight);
glm::dvec3 result = this->_curve->getPosition(percentage, additionalHeight);

return DotNet::Unity::Mathematics::double3::Construct(
result.x,
Expand Down

0 comments on commit 53784ae

Please sign in to comment.