H3D::Extrusion Class Reference
[X3D node classes.]

The Extrusion node specifies geometric shapes based on a two. More...

#include <Extrusion.h>

Inheritance diagram for H3D::Extrusion:

Inheritance graph
List of all members.

Public Member Functions

virtual void render ()
 Render the Extrusion with OpenGL.
 Extrusion (Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< DisplayList > _displayList=0, Inst< SFBool > _beginCap=0, Inst< SFBool > _ccw=0, Inst< SFBool > _convex=0, Inst< SFFloat > _creaseAngle=0, Inst< MFVec2f > _crossSection=0, Inst< SFBool > _endCap=0, Inst< MFRotation > _orientation=0, Inst< MFVec2f > _scale=0, Inst< SFBool > _solid=0, Inst< MFVec3f > _spine=0, Inst< VertexVectors > _vertexVector=0)
 Constructor.

Public Attributes

auto_ptr< SFBoolbeginCap
 Access type: inputOutput
Default value: TRUE

auto_ptr< SFBoolccw
 the geometry with respect to user-given or automatically generated normal vectors used in the lighting model equations.
auto_ptr< SFBoolconvex
 Access type: inputOutput
Default value: TRUE

auto_ptr< SFFloatcreaseAngle
 If the angle between the geometric normals of two adjacent faces is less than the crease angle, normals shall be calculated so that the faces are shaded smoothly across the edge; otherwise, normals shall be calculated so that a lighting discontinuity across the edge is produced.
auto_ptr< MFVec2fcrossSection
auto_ptr< SFBoolendCap
 Default value: TRUE

auto_ptr< MFRotationorientation
 Access type: inputOutput
Default value: 0 0 1 0

auto_ptr< MFVec2fscale
 Access type: inputOutput
Default value: 1 1

auto_ptr< SFBoolsolid
 The solid field determines whether one or both sides of each polygon shall be displayed.
auto_ptr< MFVec3fspine
auto_ptr< VertexVectorsvertexVector
 Only accessable in C++.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.

Protected Member Functions

template<typename T>
bool coinc (T a, T b)
 returns true if the two points are coincident
Vec3f calculateNormal (const vector< Vec3f > &vertex_vector, H3DInt32 right, H3DInt32 middle, H3DInt32 left)
 calculate the normal to a face given three vertices in the face.
vector< H3DInt32findSurroundingFaces (H3DInt32 i, H3DInt32 j, bool closedSpine, H3DInt32 nrOfSpinePoints, bool closedCrossSection, H3DInt32 nrOfCrossSectionPoints)
 find the surrounding faces to the face defined by i and j.
void generateNormalsPerVertex (vector< Vec3f > &normalVector, const vector< Vec3f > &vertex_vector, const vector< Vec2f > &cross_section, vector< Vec3f > &yAxis, bool ccwcheck, H3DInt32 nrOfCrossSectionPoints, H3DInt32 nrOfSpinePoints, bool closedSpine, H3DFloat crease_angle, H3DInt32 &ifCapsAdd)
 Create a vector from the arguments given with one normal for each vertex in each face, i.e.
void generateNormalsPerVertex (vector< Vec3f > &normalVector, const vector< Vec3f > &vertex_vector, const vector< Vec2f > &cross_section, vector< Vec3f > &yAxis, bool ccwcheck, H3DInt32 nrOfCrossSectionPoints, H3DInt32 nrOfSpinePoints, bool closedSpine, H3DInt32 &ifCapsAdd)
 Create a vector from the arguments given with one normal for each vertex.
vector< Vec3fgenerateNormalsPerFace (const vector< Vec3f > &vertex_vector, const vector< Vec2f > &cross_section, vector< Vec3f > &yAxis, bool ccwcheck, H3DInt32 nrOfCrossSectionPoints, H3DInt32 nrOfSpinePoints, bool closedCrossSection, H3DInt32 &ifCapsAdd)
 Create a vector from the arguments given with one normal for each face specified.

Classes

class  SFBound
 Extrusion. More...
class  VertexVectors
 routes_in[0] is the crossSection field. More...

