H3D::X3DNurbsSurfaceGeometryNode Class Reference
[Abstract nodes.]

The X3DNurbsSurfaceGeometryNode represents the abstract geometry type for all types of NURBS surfaces. More...

#include <H3D/X3DNurbsSurfaceGeometryNode.h>

Inheritance diagram for H3D::X3DNurbsSurfaceGeometryNode:

Inheritance graph

List of all members.

Classes

class  TexCoordOrNurbsTex
 This field class takes as input SFNode field and checks whether this is one of the allowed textureNodes or not. More...

Public Types

typedef DependentSFNode
< X3DCoordinateNode, FieldRef
< X3DGeometricPropertyNode,
Field,&X3DCoordinateNode::propertyChanged > > 
SFCoordinateNode
 The SFCoordinateNode is dependent on the propertyChanged field of the contained X3DCoordinateNode.
typedef DependentSFNode
< X3DGeometricPropertyNode,
FieldRef
< X3DGeometricPropertyNode,
Field,&X3DGeometricPropertyNode::propertyChanged > > 
TexCoordOrNurbsTexDependent
 The SFTextureCoordinteNode is dependent on the propertyChanged field of the contained X3DTextureCoordinateNode or NurbsTextureCoordinate which both inherits from X3DGeometricPropertyNode.
typedef CoordBoundField SFBound
 The bound field for X3DNurbsSurfaceGeometryNode is a CoordBoundField.

Public Member Functions

 ~X3DNurbsSurfaceGeometryNode ()
 Destructor.
 X3DNurbsSurfaceGeometryNode (Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< DisplayList > _displayList=0, Inst< MFBool > _isTouched=0, Inst< MFVec3f > _force=0, Inst< MFVec3f > _contactPoint=0, Inst< MFVec3f > _contactNormal=0, Inst< SFCoordinateNode > _controlPoint=0, Inst< TexCoordOrNurbsTex > _texCoord=0, Inst< SFInt32 > _uTessellation=0, Inst< SFInt32 > _vTessellation=0, Inst< MFDouble > _weight=0, Inst< SFBool > _solid=0, Inst< SFBool > _uClosed=0, Inst< SFBool > _vClosed=0, Inst< SFInt32 > _uDimension=0, Inst< SFInt32 > _vDimension=0, Inst< MFDouble > _uKnot=0, Inst< MFDouble > _vKnot=0, Inst< SFInt32 > _uOrder=0, Inst< SFInt32 > _vOrder=0)
 Constructor.
virtual void render ()
 Render the X3DNurbsSurfaceGeometryNode with OpenGL.
virtual void traverseSG (TraverseInfo &ti)
 Traverse the scenegraph.
virtual int nrTriangles ()
 The number of triangles renderered in this geometry, we don't know so return -1.
virtual void renderBetweenBeginEnd (GLUnurbsObj *nurbs_object, X3DTextureCoordinateNode *tex_coord_node, TextureCoordinateGenerator *tex_coord_gen, NurbsTextureCoordinate *nurbs_tex_coord, GLfloat *texKnotU, GLfloat *texKnotV, GLfloat *texCoordinates, GLfloat *u_knots, GLfloat *v_knots, H3DInt32 &sizeOfVertex, GLfloat *withWeights, H3DInt32 &uSizeToUse, H3DInt32 &vSizeToUse, H3DInt32 &map2Vertex3Or4)
 Function called by render to render the small part that differs between NurbsPatchSurface and NurbsTrimmedSurface.

Public Attributes

auto_ptr< SFCoordinateNodecontrolPoint
 controlPoint defines a set of control points of dimension uDimension vDimension.
auto_ptr< TexCoordOrNurbsTextexCoord
 texCoord provides additional information on how to generate texture coordinates.
auto_ptr< SFInt32uTessellation
 uTesselation provides a hint to the tessellation system of the nurbs surface.
auto_ptr< SFInt32vTessellation
 vTesselation provides a hint to the tessellation system of the nurbs surface.
auto_ptr< MFDoubleweight
 A weight value that shall be greater than zero is assigned to each controlPoint.
auto_ptr< SFBoolsolid
 Specifies if both sides of the Sphere should be rendered or only the outside.
auto_ptr< SFBooluClosed
 The uClosed defines whether the curve should be rendered as a closed object in the u direction.
auto_ptr< SFBoolvClosed
 The vClosed defines whether the curve should be rendered as a closed object in the v direction.
auto_ptr< SFInt32uDimension
 Defines the number of control points in the u dimension.
