初始提交: UE5.3项目基础框架
This commit is contained in:
61
Plugins/CesiumForUnreal/Source/ThirdParty/include/CesiumGeometry/CullingVolume.h
vendored
Normal file
61
Plugins/CesiumForUnreal/Source/ThirdParty/include/CesiumGeometry/CullingVolume.h
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
#pragma once
|
||||
|
||||
#include "Plane.h"
|
||||
|
||||
namespace Cesium3DTilesSelection {
|
||||
|
||||
/**
|
||||
* @brief A culling volume, defined by four planes.
|
||||
*
|
||||
* The planes describe the culling volume that may be created for
|
||||
* the view frustum of a camera. The normals of these planes will
|
||||
* point inwards.
|
||||
*/
|
||||
struct CullingVolume final {
|
||||
|
||||
/**
|
||||
* @brief The left plane of the culling volume.
|
||||
*
|
||||
* Defaults to (0,0,1), with a distance of 0.
|
||||
*/
|
||||
CesiumGeometry::Plane leftPlane{glm::dvec3(0.0, 0.0, 1.0), 0.0};
|
||||
|
||||
/**
|
||||
* @brief The right plane of the culling volume.
|
||||
*
|
||||
* Defaults to (0,0,1), with a distance of 0.
|
||||
*/
|
||||
CesiumGeometry::Plane rightPlane{glm::dvec3(0.0, 0.0, 1.0), 0.0};
|
||||
|
||||
/**
|
||||
* @brief The top plane of the culling volume.
|
||||
*
|
||||
* Defaults to (0,0,1), with a distance of 0.
|
||||
*/
|
||||
CesiumGeometry::Plane topPlane{glm::dvec3(0.0, 0.0, 1.0), 0.0};
|
||||
|
||||
/**
|
||||
* @brief The bottom plane of the culling volume.
|
||||
*
|
||||
* Defaults to (0,0,1), with a distance of 0.
|
||||
*/
|
||||
CesiumGeometry::Plane bottomPlane{glm::dvec3(0.0, 0.0, 1.0), 0.0};
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Creates a {@link CullingVolume} for a perspective frustum.
|
||||
*
|
||||
* @param position The eye position
|
||||
* @param direction The viewing direction
|
||||
* @param up The up-vector of the frustum
|
||||
* @param fovx The horizontal Field-Of-View angle, in radians
|
||||
* @param fovy The vertical Field-Of-View angle, in radians
|
||||
* @return The {@link CullingVolume}
|
||||
*/
|
||||
CullingVolume createCullingVolume(
|
||||
const glm::dvec3& position,
|
||||
const glm::dvec3& direction,
|
||||
const glm::dvec3& up,
|
||||
double fovx,
|
||||
double fovy) noexcept;
|
||||
} // namespace Cesium3DTilesSelection
|
||||
Reference in New Issue
Block a user