Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoTangentBindingElement.h
1/*=================================================================================
2*** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3*** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4*** ***
5*** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6*** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7*** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8*** ***
9*** RESTRICTED RIGHTS LEGEND ***
10*** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11*** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12*** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13*** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14*** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15*** ***
16*** COPYRIGHT (C) 1996-2019 BY FEI S.A.S, ***
17*** BORDEAUX, FRANCE ***
18*** ALL RIGHTS RESERVED ***
19=================================================================================*/
20
21#pragma once
22
23#include <Inventor/SbVertexAttributeBinding.h>
24#include <Inventor/elements/SoInt32Element.h>
25
37SoEXTENDER_Documented class SoTangentBindingElement : public SoInt32Element
38{
39 SO_ELEMENT_HEADER( SoTangentBindingElement );
40
41public:
77
81 static void set( SoState* state, Binding binding )
82 {
83 SoInt32Element::set( getClassTypeId(), classStackIndex, state, static_cast<int32_t>(binding) );
84 }
85
89 static void set( SoState* state, SoNode*, Binding binding )
90 {
91 set( state, binding );
92 }
93
97 static Binding get( SoState* state )
98 {
99 return static_cast<Binding>( SoInt32Element::get( getClassTypeId(), classStackIndex, state ) );
100 }
101
106 {
107 return PER_VERTEX_INDEXED;
108 }
109
113 virtual void print( FILE* fp ) const;
114
115private:
117 virtual void init( SoState* state );
118
119private:
120 // Initializes the SoTangentBindingElement class
121 static void initClass();
122 static void exitClass();
123
124private:
125 virtual ~SoTangentBindingElement();
126};
@ PER_FACE
One attribute for each face of object.
@ PER_FACE_INDEXED
One attribute for each face, indexed.
@ PER_PART_INDEXED
One attribute for each part, indexed.
@ PER_VERTEX_INDEXED
One attribute for each vertex, indexed.
@ OVERALL
Whole object has same attribute.
@ PER_PART
One attribute for each part of object.
@ PER_VERTEX
One attribute for each vertex.
Stores a single int32_t, int, or enum value.
Abstract base class for all database nodes.
Definition SoNode.h:145
Traversal state.
Definition SoState.h:74
Stores current tangent binding.
static Binding get(SoState *state)
Returns current tangent binding from the state.
Binding
The choice of values is for compatibility with Open Inventor 2.0 binary format files:
@ PER_PART
One tangent for each part of object.
@ OVERALL
Whole object has same tangent.
@ PER_FACE
One tangent for each face of object.
@ PER_PART_INDEXED
One tangent for each part, indexed.
@ PER_VERTEX_INDEXED
One tangent for each vertex, indexed.
@ PER_VERTEX
One tangent for each vertex.
@ PER_FACE_INDEXED
One tangent for each face, indexed.
static void set(SoState *state, Binding binding)
Sets the current tangent binding in the state.
static Binding getDefault()
Returns the default tangent binding.
virtual void print(FILE *fp) const
Prints element (for debugging).
static void set(SoState *state, SoNode *, Binding binding)
Sets the current tangent binding in the state.
static SoType getClassTypeId()
Returns the type identifier for this class.