Skip to content

Commit d36eb08

Browse files
committed
Update provided kernel list after discussing with Vincent from NVIDIA.
1 parent 95bb224 commit d36eb08

22 files changed

+714
-346
lines changed

pxr/usd/usdLightField/generatedSchema.classes.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
# Public Classes
44
kernelBaseAPI
5-
kernelConstantTriangleAPI
5+
kernelConstantSurfletAPI
66
kernelGaussianEllipsoidAPI
7-
kernelGaussianTriangleAPI
7+
kernelGaussianSurfletAPI
88
opacityAttributeAPI
99
orientationAttributeAPI
1010
particleField
1111
particleField_3DGaussianSplat
1212
positionAttributeAPI
13+
positionBaseAPI
1314
radianceBaseAPI
1415
scaleAttributeAPI
1516
sphericalBetaAttributeAPI
@@ -19,14 +20,15 @@ tokens
1920
# Python Module Files
2021
module.cpp
2122
wrapKernelBaseAPI.cpp
22-
wrapKernelConstantTriangleAPI.cpp
23+
wrapKernelConstantSurfletAPI.cpp
2324
wrapKernelGaussianEllipsoidAPI.cpp
24-
wrapKernelGaussianTriangleAPI.cpp
25+
wrapKernelGaussianSurfletAPI.cpp
2526
wrapOpacityAttributeAPI.cpp
2627
wrapOrientationAttributeAPI.cpp
2728
wrapParticleField.cpp
2829
wrapParticleField_3DGaussianSplat.cpp
2930
wrapPositionAttributeAPI.cpp
31+
wrapPositionBaseAPI.cpp
3032
wrapRadianceBaseAPI.cpp
3133
wrapScaleAttributeAPI.cpp
3234
wrapSphericalBetaAttributeAPI.cpp

pxr/usd/usdLightField/generatedSchema.module.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
// WARNING: THIS FILE IS GENERATED BY usdGenSchema. DO NOT EDIT.
99
TF_WRAP(UsdLightFieldParticleField);
1010
TF_WRAP(UsdLightFieldParticleField_3DGaussianSplat);
11+
TF_WRAP(UsdLightFieldPositionBaseAPI);
1112
TF_WRAP(UsdLightFieldPositionAttributeAPI);
1213
TF_WRAP(UsdLightFieldOrientationAttributeAPI);
1314
TF_WRAP(UsdLightFieldScaleAttributeAPI);
1415
TF_WRAP(UsdLightFieldOpacityAttributeAPI);
1516
TF_WRAP(UsdLightFieldKernelBaseAPI);
1617
TF_WRAP(UsdLightFieldKernelGaussianEllipsoidAPI);
17-
TF_WRAP(UsdLightFieldKernelGaussianTriangleAPI);
18-
TF_WRAP(UsdLightFieldKernelConstantTriangleAPI);
18+
TF_WRAP(UsdLightFieldKernelGaussianSurfletAPI);
19+
TF_WRAP(UsdLightFieldKernelConstantSurfletAPI);
1920
TF_WRAP(UsdLightFieldRadianceBaseAPI);
2021
TF_WRAP(UsdLightFieldSphericalHarmonicsAttributeAPI);
2122
TF_WRAP(UsdLightFieldSphericalBetaAttributeAPI);

pxr/usd/usdLightField/generatedSchema.usda

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,17 @@ class ParticleField "ParticleField" (
8181
)
8282
}
8383

