7#ifndef USDLOD_DISTANCE_HEURISTIC_QUERY_H
8#define USDLOD_DISTANCE_HEURISTIC_QUERY_H
13#include "pxr/usd/usdLod/api.h"
25PXR_NAMESPACE_OPEN_SCOPE
101 const VtFloatArray& thresholdsIn = VtFloatArray(),
102 const VtFloatArray& blendThresholdsIn = VtFloatArray())
148 double hysteresis)
const
152 if (prevDistance < distance - hysteresis) {
154 prevDistance = distance - hysteresis;
155 }
else if (prevDistance > distance + hysteresis) {
157 prevDistance = distance + hysteresis;
221 double* distanceOut)
const
225 prevDistance, hysteresis)));
233PXR_NAMESPACE_CLOSE_SCOPE
Stores a 4x4 matrix of double elements.
Basic type: 3-dimensional floating point range.
Basic type for a vector of 3 double components.
Basic type for a vector of 3 float components.
Token for efficient comparison, assignment, and hashing of known strings.
This class implements the internals of an LOD distance heuristic, but without any dependencies on USD...
float ComputeLOD(const GfVec3d &viewpoint, const GfMatrix4d &transform) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
float ComputeLOD(const GfVec3d &viewpoint, const GfMatrix4d &transform, double prevDistance, double hysteresis, double *distanceOut) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual USDLOD_API ~UsdLodDistanceHeuristicQuery()
Destructor.
USDLOD_API double ComputeDistance(const GfVec3d &viewpoint, const GfMatrix4d &transform) const
Compute a distance given a viewpoint and a transform.
double ComputeDistance(const GfVec3d &viewpoint, const GfMatrix4d &transform, double prevDistance, double hysteresis) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
GfRange3d extent
The bounding box of the geometry, stored in a GfRange3d.
VtFloatArray blendThresholds
This defines distance thresholds for LOD transitions in ascending order.
USDLOD_API float ComputeLOD(double distance) const
Compute an LOD index given a distance.
VtFloatArray thresholds
The distance thresholds for LOD transitions in ascending order.
GfVec3f center
The center point of the LOD root in the local coordinates.
This class is the base class of all heuristic query objects.