7#ifndef USDLOD_GENERATED_DISTANCEHEURISTIC_H
8#define USDLOD_GENERATED_DISTANCEHEURISTIC_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
147 static const TfType &_GetStaticTfType();
149 static bool _IsTypedSchema();
153 const TfType &_GetTfType()
const override;
425 .
ComputeLOD(viewpoint, transform, prevDistance, hysteresis,
430PXR_NAMESPACE_CLOSE_SCOPE
Stores a 4x4 matrix of double elements.
Basic type for a vector of 3 double components.
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,...
This LOD heuristic selects LOD children on the basis of distance from the view point to the LOD root.
UsdLodDistanceHeuristic(const UsdSchemaBase &schemaObj)
Construct a UsdLodDistanceHeuristic 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.
virtual USDLOD_API ~UsdLodDistanceHeuristic()
Destructor.
USDLOD_API UsdAttribute GetThresholdsAttr() const
This defines the distance thresholds for LOD transitions in ascending order.
USDLOD_API double ComputeDistance(const GfVec3d &viewpoint, const GfMatrix4d &transform, double prevDistance, double hysteresis, 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 CreateCenterAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetCenterAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDLOD_API UsdRelationship CreateBoundingVolumeRel() const
See GetBoundingVolumeRel(), and also Create vs Get Property Methods for when to use Get vs Create.
USDLOD_API float ComputeLOD(const GfVec3d &viewpoint, 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 USDLOD_API UsdLodDistanceHeuristic Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
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 float ComputeLOD(double distance, UsdTimeCode time=UsdTimeCode::Default()) const
Calculate an LOD index given a distance.
USDLOD_API float ComputeLOD(const GfVec3d &viewpoint, const GfMatrix4d &transform, double prevDistance, double hysteresis, double *distanceOut, UsdTimeCode time=UsdTimeCode::Default()) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USDLOD_API UsdAttribute GetBlendThresholdsAttr() const
This defines distance thresholds for LOD transitions in ascending 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.
USDLOD_API UsdAttribute GetCenterAttr() const
The center point of this LOD Root in local coordinates.
static USDLOD_API UsdLodDistanceHeuristic Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdLodDistanceHeuristic holding the prim adhering to this schema at path on stage.
UsdLodDistanceHeuristic(const UsdPrim &prim=UsdPrim())
Construct a UsdLodDistanceHeuristic on UsdPrim prim .
USDLOD_API UsdLodDistanceHeuristicQuery CreateDistanceHeuristicQuery(UsdTimeCode time=UsdTimeCode::Default()) const
Return a UsdLodDistanceHeuristicQuery that matches the current attribute values of this UsdLodDistanc...
USDLOD_API double ComputeDistance(const GfVec3d &viewpoint, const GfMatrix4d &transform, UsdTimeCode time=UsdTimeCode::Default()) const
Calculate a distance given a viewpoint and a transform.
This class implements the internals of an LOD distance heuristic, but without any dependencies on USD...
USDLOD_API double ComputeDistance(const GfVec3d &viewpoint, const GfMatrix4d &transform) const
Compute a distance given a viewpoint and a transform.
USDLOD_API float ComputeLOD(double distance) const
Compute an LOD index given a distance.
Base class for LOD Heuristics.
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.