Free Electron
SurfaceAccessorUsdGraph.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __usd_SurfaceAccessorUsdGraph_h__
8 #define __usd_SurfaceAccessorUsdGraph_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 /**************************************************************************//**
15  @brief USD Graph Access
16 
17  @ingroup usd
18 *//***************************************************************************/
19 class FE_DL_EXPORT SurfaceAccessorUsdGraph:
20  public SurfaceAccessorBase,
21  public CastableAs<SurfaceAccessorUsdGraph>
22 {
23  public:
25  { setName("SurfaceAccessorUsdGraph"); }
26 virtual ~SurfaceAccessorUsdGraph(void) {}
27 
28  using SurfaceAccessorBase::set;
29  using SurfaceAccessorBase::spatialVector;
30 
31  //* as SurfaceAccessorI
32  BWORD bind(SurfaceAccessibleI::Element a_element,
33  SurfaceAccessibleI::Attribute a_attribute);
34  BWORD bind(SurfaceAccessibleI::Element a_element,
35  const String& a_name);
36 
37 virtual U32 count(void) const;
38 virtual U32 subCount(U32 index) const;
39 
40 virtual void set(U32 a_index,U32 a_subIndex,String a_string);
41 virtual String string(U32 a_index,U32 a_subIndex=0);
42 
43 virtual I32 integer(U32 a_index,U32 a_subIndex=0);
44 
45 virtual Real real(U32 a_index,U32 a_subIndex=0);
46 
47 virtual SpatialVector spatialVector(U32 a_index,U32 a_subIndex=0);
48 
49  private:
50  const Array< sp<SurfaceAccessibleUsd::PrimNode> >* m_pNodeArray;
51 
52  I32 offsetOfVertex(I32 a_subIndex)
53  {
54  const I32 table[10]=
55  { 0,1,2,3,0, 4,5,6,7,4 };
56  return table[a_subIndex];
57  }
58 
59  BWORD isBound(void) const
60  { return TRUE; }
61 
62  I32 elementCount(
63  SurfaceAccessibleI::Element a_element) const;
64 
65  SpatialVector extentCorner(I32 a_primitiveIndex,I32 a_offset);
66 
67 virtual BWORD bindInternal(SurfaceAccessibleI::Element a_element,
68  const String& a_name);
69 };
70 
71 } /* namespace ext */
72 } /* namespace fe */
73 
74 #endif /* __usd_SurfaceAccessorUsdGraph_h__ */
kernel
Definition: namespace.dox:3
Common Functionality for Accessor Surface.
Definition: SurfaceAccessorBase.h:20
Automatically reference-counted string container.
Definition: String.h:128
USD Graph Access.
Definition: SurfaceAccessorUsdGraph.h:19
Wrapper for std::vector.
Definition: Array.h:21
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192