auto_ptr< SFInt32vDimension
 Defines the number of control points in the v dimension.
auto_ptr< MFDoubleuKnot
 Defines the knot values of the surface in the u dimension.
auto_ptr< MFDoublevKnot
 Defines the knot values of the surface in the v dimension.
auto_ptr< SFInt32uOrder
 Defines the order of the surface in the u dimension.
auto_ptr< SFInt32vOrder
 Defines the order of the surface in the v dimension.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

The X3DNurbsSurfaceGeometryNode represents the abstract geometry type for all types of NURBS surfaces.

uDimension and vDimension define the number of control points in the u and v dimensions.

uOrder and vOrder define the order of the surface in the u and v dimensions.

uKnot and vKnot define the knot values of the surface in the u and v dimensions.

uClosed and vClosed define whether or not the specific dimension is to be evaluated as a closed surface or not in the u and v dimensions.

controlPoint defines a set of control points of dimension uDimension vDimension. This set of points defines a mesh where the points do not have a uniform spacing. uDimension points define a polyline in u-direction followed by further u-polylines with the v-parameter in ascending order. The number of control points shall be equal or greater than the order. A closed surface shall be specified by repeating the limiting control points and setting the closed field to TRUE. If the closed field is set to FALSE, the implementation shall not be required to smoothly blend the edges of the surface in that dimension into a continuous surface. If the last set of control points are not identical, the field is ignored.

The control vertex corresponding to the control point P[i,j] on the control grid is:

P[i,j].x = controlPoints[i + ( j uDimension)].x P[i,j].y = controlPoints[i + ( j uDimension)].y P[i,j].z = controlPoints[i + ( j uDimension)].z P[i,j].w = weight[ i + (j uDimension)]

where 0 = i < uDimension and 0 = j < vDimension.

For an implementation subdividing the surface in a equal number of subdivision steps, tessellation values could be interpreted in the following way:

if a tessellation value is greater than 0, the number of tessellation points is:

tessellation+1;

if a tessellation value is smaller than 0, the number of tessellation points is:

-tessellation (u/v)dimension)+1;

if a tessellation value is 0, the number of tessellation points is:

(2 (u/v)dimension)+1.

For implementations doing tessellations based on chord length, tessellation values less than zero are interpreted as the maximum chord length deviation in pixels. Implementations doing fully automatic tessellation may ignore the tessellation hint parameters.

texCoord provides additional information on how to generate texture coordinates. By default, texture coordinates in the unit square (or cube for 3D coordinates) are generated automatically from the parametric subdivision. A NurbsTextureCoordinate node or simply a TextureCoordinate node can then be used to compute a texture coordinate given a u/v parameter of the NurbsSurface. The NurbsTextureCoordinate also supports non-animated surfaces to specify a "chord length"-based texture coordinate parametrization.

The solid field determines whether the surface is visible when viewed from the inside

closed defines whether the curve should be rendered as a closed object in the given parametric direction allowing the object to be closed in one direction, but not the other (EXAMPLE cylinder).

Internal routes:
X3DNurbsSurfaceGeometryNode.dot

Member Typedef Documentation

The SFCoordinateNode is dependent on the propertyChanged field of the contained X3DCoordinateNode.

The SFTextureCoordinteNode is dependent on the propertyChanged field of the contained X3DTextureCoordinateNode or NurbsTextureCoordinate which both inherits from X3DGeometricPropertyNode.


Member Function Documentation

virtual void H3D::X3DNurbsSurfaceGeometryNode::renderBetweenBeginEnd ( GLUnurbsObj *  nurbs_object,
X3DTextureCoordinateNode tex_coord_node,
TextureCoordinateGenerator tex_coord_gen,
NurbsTextureCoordinate nurbs_tex_coord,
GLfloat *  texKnotU,
GLfloat *  texKnotV,
GLfloat *  texCoordinates,
GLfloat *  u_knots,
GLfloat *  v_knots,
H3DInt32 sizeOfVertex,
GLfloat *  withWeights,
H3DInt32 uSizeToUse,
H3DInt32 vSizeToUse,
H3DInt32 map2Vertex3Or4 
) [inline, virtual]

Function called by render to render the small part that differs between NurbsPatchSurface and NurbsTrimmedSurface.

The arguments are things that are needed to render that difference. TODO: make protected instead of public?

Reimplemented in H3D::NurbsPatchSurface, and H3D::NurbsTrimmedSurface.

Referenced by render().


Member Data Documentation

controlPoint defines a set of control points of dimension uDimension vDimension.

