7#ifndef USDLOD_GENERATED_SCREENSIZEHEURISTIC_H
8#define USDLOD_GENERATED_SCREENSIZEHEURISTIC_H
13#include "pxr/usd/usdLod/api.h"
23#include "pxr/base/vt/value.h"
30#include "pxr/base/tf/type.h"
32PXR_NAMESPACE_OPEN_SCOPE
152 static const TfType &_GetStaticTfType();
154 static bool _IsTypedSchema();
158 const TfType &_GetTfType()
const override;
448 double* screenSizeOut,
452 .
ComputeLOD(frustum, transform, prevSize, hysteresis,
458PXR_NAMESPACE_CLOSE_SCOPE
Basic type: View frustum.
Stores a 4x4 matrix of double elements.
Contains an asset path and optional evaluated and resolved paths.
A path value used to locate objects in layers or scenegraphs.
TfType represents a dynamic runtime type.
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Base class for LOD Heuristics.
This LOD heuristic selects LOD children on the basis of the fraction of the viewplane would be covere...
UsdLodScreenSizeHeuristic(const UsdSchemaBase &schemaObj)
Construct a UsdLodScreenSizeHeuristic on the prim held by schemaObj .
USDLOD_API UsdAttribute CreateThresholdsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetThresholdsAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static USDLOD_API UsdLodScreenSizeHeuristic Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdLodScreenSizeHeuristic holding the prim adhering to this schema at path on stage.
USDLOD_API UsdAttribute GetThresholdsAttr() const
The screen size thresholds for LOD transitions in descending order as a fraction of the viewport size...
virtual USDLOD_API ~UsdLodScreenSizeHeuristic()
Destructor.
USDLOD_API float ComputeLOD(const GfFrustum &frustum, const GfMatrix4d &transform, UsdTimeCode time=UsdTimeCode::Default()) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
USDLOD_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USDLOD_API UsdRelationship GetBoundingVolumeRel() const
Optional relationship to a Boundable prim that defines the bounding volume for this LOD Root,...
USDLOD_API UsdAttribute CreateProjectionMethodAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetProjectionMethodAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static USDLOD_API UsdLodScreenSizeHeuristic Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
USDLOD_API UsdRelationship CreateBoundingVolumeRel() const
See GetBoundingVolumeRel(), and also Create vs Get Property Methods for when to use Get vs Create.
USDLOD_API double ComputeScreenSize(const GfFrustum &frustum, const GfMatrix4d &transform, double prevSize, double hysteresis, UsdTimeCode time=UsdTimeCode::Default()) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USDLOD_API float ComputeLOD(const GfFrustum &frustum, const GfMatrix4d &transform, double prevSize, double hysteresis, double *screenSizeOut, UsdTimeCode time=UsdTimeCode::Default()) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USDLOD_API UsdAttribute GetProjectionMethodAttr() const
Defines how screen size is calculated.
USDLOD_API UsdLodScreenSizeHeuristicQuery CreateScreenSizeHeuristicQuery(UsdTimeCode time=UsdTimeCode::Default()) const
Return a UsdLodScreenSizeHeuristicQuery that matches the current attribute values of this UsdLodScree...
static USDLOD_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
USDLOD_API UsdAttribute GetBlendThresholdsAttr() const
This defines screen size thresholds for LOD transitions in descending order.
USDLOD_API UsdAttribute CreateBlendThresholdsAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetBlendThresholdsAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
UsdLodScreenSizeHeuristic(const UsdPrim &prim=UsdPrim())
Construct a UsdLodScreenSizeHeuristic on UsdPrim prim .
USDLOD_API UsdAttribute CreateExtentAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetExtentAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDLOD_API UsdAttribute GetExtentAttr() const
The extent of this LOD Root in local coordinates.
USDLOD_API double ComputeScreenSize(const GfFrustum &frustum, const GfMatrix4d &transform, UsdTimeCode time=UsdTimeCode::Default()) const
Calculate the screen size given a frustum and a transform.
USDLOD_API float ComputeLOD(double size, UsdTimeCode time=UsdTimeCode::Default()) const
Calculate an LOD index given a screen size.
This class implements the internals of an LOD screenSize heuristic, but without any dependencies on U...
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.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
The base class for all schema types in Usd.
Singleton registry that provides access to schema type information and the prim definitions for regis...
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
static constexpr UsdTimeCode Default()
Produce a UsdTimeCode representing the sentinel value for 'default'.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
@ ConcreteTyped
Represents a concrete typed schema.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.