7#ifndef USDLOD_SCREENSIZE_HEURISTIC_QUERY_H
8#define USDLOD_SCREENSIZE_HEURISTIC_QUERY_H
13#include "pxr/usd/usdLod/api.h"
26PXR_NAMESPACE_OPEN_SCOPE
136 const VtFloatArray& thresholdsIn = VtFloatArray(),
137 const VtFloatArray& blendThresholdsIn = VtFloatArray())
184 double hysteresis)
const
188 if (prevSize < screenSize - hysteresis) {
190 prevSize = screenSize - hysteresis;
191 }
else if (prevSize > screenSize + hysteresis) {
193 prevSize = screenSize + hysteresis;
258 double* sizeOut)
const
262 prevSize, hysteresis)));
269PXR_NAMESPACE_CLOSE_SCOPE
Basic type: View frustum.
Stores a 4x4 matrix of double elements.
Basic type: 3-dimensional floating point range.
Token for efficient comparison, assignment, and hashing of known strings.
This class is the base class of all heuristic query objects.
This class implements the internals of an LOD screenSize heuristic, but without any dependencies on U...
float ComputeLOD(const GfFrustum &frustum, const GfMatrix4d &transform) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
float ComputeLOD(const GfFrustum &frustum, const GfMatrix4d &transform, double prevSize, double hysteresis, double *sizeOut) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USDLOD_API float ComputeLOD(double size) const
Calculate an LOD index given a screen size.
USDLOD_API double ComputeScreenSize(const GfFrustum &frustum, const GfMatrix4d &transform) const
Calculate the screen size given a frustum and a transform.
virtual USDLOD_API ~UsdLodScreenSizeHeuristicQuery()
Destructor.
GfRange3d extent
The bounding box of the geometry, stored in a GfRange3d.
VtFloatArray blendThresholds
This defines screen size thresholds for LOD transitions in descending order.
double ComputeScreenSize(const GfFrustum &frustum, const GfMatrix4d &transform, double prevSize, double hysteresis) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
TfToken projectionMethod
Defines how screen size is calculated.
VtFloatArray thresholds
The screen size thresholds for LOD transitions in descending order as a fraction of the viewport size...
USDLOD_API TfStaticData< UsdLodTokensType > UsdLodTokens
A global variable with static, efficient TfTokens for use in all public USD API.