.TH "SoNormalBundle" 3 "Tue Dec 26 2023 17:59:22" "Version 4.0.2" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoNormalBundle \- The \fBSoNormalBundle\fP class simplifies normal handling\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoBundle\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSoNormalBundle\fP (\fBSoAction\fP *action, SbBool \fBforrendering\fP)" .br .ti -1c .RI "\fB~SoNormalBundle\fP ()" .br .ti -1c .RI "SbBool \fBshouldGenerate\fP (int \fBnumneeded\fP)" .br .ti -1c .RI "\fBvoid\fP \fBinitGenerator\fP (int \fBinitnum\fP=100)" .br .ti -1c .RI "\fBvoid\fP \fBbeginPolygon\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBpolygonVertex\fP (\fBconst\fP \fBSbVec3f\fP &v)" .br .ti -1c .RI "\fBvoid\fP \fBendPolygon\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBtriangle\fP (\fBconst\fP \fBSbVec3f\fP &\fBp1\fP, \fBconst\fP \fBSbVec3f\fP &\fBp2\fP, \fBconst\fP \fBSbVec3f\fP &\fBp3\fP)" .br .ti -1c .RI "\fBvoid\fP \fBgenerate\fP (int \fBstartindex\fP=0, SbBool \fBaddtostate\fP=TRUE)" .br .ti -1c .RI "\fBconst\fP \fBSbVec3f\fP * \fBgetGeneratedNormals\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "int \fBgetNumGeneratedNormals\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBset\fP (int32_t num, \fBconst\fP \fBSbVec3f\fP *normals)" .br .ti -1c .RI "\fBconst\fP \fBSbVec3f\fP & \fBget\fP (int index) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsend\fP (int index) \fBconst\fP" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoNormalGenerator\fP * \fBgenerator\fP" .br .in -1c .SS "Additional Inherited Members" Protected Member Functions inherited from \fBSoBundle\fP .in +1c .ti -1c .RI "\fBSoBundle\fP (\fBSoAction\fP *action)" .br .ti -1c .RI "\fB~SoBundle\fP ()" .br .in -1c Protected Attributes inherited from \fBSoBundle\fP .in +1c .ti -1c .RI "\fBSoState\fP * \fBstate\fP" .br .RI "The state of the current action\&. " .in -1c .SH "Detailed Description" .PP The \fBSoNormalBundle\fP class simplifies normal handling\&. This class is currently not used in Coin but is provided for API compatibility\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoNormalBundle::SoNormalBundle (\fBSoAction\fP * action, SbBool forrendering)" Constructor\&. .SS "SoNormalBundle::~SoNormalBundle ()" Destructor\&. .SH "Member Function Documentation" .PP .SS "SbBool SoNormalBundle::shouldGenerate (int numneeded)" Returns FALSE if there are normals on the state\&. Otherwise \fBinitGenerator()\fP is called with \fInumneeded\fP as argument, and TRUE is returned\&. .SS "\fBvoid\fP SoNormalBundle::initGenerator (int initnum = \fC100\fP)" Initializes the normal generator\&. \fIinitnum\fP is a hint that should contain the approximate number of normals to be generated\&. .SS "\fBvoid\fP SoNormalBundle::beginPolygon (\fBvoid\fP)" Start polygon specification\&. Call \fBpolygonVertex()\fP for each vertex in the polygon, and then \fBendPolygon()\fP to close the polygon\&. .PP \fBSee also\fP .RS 4 \fBpolygonVertex()\fP, \fBendPolygon()\fP .RE .PP .SS "\fBvoid\fP SoNormalBundle::polygonVertex (\fBconst\fP \fBSbVec3f\fP & v)" Call for each vertex in a polygon\&. .PP \fBSee also\fP .RS 4 \fBbeginPolygon()\fP, \fBendPolygon()\fP .RE .PP .SS "\fBvoid\fP SoNormalBundle::endPolygon (\fBvoid\fP)" Call to close a polygon\&. .PP \fBSee also\fP .RS 4 \fBbeginPolygon()\fP, \fBpolygonVertex()\fP .RE .PP .SS "\fBvoid\fP SoNormalBundle::triangle (\fBconst\fP \fBSbVec3f\fP & p1, \fBconst\fP \fBSbVec3f\fP & p2, \fBconst\fP \fBSbVec3f\fP & p3)" Convenience method to specify a triangle\&. \fIp1\fP, \fIp2\fP, and \fIp3\fP are the triangles vertices\&. .SS "\fBvoid\fP SoNormalBundle::generate (int startindex = \fC0\fP, SbBool addtostate = \fCTRUE\fP)" Generate normals for the shape\&. \fIstartindex\fP should always be 0 (the \fBSoNonIndexedShape::startIndex\fP field is obsoleted)\&. \fIaddtostate\fP should be true if the generated normals should be pushed onto the current state\&. .SS "\fBconst\fP \fBSbVec3f\fP * SoNormalBundle::getGeneratedNormals (\fBvoid\fP) const" Returns the number of generated normals\&. .SS "int SoNormalBundle::getNumGeneratedNormals (\fBvoid\fP) const" Returns a pointer to the generated normals\&. .SS "\fBvoid\fP SoNormalBundle::set (int32_t num, \fBconst\fP \fBSbVec3f\fP * normals)" Can be used by nodes that generate their own normals\&. The state will be updated with the new normals, and the state will be popped again when the \fBSoNormalBundle\fP destructor is called\&. .SS "\fBconst\fP \fBSbVec3f\fP & SoNormalBundle::get (int index) const" Returns the \fIindex'th\fP normal from the state\&. .SS "\fBvoid\fP SoNormalBundle::send (int index) const" Send the index'th normal to OpenGL\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.