This set of points defines a mesh where the points do not have a uniform spacing. uDimension points define a polyline in u-direction followed by further u-polylines with the v-parameter in ascending order. The number of control points shall be equal or greater than the order.

Access type: inputOutput

X3DNurbsSurfaceGeometryNode_controlPoint.dot

Referenced by render(), and X3DNurbsSurfaceGeometryNode().

Specifies if both sides of the Sphere should be rendered or only the outside.

Both are rendered if false, outside only it true.

Access type: inputOutput
Default value: TRUE

X3DNurbsSurfaceGeometryNode_solid.dot

Referenced by traverseSG(), and X3DNurbsSurfaceGeometryNode().

texCoord provides additional information on how to generate texture coordinates.

By default, texture coordinates in the unit square (or cube for 3D coordinates) are generated automatically from the parametric subdivision. A NurbsTextureCoordinate node or simply a TextureCoordinate node can then be used to compute a texture coordinate given a u/v parameter of the NurbsSurface.

Access type: inputOutput

X3DNurbsSurfaceGeometryNode_texCoord.dot

Referenced by render(), and X3DNurbsSurfaceGeometryNode().

The uClosed defines whether the curve should be rendered as a closed object in the u direction.

Access type: inputOutput
Default value: FALSE

X3DNurbsSurfaceGeometryNode_uClosed.dot

Referenced by X3DNurbsSurfaceGeometryNode().

Defines the number of control points in the u dimension.

Access type: inputOutput
Default value: 0

X3DNurbsSurfaceGeometryNode_uDimension.dot

Referenced by render(), H3D::NurbsTrimmedSurface::renderBetweenBeginEnd(), H3D::NurbsPatchSurface::renderBetweenBeginEnd(), and X3DNurbsSurfaceGeometryNode().

Defines the knot values of the surface in the u dimension.

Access type: inputOutput

X3DNurbsSurfaceGeometryNode_uKnot.dot

Referenced by render(), and X3DNurbsSurfaceGeometryNode().

Defines the order of the surface in the u dimension.

Access type: inputOutput
Default value: 3

X3DNurbsSurfaceGeometryNode_uOrder.dot

Referenced by render(), H3D::NurbsTrimmedSurface::renderBetweenBeginEnd(), H3D::NurbsPatchSurface::renderBetweenBeginEnd(), and X3DNurbsSurfaceGeometryNode().

uTesselation provides a hint to the tessellation system of the nurbs surface.

Access type: inputOutput
Default value: 0

X3DNurbsSurfaceGeometryNode_uTessellation.dot

Referenced by X3DNurbsSurfaceGeometryNode().

The vClosed defines whether the curve should be rendered as a closed object in the v direction.

Access type: inputOutput
Default value: FALSE

X3DNurbsSurfaceGeometryNode_vClosed.dot

Referenced by X3DNurbsSurfaceGeometryNode().

Defines the number of control points in the v dimension.

Access type: inputOutput
Default value: 0

X3DNurbsSurfaceGeometryNode_vDimension.dot

Referenced by render(), and X3DNurbsSurfaceGeometryNode().

Defines the knot values of the surface in the v dimension.

Access type: inputOutput

X3DNurbsSurfaceGeometryNode_vKnot.dot

Referenced by render(), and X3DNurbsSurfaceGeometryNode().

Defines the order of the surface in the v dimension.

Access type: inputOutput
Default value: 3

X3DNurbsSurfaceGeometryNode_vOrder.dot

Referenced by render(), H3D::NurbsTrimmedSurface::renderBetweenBeginEnd(), H3D::NurbsPatchSurface::renderBetweenBeginEnd(), and X3DNurbsSurfaceGeometryNode().

vTesselation provides a hint to the tessellation system of the nurbs surface.

Access type: inputOutput
Default value: 0

X3DNurbsSurfaceGeometryNode_vTessellation.dot

Referenced by X3DNurbsSurfaceGeometryNode().

A weight value that shall be greater than zero is assigned to each controlPoint.

The ordering of the values is equivalent to the ordering of the control point values. The number of values shall be identical to the number of control points. If the length of the weight vector is 0, the default weight 1.0 is assumed for each control point, thus defining a non-Rational curve. If the number of weight values is less than the number of control points, all weight values shall be ignored and a value of 1.0 shall be used.

Access type: inputOutput

X3DNurbsSurfaceGeometryNode_weight.dot

Referenced by render(), and X3DNurbsSurfaceGeometryNode().


The documentation for this class was generated from the following files:

Generated on Fri Nov 7 10:31:29 2008 for H3D API by  doxygen 1.5.7