首页 / 浏览问题 / 组件GIS / 问题详情
SuperMap Hi-Fi 3D SDK for Unreal, 怎么设置光照时间和光照时区
81EXP 2026年07月19日
怎么在cpp文件里,用c++ 设置超图光照时间和时区? 用下面的代码执行没效果

void ASuperMap_DataInfoProcessing::SetSceneInfo(FDateTime dateTime, float dateTimeZone)
{
    UnrealWorkspaceManager::SceneInfo& sceneinfo = UnrealWorkspaceManager::GetSingleton()->GetSceneInfo();
    sceneinfo.m_tSunTime = dateTime;
    sceneinfo.m_fTimeZone = dateTimeZone;
    FVector cameraLocation = GetWorld()->GetFirstPlayerController()->GetPawn()->GetActorLocation();
    Vector3d point = Georeference::TransformUERelativeToOriginECEF(cameraLocation);
    sceneinfo.m_vCameraLocation = point.ToFVector();
    sceneinfo.m_vCameraRotator = GetWorld()->GetFirstPlayerController()->GetControlRotation();
    sceneinfo.m_fFov = RealspaceView::GetSingleton()->GetCameraControl()->GetFov();
    sceneinfo.m_vGeoreferenceOrigin = RealspaceView::GetSingleton()->GetGeoreferenceOrigin();
}

登录 或者 注册 后回答这个问题。

...