25 #ifndef PXR_IMAGING_HD_VECTOR_SCHEMA_H
26 #define PXR_IMAGING_HD_VECTOR_SCHEMA_H
45 static HdVectorDataSourceHandle
48 const HdDataSourceBaseHandle *
values);
58 explicit operator bool()
const {
return IsDefined(); }
71 ? T::Cast(
_vector->GetElement(element))
89 return _GetTyped<T>(element);
96 template<
typename Schema>
104 using DataSource =
typename Schema::UnderlyingDataSource;
105 return Schema(_GetTyped<DataSource>(element));
HD_API size_t GetNumElements() const
Number of elements in the vector.
Schema GetElement(const size_t element) const
HdVectorSchema(HdVectorDataSourceHandle const &vector)
HD_API bool IsDefined() const
HD_API HdVectorDataSourceHandle GetVector()
Returns the vector data source that this schema is interpreting.
T::Handle GetElement(const size_t element) const
T::Handle _GetTyped(const size_t element) const
HdVectorDataSourceHandle _vector
HdSchemaBasedVectorSchema(HdVectorDataSourceHandle const &vector)
static HD_API HdVectorDataSourceHandle BuildRetained(size_t count, const HdDataSourceBaseHandle *values)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
HdTypedVectorSchema(HdVectorDataSourceHandle const &vector)
GLenum GLsizei GLsizei GLint * values
#define PXR_NAMESPACE_CLOSE_SCOPE