29 #ifndef __INDEXEDFACESET_H__
30 #define __INDEXEDFACESET_H__
190 virtual void update();
218 const vector< int > &coord_index,
239 const vector< int > &coord_index,
260 const vector< int > &coord_index,
281 Types< SFBool, SFCoordinateNode, MFInt32, SFTextureCoordinateNode, MFInt32, SFFloat, SFBool > > {
285 virtual void update();
298 virtual void generateTangentsPerVertex(
301 const vector< int > &coord_index,
302 const vector< int > &tex_coord_index,
331 virtual void generateTangentsPerVertex(
334 const vector< int > &coord_index,
335 const vector< int > &tex_coord_index,
355 virtual void generateTangentsPerFace(
358 const vector< int > &coord_index,
359 const vector< int > &tex_coord_index,
360 bool normalize_values,
375 void calculateTangent(
const Vec3f &a,
const Vec3f &b,
const Vec3f &c,
376 const Vec3f &ta,
const Vec3f &tb,
const Vec3f &tc,
377 Vec3f &tangent, Vec3f &binormal );
386 Inst< SFBound > _bound = 0,
387 Inst< DisplayList > _displayList = 0,
388 Inst< SFColorNode > _color = 0,
389 Inst< SFCoordinateNode > _coord = 0,
390 Inst< SFNormalNode > _normal = 0,
391 Inst< SFTextureCoordinateNode > _texCoord = 0,
392 Inst< SFBool > _ccw = 0,
393 Inst< SFBool > _colorPerVertex = 0,
394 Inst< SFBool > _normalPerVertex = 0,
395 Inst< SFBool > _solid = 0,
396 Inst< MFVertexAttributeNode > _attrib = 0,
397 Inst< AutoNormal > _autoNormal = 0,
398 Inst< SFBool > _convex = 0,
399 Inst< SFFloat > _creaseAngle = 0,
400 Inst< MFInt32 > _set_colorIndex = 0,
401 Inst< MFInt32 > _set_coordIndex = 0,
402 Inst< MFInt32 > _set_normalIndex = 0,
403 Inst< MFInt32 > _set_texCoordIndex = 0,
404 Inst< MFInt32 > _colorIndex = 0,
405 Inst< MFInt32 > _coordIndex = 0,
406 Inst< MFInt32 > _normalIndex = 0,
407 Inst< MFInt32 > _texCoordIndex = 0,
408 Inst< SFFogCoordinate > _fogCoord = 0);
415 virtual void render();
419 return coordIndex->size();
Header file for CoordBoundField, specialiced field class.
Header file for FloatVertexAttribute.
Contains the MFInt32 field class.
Contains the SFFloat field class.
Header file for X3DComposedGeometryNode, X3D scene-graph node.
The CoordBoundField is specialized update itself from a X3DCoordinateNode.
Definition: CoordBoundField.h:43
The FloatVertexAttribute node defines a set of per-vertex single precision floating point attributes.
Definition: FloatVertexAttribute.h:56
Specialized field for automatically generating normals from coordinates.
Definition: IndexedFaceSet.h:189
Specialized field for automatically generating two FloatVertexAttribute nodes representing the tangen...
Definition: IndexedFaceSet.h:281
The IndexedFaceSet node represents a 3D shape formed by constructing faces (polygons) from vertices l...
Definition: IndexedFaceSet.h:163
H3DUniquePtr< MFInt32 > texCoordIndex
Indices into the texCoord field.
Definition: IndexedFaceSet.h:522
bool render_tangents
This will be set to true in traverseSG if the render function is supposed to render tangent vertex at...
Definition: IndexedFaceSet.h:542
H3DUniquePtr< MFInt32 > set_coordIndex
Field for setting the value of the coordIndex field.
Definition: IndexedFaceSet.h:444
H3DUniquePtr< SFFloat > creaseAngle
The creaseAngle field affects how default normals are generated.
Definition: IndexedFaceSet.h:502
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: IndexedFaceSet.h:537
CoordBoundField SFBound
The bound field for IndexedFaceSet is a CoordBoundField.
Definition: IndexedFaceSet.h:382
H3DUniquePtr< MFInt32 > normalIndex
Indices into the normal field.
Definition: IndexedFaceSet.h:512
H3DUniquePtr< AutoNormal > autoNormal
Auto-generated normals that are used if the normal field is NULL.
Definition: IndexedFaceSet.h:528
H3DUniquePtr< MFInt32 > coordIndex
Indices into the coord field.
Definition: IndexedFaceSet.h:488
virtual int nrTriangles()
An upper bound on the number of triangles.
Definition: IndexedFaceSet.h:418
H3DUniquePtr< MFInt32 > set_colorIndex
Field for setting the value of the colorIndex field.
Definition: IndexedFaceSet.h:438
H3DUniquePtr< MFInt32 > set_normalIndex
Field for setting the value of the normalIndex field.
Definition: IndexedFaceSet.h:450
H3DUniquePtr< MFInt32 > set_texCoordIndex
Field for setting the value of the texCoordIndex field.
Definition: IndexedFaceSet.h:456
H3DUniquePtr< AutoTangent > autoTangent
Auto-generated vertex attributes for tangents and binormals.
Definition: IndexedFaceSet.h:534
virtual bool supportsTangentAttributes()
Returns true if this geometry supports the automatic generation of tangents and binormals as FloatVer...
Definition: IndexedFaceSet.h:430
H3DUniquePtr< MFInt32 > colorIndex
Indices into the color field.
Definition: IndexedFaceSet.h:466
H3DUniquePtr< SFBool > convex
The convex field indicates whether all polygons in the shape are convex.
Definition: IndexedFaceSet.h:478
TraverseInfo is a structure that is passed along when traversing the scene graph.
Definition: TraverseInfo.h:57
A template modifier class for adding type checking on the routes to any Field class.
Definition: TypedField.h:84
This is the base node type for all composed 3D geometry in X3D.
Definition: X3DComposedGeometryNode.h:93
This is the base node type for all coordinate node types in X3D.
Definition: X3DCoordinateNode.h:47
This is the base node type for all normal node types in X3D.
Definition: X3DNormalNode.h:45
This abstract node type is the base type for all node types which specify texture coordinates.
Definition: X3DTextureCoordinateNode.h:55
H3D_VALUE_EXCEPTION(string, InvalidType)
An exception thrown when a field is of the wrong type when it is checked.
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194