00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #pragma once
00022
00023 #include <Inventor/SbVertexAttributeBinding.h>
00024 #include <Inventor/elements/SoInt32Element.h>
00025
00037 SoEXTENDER_Documented class SoTangentBindingElement : public SoInt32Element
00038 {
00039 SO_ELEMENT_HEADER( SoTangentBindingElement );
00040
00041 public:
00046 enum Binding
00047 {
00051 OVERALL = SbVertexAttributeBinding::OVERALL,
00055 PER_PART = SbVertexAttributeBinding::PER_PART,
00059 PER_PART_INDEXED = SbVertexAttributeBinding::PER_PART_INDEXED,
00063 PER_FACE = SbVertexAttributeBinding::PER_FACE,
00067 PER_FACE_INDEXED = SbVertexAttributeBinding::PER_FACE_INDEXED,
00071 PER_VERTEX = SbVertexAttributeBinding::PER_VERTEX,
00075 PER_VERTEX_INDEXED = SbVertexAttributeBinding::PER_VERTEX_INDEXED
00076 };
00077
00081 static void set( SoState* state, Binding binding )
00082 {
00083 SoInt32Element::set( getClassTypeId(), classStackIndex, state, static_cast<int32_t>(binding) );
00084 }
00085
00089 static void set( SoState* state, SoNode*, Binding binding )
00090 {
00091 set( state, binding );
00092 }
00093
00097 static Binding get( SoState* state )
00098 {
00099 return static_cast<Binding>( SoInt32Element::get( getClassTypeId(), classStackIndex, state ) );
00100 }
00101
00105 static Binding getDefault()
00106 {
00107 return PER_VERTEX_INDEXED;
00108 }
00109
00113 virtual void print( FILE* fp ) const;
00114
00115 private:
00117 virtual void init( SoState* state );
00118
00119 private:
00120
00121 static void initClass();
00122 static void exitClass();
00123
00124 private:
00125 virtual ~SoTangentBindingElement();
00126 };
00127