84+
class "LightFieldPositionBaseAPI" (
85+
customData = {
86+
string userDocBrief = """Defines a base-class type applied schema that all applied schema
87+
that provides the a ParticleField kernel will automatically apply."""
88+
}
89+
)
90+
{
91+
}
92+
8493
class "LightFieldPositionAttributeAPI" (
94+
apiSchemas = ["LightFieldPositionBaseAPI"]
8595
customData = {
8696
string userDocBrief = """A ParticleField related applied schema that provides a position
8797
attribute to define the locations of the particles."""
@@ -177,25 +187,19 @@ class "LightFieldKernelGaussianEllipsoidAPI" (
177187
{
178188
}
179189

180-
class "LightFieldKernelGaussianTriangleAPI" (
190+
class "LightFieldKernelGaussianSurfletAPI" (
181191
apiSchemas = ["LightFieldKernelBaseAPI"]
182192
customData = {
183-
string userDocBrief = "Defines the gaussian triangle kernel for a given ParticleField."
193+
string userDocBrief = "Defines the gaussian surflet kernel for a given ParticleField."
184194
}
185195
)
186196
{
187-
float kernel:triangle:edgeLength = 1 (
188-
customData = {
189-
string userDocBrief = """The edge length of the equilateral triangle before any scaling
190-
is applied."""
191-
}
192-
)
193197
}
194198

195-
class "LightFieldKernelConstantTriangleAPI" (
199+
class "LightFieldKernelConstantSurfletAPI" (
196200
apiSchemas = ["LightFieldKernelBaseAPI"]
197201
customData = {
198-
string userDocBrief = "Defines the gaussian triangle kernel for a given ParticleField."
202+
string userDocBrief = "Defines the constant surflet kernel for a given ParticleField."
199203
}
200204
)
201205
{

pxr/usd/usdLightField/kernelConstantTriangleAPI.cpp renamed to pxr/usd/usdLightField/kernelConstantSurfletAPI.cpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Licensed under the terms set forth in the LICENSE.txt file available at
55
// https://openusd.org/license.
66
//
7-
#include "pxr/usd/usdLightField/kernelConstantTriangleAPI.h"
7+
#include "pxr/usd/usdLightField/kernelConstantSurfletAPI.h"
88
#include "pxr/usd/usd/schemaRegistry.h"
99
#include "pxr/usd/usd/typed.h"
1010

@@ -16,78 +16,78 @@ PXR_NAMESPACE_OPEN_SCOPE
1616
// Register the schema with the TfType system.
1717
TF_REGISTRY_FUNCTION(TfType)
1818
{
19-
TfType::Define<UsdLightFieldKernelConstantTriangleAPI,
19+
TfType::Define<UsdLightFieldKernelConstantSurfletAPI,
2020
TfType::Bases< UsdAPISchemaBase > >();
2121

2222
}
2323

2424
/* virtual */
25-
UsdLightFieldKernelConstantTriangleAPI::~UsdLightFieldKernelConstantTriangleAPI()
25+
UsdLightFieldKernelConstantSurfletAPI::~UsdLightFieldKernelConstantSurfletAPI()
2626
{
2727
}
2828

2929
/* static */
30-
UsdLightFieldKernelConstantTriangleAPI
31-
UsdLightFieldKernelConstantTriangleAPI::Get(const UsdStagePtr &stage, const SdfPath &path)
30+
UsdLightFieldKernelConstantSurfletAPI
31+
UsdLightFieldKernelConstantSurfletAPI::Get(const UsdStagePtr &stage, const SdfPath &path)
3232
{
3333
if (!stage) {
3434
TF_CODING_ERROR("Invalid stage");
35-
return UsdLightFieldKernelConstantTriangleAPI();
35+
return UsdLightFieldKernelConstantSurfletAPI();
3636
}
37-
return UsdLightFieldKernelConstantTriangleAPI(stage->GetPrimAtPath(path));
37+
return UsdLightFieldKernelConstantSurfletAPI(stage->GetPrimAtPath(path));
3838
}
3939

4040

4141
/* virtual */
42-
UsdSchemaKind UsdLightFieldKernelConstantTriangleAPI::_GetSchemaKind() const
42+
UsdSchemaKind UsdLightFieldKernelConstantSurfletAPI::_GetSchemaKind() const
4343
{
44-
return UsdLightFieldKernelConstantTriangleAPI::schemaKind;
44+
return UsdLightFieldKernelConstantSurfletAPI::schemaKind;
4545
}
4646

4747
/* static */
4848
bool
49-
UsdLightFieldKernelConstantTriangleAPI::CanApply(
49+
UsdLightFieldKernelConstantSurfletAPI::CanApply(
5050
const UsdPrim &prim, std::string *whyNot)
5151
{
52-
return prim.CanApplyAPI<UsdLightFieldKernelConstantTriangleAPI>(whyNot);
52+
return prim.CanApplyAPI<UsdLightFieldKernelConstantSurfletAPI>(whyNot);
5353
}
5454

5555
/* static */
56-
UsdLightFieldKernelConstantTriangleAPI
57-
UsdLightFieldKernelConstantTriangleAPI::Apply(const UsdPrim &prim)
56+
UsdLightFieldKernelConstantSurfletAPI
57+
UsdLightFieldKernelConstantSurfletAPI::Apply(const UsdPrim &prim)
5858
{
59-
if (prim.ApplyAPI<UsdLightFieldKernelConstantTriangleAPI>()) {
60-
return UsdLightFieldKernelConstantTriangleAPI(prim);
59+
if (prim.ApplyAPI<UsdLightFieldKernelConstantSurfletAPI>()) {
60+
return UsdLightFieldKernelConstantSurfletAPI(prim);
6161
}
62-
return UsdLightFieldKernelConstantTriangleAPI();
62+
return UsdLightFieldKernelConstantSurfletAPI();
6363
}
6464

6565
/* static */
6666
const TfType &
67-
UsdLightFieldKernelConstantTriangleAPI::_GetStaticTfType()
67+
UsdLightFieldKernelConstantSurfletAPI::_GetStaticTfType()
6868
{
69-
static TfType tfType = TfType::Find<UsdLightFieldKernelConstantTriangleAPI>();
69+
static TfType tfType = TfType::Find<UsdLightFieldKernelConstantSurfletAPI>();
7070
return tfType;
7171
}
7272

7373
/* static */
7474
bool
75-
UsdLightFieldKernelConstantTriangleAPI::_IsTypedSchema()
75+
UsdLightFieldKernelConstantSurfletAPI::_IsTypedSchema()
7676
{
7777
static bool isTyped = _GetStaticTfType().IsA<UsdTyped>();
7878
return isTyped;
7979
}
8080

8181
/* virtual */
8282
const TfType &
83-
UsdLightFieldKernelConstantTriangleAPI::_GetTfType() const
83+
UsdLightFieldKernelConstantSurfletAPI::_GetTfType() const
8484
{
8585
return _GetStaticTfType();
8686
}
8787

8888
/*static*/
8989
const TfTokenVector&
90-
UsdLightFieldKernelConstantTriangleAPI::GetSchemaAttributeNames(bool includeInherited)
90+
UsdLightFieldKernelConstantSurfletAPI::GetSchemaAttributeNames(bool includeInherited)
9191
{
9292
static TfTokenVector localNames;
9393
static TfTokenVector allNames =
@@ -100,7 +100,7 @@ UsdLightFieldKernelConstantTriangleAPI::GetSchemaAttributeNames(bool includeInhe
100100
}
101101

102102
UsdLightFieldKernelBaseAPI
103-
UsdLightFieldKernelConstantTriangleAPI::LightFieldKernelBaseAPI() const
103+
UsdLightFieldKernelConstantSurfletAPI::LightFieldKernelBaseAPI() const
104104
{
105105
return UsdLightFieldKernelBaseAPI(GetPrim());
106106
}

pxr/usd/usdLightField/kernelConstantTriangleAPI.h renamed to pxr/usd/usdLightField/kernelConstantSurfletAPI.h

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
// Licensed under the terms set forth in the LICENSE.txt file available at
55
// https://openusd.org/license.
66
//
7-
#ifndef USDLIGHTFIELD_GENERATED_KERNELCONSTANTTRIANGLEAPI_H
8-
#define USDLIGHTFIELD_GENERATED_KERNELCONSTANTTRIANGLEAPI_H
7+
#ifndef USDLIGHTFIELD_GENERATED_KERNELCONSTANTSURFLETAPI_H
8+
#define USDLIGHTFIELD_GENERATED_KERNELCONSTANTSURFLETAPI_H
99

10-
/// \file usdLightField/kernelConstantTriangleAPI.h
10+
/// \file usdLightField/kernelConstantSurfletAPI.h
1111

1212
#include "pxr/pxr.h"
1313
#include "pxr/usd/usdLightField/api.h"
@@ -32,48 +32,47 @@ PXR_NAMESPACE_OPEN_SCOPE
3232
class SdfAssetPath;
3333

3434
// -------------------------------------------------------------------------- //
35-
// LIGHTFIELDKERNELCONSTANTTRIANGLEAPI //
35+
// LIGHTFIELDKERNELCONSTANTSURFLETAPI //
3636
// -------------------------------------------------------------------------- //
3737

38-
/// \class UsdLightFieldKernelConstantTriangleAPI
38+
/// \class UsdLightFieldKernelConstantSurfletAPI
3939
///
40-
/// Defines the gaussian triangle kernel for a given ParticleField.
40+
/// Defines the constant surflet kernel for a given ParticleField.
4141
///
42-
/// The kernal shape is an equilateral triangle centered at the origin, with
43-
/// the base of the triangle, parallel to the x-axis, and the apex of the
44-
/// triangle on the y-axis.
42+
/// The kernal shape is a circular disk centered at the origin, with the normal
43+
/// of the plane being oriented along the positive z-axis.
4544
///
4645
/// The falloff function for this kernel is constant and the value is directly
4746
/// defined by the opacity data source.
4847
///
49-
class UsdLightFieldKernelConstantTriangleAPI : public UsdAPISchemaBase
48+
class UsdLightFieldKernelConstantSurfletAPI : public UsdAPISchemaBase
5049
{
5150
public:
5251
/// Compile time constant representing what kind of schema this class is.
5352
///
5453
/// \sa UsdSchemaKind
5554
static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI;
5655

57-
/// Construct a UsdLightFieldKernelConstantTriangleAPI on UsdPrim \p prim .
58-
/// Equivalent to UsdLightFieldKernelConstantTriangleAPI::Get(prim.GetStage(), prim.GetPath())
56+
/// Construct a UsdLightFieldKernelConstantSurfletAPI on UsdPrim \p prim .
57+
/// Equivalent to UsdLightFieldKernelConstantSurfletAPI::Get(prim.GetStage(), prim.GetPath())
5958
/// for a \em valid \p prim, but will not immediately throw an error for
6059
/// an invalid \p prim
61-
explicit UsdLightFieldKernelConstantTriangleAPI(const UsdPrim& prim=UsdPrim())
60+
explicit UsdLightFieldKernelConstantSurfletAPI(const UsdPrim& prim=UsdPrim())
6261
: UsdAPISchemaBase(prim)
6362
{
6463
}
6564

66-
/// Construct a UsdLightFieldKernelConstantTriangleAPI on the prim held by \p schemaObj .
67-
/// Should be preferred over UsdLightFieldKernelConstantTriangleAPI(schemaObj.GetPrim()),
65+
/// Construct a UsdLightFieldKernelConstantSurfletAPI on the prim held by \p schemaObj .
66+
/// Should be preferred over UsdLightFieldKernelConstantSurfletAPI(schemaObj.GetPrim()),
6867
/// as it preserves SchemaBase state.
69-
explicit UsdLightFieldKernelConstantTriangleAPI(const UsdSchemaBase& schemaObj)
68+
explicit UsdLightFieldKernelConstantSurfletAPI(const UsdSchemaBase& schemaObj)
7069
: UsdAPISchemaBase(schemaObj)
7170
{
7271
}
7372

7473
/// Destructor.
7574
USDLIGHTFIELD_API
76-
virtual ~UsdLightFieldKernelConstantTriangleAPI();
75+
virtual ~UsdLightFieldKernelConstantSurfletAPI();
7776

7877
/// Return a vector of names of all pre-declared attributes for this schema
7978
/// class and all its ancestor classes. Does not include attributes that
@@ -82,17 +81,17 @@ class UsdLightFieldKernelConstantTriangleAPI : public UsdAPISchemaBase
8281
static const TfTokenVector &
8382
GetSchemaAttributeNames(bool includeInherited=true);
8483

85-
/// Return a UsdLightFieldKernelConstantTriangleAPI holding the prim adhering to this
84+
/// Return a UsdLightFieldKernelConstantSurfletAPI holding the prim adhering to this
8685
/// schema at \p path on \p stage. If no prim exists at \p path on
8786
/// \p stage, or if the prim at that path does not adhere to this schema,
8887
/// return an invalid schema object. This is shorthand for the following:
8988
///
9089
/// \code
91-
/// UsdLightFieldKernelConstantTriangleAPI(stage->GetPrimAtPath(path));
90+
/// UsdLightFieldKernelConstantSurfletAPI(stage->GetPrimAtPath(path));
9291
/// \endcode
9392
///
9493
USDLIGHTFIELD_API
95-
static UsdLightFieldKernelConstantTriangleAPI
94+
static UsdLightFieldKernelConstantSurfletAPI
9695
Get(const UsdStagePtr &stage, const SdfPath &path);
9796

9897

@@ -117,11 +116,11 @@ class UsdLightFieldKernelConstantTriangleAPI : public UsdAPISchemaBase
117116
CanApply(const UsdPrim &prim, std::string *whyNot=nullptr);
118117

119118
/// Applies this <b>single-apply</b> API schema to the given \p prim.
120-
/// This information is stored by adding "LightFieldKernelConstantTriangleAPI" to the
119+
/// This information is stored by adding "LightFieldKernelConstantSurfletAPI" to the
121120
/// token-valued, listOp metadata \em apiSchemas on the prim.
122121
///
123-
/// \return A valid UsdLightFieldKernelConstantTriangleAPI object is returned upon success.
124-
/// An invalid (or empty) UsdLightFieldKernelConstantTriangleAPI object is returned upon
122+
/// \return A valid UsdLightFieldKernelConstantSurfletAPI object is returned upon success.
123+
/// An invalid (or empty) UsdLightFieldKernelConstantSurfletAPI object is returned upon
125124
/// failure. See \ref UsdPrim::ApplyAPI() for conditions
126125
/// resulting in failure.
127126
///
@@ -132,7 +131,7 @@ class UsdLightFieldKernelConstantTriangleAPI : public UsdAPISchemaBase
132131
/// \sa UsdPrim::RemoveAPI()
133132
///
134133
USDLIGHTFIELD_API
135-
static UsdLightFieldKernelConstantTriangleAPI
134+
static UsdLightFieldKernelConstantSurfletAPI
136135
Apply(const UsdPrim &prim);
137136

138137
protected:

pxr/usd/usdLightField/kernelGaussianEllipsoidAPI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class SdfAssetPath;
3939
///
4040
/// Defines the gaussian ellipsoid kernel for a given ParticleField.
4141
///
42-
/// The kernel shape is a circular region that is reshaped by the associated
42+
/// The kernel shape is a spherical region that is reshaped by the associated
4343
/// scale data source, and rotated by the orientation data source.
4444
///
4545
/// The falloff function for this kernel is the gaussian falloff function,

0 commit comments

Comments
 (0)