HDK
|
#include <unitTestDelegate.h>
A simple delegate class for unit test driver.
Definition at line 52 of file unitTestDelegate.h.
HD_API HdUnitTestDelegate::HdUnitTestDelegate | ( | HdRenderIndex * | parentIndex, |
SdfPath const & | delegateID | ||
) |
HD_API void HdUnitTestDelegate::AddBasisCurves | ( | SdfPath const & | id, |
VtVec3fArray const & | points, | ||
VtIntArray const & | curveVertexCounts, | ||
VtIntArray const & | curveIndices, | ||
VtVec3fArray const & | normals, | ||
TfToken const & | type, | ||
TfToken const & | basis, | ||
VtValue const & | color, | ||
HdInterpolation | colorInterpolation, | ||
VtValue const & | opacity, | ||
HdInterpolation | opacityInterpolation, | ||
VtValue const & | width, | ||
HdInterpolation | widthInterpolation, | ||
SdfPath const & | instancerId = SdfPath() |
||
) |
HD_API void HdUnitTestDelegate::AddCube | ( | SdfPath const & | id, |
GfMatrix4f const & | transform, | ||
bool | guide = false , |
||
SdfPath const & | instancerId = SdfPath() , |
||
TfToken const & | scheme = PxOsdOpenSubdivTokens->catmullClark |
||
) |
Add a cube.
HD_API void HdUnitTestDelegate::AddCurves | ( | SdfPath const & | id, |
TfToken const & | type, | ||
TfToken const & | basis, | ||
GfMatrix4f const & | transform, | ||
HdInterpolation | colorInterp = HdInterpolationConstant , |
||
HdInterpolation | widthInterp = HdInterpolationConstant , |
||
bool | authoredNormals = false , |
||
SdfPath const & | instancerId = SdfPath() |
||
) |
Add a basis curves prim containing two curves.
HD_API void HdUnitTestDelegate::AddFaceVaryingPolygons | ( | SdfPath const & | id, |
GfMatrix4f const & | transform, | ||
SdfPath const & | instancerId = SdfPath() |
||
) |
Add a triangle, quad and pentagon with face-varying displayColor and displayOpacity
HD_API void HdUnitTestDelegate::AddGrid | ( | SdfPath const & | id, |
int | x, | ||
int | y, | ||
GfMatrix4f const & | transform, | ||
bool | rightHanded = true , |
||
bool | doubleSided = false , |
||
SdfPath const & | instancerId = SdfPath() |
||
) |
Add a grid with division x*y.
HD_API void HdUnitTestDelegate::AddGridWithCustomColor | ( | SdfPath const & | id, |
int | nx, | ||
int | ny, | ||
GfMatrix4f const & | transform, | ||
VtValue const & | color, | ||
HdInterpolation | colorInterpolation, | ||
bool | rightHanded = true , |
||
bool | doubleSided = false , |
||
SdfPath const & | instancerId = SdfPath() |
||
) |
HD_API void HdUnitTestDelegate::AddGridWithFaceColor | ( | SdfPath const & | id, |
int | x, | ||
int | y, | ||
GfMatrix4f const & | transform, | ||
bool | rightHanded = true , |
||
bool | doubleSided = false , |
||
SdfPath const & | instancerId = SdfPath() |
||
) |
Add a grid with division x*y.
HD_API void HdUnitTestDelegate::AddGridWithFaceVaryingColor | ( | SdfPath const & | id, |
int | x, | ||
int | y, | ||
GfMatrix4f const & | transform, | ||
bool | rightHanded = true , |
||
bool | doubleSided = false , |
||
SdfPath const & | instancerId = SdfPath() |
||
) |
Add a grid with division x*y.
HD_API void HdUnitTestDelegate::AddGridWithVertexColor | ( | SdfPath const & | id, |
int | x, | ||
int | y, | ||
GfMatrix4f const & | transform, | ||
bool | rightHanded = true , |
||
bool | doubleSided = false , |
||
SdfPath const & | instancerId = SdfPath() |
||
) |
Add a grid with division x*y.
HD_API void HdUnitTestDelegate::AddInstancer | ( | SdfPath const & | id, |
SdfPath const & | parentId = SdfPath() , |
||
GfMatrix4f const & | rootTransform = GfMatrix4f(1) |
||
) |
Instancer.
HD_API void HdUnitTestDelegate::AddMaterialResource | ( | SdfPath const & | id, |
VtValue | materialResource | ||
) |
Material.
HD_API void HdUnitTestDelegate::AddMesh | ( | SdfPath const & | id, |
GfMatrix4f const & | transform, | ||
VtVec3fArray const & | points, | ||
VtIntArray const & | numVerts, | ||
VtIntArray const & | verts, | ||
bool | guide = false , |
||
SdfPath const & | instancerId = SdfPath() , |
||
TfToken const & | scheme = PxOsdOpenSubdivTokens->catmullClark , |
||
TfToken const & | orientation = HdTokens->rightHanded , |
||
bool | doubleSided = false |
||
) |
HD_API void HdUnitTestDelegate::AddMesh | ( | SdfPath const & | id, |
GfMatrix4f const & | transform, | ||
VtVec3fArray const & | points, | ||
VtIntArray const & | numVerts, | ||
VtIntArray const & | verts, | ||
VtIntArray const & | holes, | ||
PxOsdSubdivTags const & | subdivTags, | ||
VtValue const & | color, | ||
HdInterpolation | colorInterpolation, | ||
VtValue const & | opacity, | ||
HdInterpolation | opacityInterpolation, | ||
bool | guide = false , |
||
SdfPath const & | instancerId = SdfPath() , |
||
TfToken const & | scheme = PxOsdOpenSubdivTokens->catmullClark , |
||
TfToken const & | orientation = HdTokens->rightHanded , |
||
bool | doubleSided = false |
||
) |
HD_API void HdUnitTestDelegate::AddMesh | ( | SdfPath const & | id, |
GfMatrix4f const & | transform, | ||
VtVec3fArray const & | points, | ||
VtIntArray const & | numVerts, | ||
VtIntArray const & | verts, | ||
VtIntArray const & | holes, | ||
PxOsdSubdivTags const & | subdivTags, | ||
VtValue const & | color, | ||
VtIntArray const & | colorIndices, | ||
HdInterpolation | colorInterpolation, | ||
VtValue const & | opacity, | ||
VtIntArray const & | opacityIndices, | ||
HdInterpolation | opacityInterpolation, | ||
bool | guide = false , |
||
SdfPath const & | instancerId = SdfPath() , |
||
TfToken const & | scheme = PxOsdOpenSubdivTokens->catmullClark , |
||
TfToken const & | orientation = HdTokens->rightHanded , |
||
bool | doubleSided = false |
||
) |
HD_API void HdUnitTestDelegate::AddPoints | ( | SdfPath const & | id, |
VtVec3fArray const & | points, | ||
VtValue const & | color, | ||
HdInterpolation | colorInterpolation, | ||
VtValue const & | opacity, | ||
HdInterpolation | opacityInterpolation, | ||
VtValue const & | width, | ||
HdInterpolation | widthInterpolation, | ||
SdfPath const & | instancerId = SdfPath() |
||
) |
HD_API void HdUnitTestDelegate::AddPoints | ( | SdfPath const & | id, |
GfMatrix4f const & | transform, | ||
HdInterpolation | colorInterp = HdInterpolationConstant , |
||
HdInterpolation | widthInterp = HdInterpolationConstant , |
||
SdfPath const & | instancerId = SdfPath() |
||
) |
Add a points prim.
HD_API void HdUnitTestDelegate::AddPolygons | ( | SdfPath const & | id, |
GfMatrix4f const & | transform, | ||
HdInterpolation | colorInterp, | ||
SdfPath const & | instancerId = SdfPath() |
||
) |
Add a triangle, quad and pentagon.
HD_API void HdUnitTestDelegate::AddPrimvar | ( | SdfPath const & | id, |
TfToken const & | name, | ||
VtValue const & | value, | ||
HdInterpolation const & | interp, | ||
TfToken const & | role, | ||
VtIntArray const & | indices = VtIntArray(0) |
||
) |
Primvars.
HD_API void HdUnitTestDelegate::AddRenderBuffer | ( | SdfPath const & | id, |
HdRenderBufferDescriptor const & | desc | ||
) |
Render buffers.
HD_API void HdUnitTestDelegate::AddSubdiv | ( | SdfPath const & | id, |
GfMatrix4f const & | transform, | ||
SdfPath const & | insatancerId = SdfPath() |
||
) |
Add a subdiv with various tags.
Tasks.
Definition at line 305 of file unitTestDelegate.h.
HD_API void HdUnitTestDelegate::BindMaterial | ( | SdfPath const & | rprimId, |
SdfPath const & | materialId | ||
) |
|
overridevirtual |
Returns a named value.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Gets the topological curve data for a given prim.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns a single value for a given camera and parameter. See HdCameraTokens for the list of paramters.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns the cullstyle for the given prim.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns the refinement level for the given prim in the range [0,8].
The refinement level indicates how many iterations to apply when subdividing subdivision surfaces or other refinable primitives.
Reimplemented from HdSceneDelegate.
Returns the doubleSided state for the given prim.
Reimplemented from HdSceneDelegate.
Gets the axis aligned bounds of a prim. The returned bounds are in the local space of the prim (transform is yet to be applied) and should contain the bounds of any child prims.
The returned bounds does not include any displacement that might occur as the result of running shaders on the prim.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns a named primvar value. If *outIndices is not nullptr and the primvar has indices, it will return the unflattened primvar and set *outIndices to the primvar's associated indices, clearing the array if the primvar is not indexed.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Gets the extracted indices array of the prototype id used in the instancer.
example instances: 0, 1, 2, 3, 4, 5 protoypes: A, B, A, A, B, C
GetInstanceIndices(A) : [0, 2, 3] GetInstanceIndices(B) : [1, 4] GetInstanceIndices(C) : [5] GetInstanceIndices(D) : []
Reimplemented from HdSceneDelegate.
Returns the parent instancer of the given rprim or instancer.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns a list of prototypes of this instancer. The intent is to let renderers cache instance indices by giving them a complete set of prims to call GetInstanceIndices(instancer, prototype) on. XXX: This is currently unused, but may be used in the future.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns the instancer transform.
Reimplemented from HdSceneDelegate.
Returns the material ID bound to the rprim rprimId
.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns the material ID bound to the rprim rprimId
.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Gets the topological mesh data for a given prim.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns descriptors for all primvars of the given interpolation type.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns the allocation descriptor for a given render buffer prim.
Reimplemented from HdSceneDelegate.
Returns the render tag that will be used to bucket prims during render pass bucketing.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns the authored repr (if any) for the given prim.
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Gets the subdivision surface tags (sharpness, holes, etc).
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Reimplemented from HdSceneDelegate.
|
overridevirtual |
Returns the object space transform, including all parent transforms.
Reimplemented from HdSceneDelegate.
Returns the authored visible state of the prim.
Reimplemented from HdSceneDelegate.
HD_API void HdUnitTestDelegate::MarkRprimDirty | ( | SdfPath | path, |
HdDirtyBits | flag | ||
) |
Marks an rprim in the RenderIndex as dirty with the given dirty flags.
HD_API void HdUnitTestDelegate::RebindMaterial | ( | SdfPath const & | rprimId, |
SdfPath const & | materialId | ||
) |
Example to update a material binding on the fly.
HD_API void HdUnitTestDelegate::SetInstancerProperties | ( | SdfPath const & | id, |
VtIntArray const & | prototypeIndex, | ||
VtVec3fArray const & | scale, | ||
VtVec4fArray const & | rotate, | ||
VtVec3fArray const & | translate | ||
) |
HD_API void HdUnitTestDelegate::SetMeshCullStyle | ( | SdfPath const & | id, |
HdCullStyle const & | cullstyle | ||
) |
HD_API void HdUnitTestDelegate::SetReprSelector | ( | SdfPath const & | id, |
HdReprSelector const & | reprSelector | ||
) |
|
inline |
Definition at line 59 of file unitTestDelegate.h.
HD_API void HdUnitTestDelegate::UpdateCamera | ( | SdfPath const & | id, |
TfToken const & | key, | ||
VtValue | value | ||
) |
HD_API void HdUnitTestDelegate::UpdateInstancer | ( | SdfPath const & | rprimId, |
SdfPath const & | instancerId | ||
) |
HD_API void HdUnitTestDelegate::UpdateMaterialResource | ( | SdfPath const & | materialId, |
VtValue | materialResource | ||
) |
Update a material resource.
HD_API void HdUnitTestDelegate::UpdatePrimvarValue | ( | SdfPath const & | id, |
TfToken const & | name, | ||
VtValue const & | value, | ||
VtIntArray const & | indices = VtIntArray(0) |
||
) |
HD_API void HdUnitTestDelegate::UpdateRenderBuffer | ( | SdfPath const & | id, |
HdRenderBufferDescriptor const & | desc | ||
) |
HD_API void HdUnitTestDelegate::UpdateTask | ( | SdfPath const & | id, |
TfToken const & | key, | ||
VtValue | value | ||
) |
Transform.