Detailed Description

The Extrusion node specifies geometric shapes based on a two.

Internal routes:
Extrusion.dot


Member Function Documentation

void Extrusion::generateNormalsPerVertex vector< Vec3f > &  normalVector,
const vector< Vec3f > &  vertex_vector,
const vector< Vec2f > &  cross_section,
vector< Vec3f > &  yAxis,
bool  ccwcheck,
H3DInt32  nrOfCrossSectionPoints,
H3DInt32  nrOfSpinePoints,
bool  closedSpine,
H3DInt32 ifCapsAdd
[protected]
 

Create a vector from the arguments given with one normal for each vertex.

The normal for each vertex will be the average of the normal of all faces using that vertex.

void Extrusion::generateNormalsPerVertex vector< Vec3f > &  normalVector,
const vector< Vec3f > &  vertex_vector,
const vector< Vec2f > &  cross_section,
vector< Vec3f > &  yAxis,
bool  ccwcheck,
H3DInt32  nrOfCrossSectionPoints,
H3DInt32  nrOfSpinePoints,
bool  closedSpine,
H3DFloat  crease_angle,
H3DInt32 ifCapsAdd
[protected]
 

Create a vector from the arguments given with one normal for each vertex in each face, i.e.

the number of normals will be the number of facess *4


Member Data Documentation

auto_ptr< SFBool > H3D::Extrusion::beginCap
 

Access type: inputOutput
Default value: TRUE

Extrusion_beginCap.dot

auto_ptr< SFBool > H3D::Extrusion::ccw
 

the geometry with respect to user-given or automatically generated normal vectors used in the lighting model equations.

If ccw is TRUE, the normals shall follow the right hand rule; the orientation of each normal with respect to the vertices (taken in order) shall be such that the vertices appear to be oriented in a counterclockwise order when the vertices are viewed (in the local coordinate system of the Shape) from the opposite direction as the normal. If ccw is FALSE, the normals shall be oriented in the opposite direction. If normals are not generated but are supplied using a Normal node, and the orientation of the normals does not match the setting of the ccw field, results are undefined.

Access type: inputOutput
Default value: TRUE

Extrusion_ccw.dot

auto_ptr< SFBool > H3D::Extrusion::convex
 

Access type: inputOutput
Default value: TRUE

Extrusion_convex.dot

auto_ptr< SFFloat > H3D::Extrusion::creaseAngle
 

If the angle between the geometric normals of two adjacent faces is less than the crease angle, normals shall be calculated so that the faces are shaded smoothly across the edge; otherwise, normals shall be calculated so that a lighting discontinuity across the edge is produced.

Access type: inputOutput
Default value: 0
Valid range: [0-inf]

Extrusion_creaseAngle.dot

auto_ptr< MFVec2f > H3D::Extrusion::crossSection
 

Extrusion_crossSection.dot

auto_ptr< SFBool > H3D::Extrusion::endCap
 

Default value: TRUE

Extrusion_endCap.dot

auto_ptr< MFRotation > H3D::Extrusion::orientation
 

Access type: inputOutput
Default value: 0 0 1 0

Extrusion_orientation.dot

auto_ptr< MFVec2f > H3D::Extrusion::scale
 

Access type: inputOutput
Default value: 1 1

Extrusion_scale.dot

auto_ptr< SFBool > H3D::Extrusion::solid
 

The solid field determines whether one or both sides of each polygon shall be displayed.

If solid is FALSE, each polygon shall be visible regardless of the viewing direction (i.e., no backface culling shall be done, and two sided lighting shall be performed to illuminate both sides of lit surfaces). If solid is TRUE, back face culling will be performed.

Access type: inputOutput
Default value: TRUE

Extrusion_solid.dot

auto_ptr< MFVec3f > H3D::Extrusion::spine
 

Extrusion_spine.dot

auto_ptr< VertexVectors > H3D::Extrusion::vertexVector
 

Only accessable in C++.


Generated on Thu Aug 24 12:39:02 2006 for H3D API by  doxygen 1.4.5