Home | Hierarchy | Members | Alphabetical | Related Pages |
#include <nurbscurve.h>
Inherits Node.
Inheritance diagram for NurbsCurve:
Public Member Functions | |
NurbsCurve (const char *name="") | |
virtual | ~NurbsCurve () |
virtual unsigned int | nbFields () const |
virtual FieldHandle | field (const std::string &n) |
virtual FieldHandle | field (const unsigned int i) |
virtual bool | isSetToDefaultValue (const unsigned int i) const |
virtual unsigned int | nbEventsIn () const |
virtual EventInHandle | eventIn (const std::string &n) |
virtual EventInHandle | eventIn (const unsigned int i) |
virtual unsigned int | nbEventsOut () const |
virtual EventOutHandle | eventOut (const std::string &n) |
virtual EventOutHandle | eventOut (const unsigned int i) |
const char * | typeName () const |
virtual Node * | duplicate () const |
virtual Node * | duplicate (std::map< const Node *, Node * > &) const |
Public Attributes | |
Exposed Fields | |
A field that is capable of receiving events via an eventIn to change its value(s), and generating events via an eventOut when its value(s) change. | |
MFVec3f | controlPoint |
MFFloat | weight |
SFInt32 | tessellation |
Fields | |
A property or attribute of a node. Each node type has a fixed set of fields. Fields may contain various kinds of data and one or many values. Each field has a default value. | |
MFFloat | knot |
SFInt32 | order |
Events In | |
EventIn< MFVec3f > | set_controlPoint |
EventIn< MFFloat > | set_weight |
EventIn< SFInt32 > | set_tessellation |
Events Out | |
EventOut< MFVec3f > | controlPoint_changed |
EventOut< MFFloat > | weight_changed |
EventOut< SFInt32 > | tessellation_changed |
The NurbsCurve node is a geometry node defining a parametric curve.
Order defines the order of curve. From a mathematical point of view, the curve is defined by a polynomial of the degree order-1. The value of Order shall be greater than or equal to 2. An implementation may limit Order to a certain number. The most common orders are 3 (quadratic polynomial) and 4 (cubic polynomial), which are sufficient to achieve the desired curvature in most cases. The number of control points shall be at least equal to the order of the curve. The order defines the number of adjacent control points that influence a given control point.
The control points define a piecewise linear curve, where the points do not have a uniform spacing. Depending on the weight value and the order, this piecewise linear curve is approximated by the resulting parametric curve. The number of control points shall be equal to or greater than the order. The control points are all defined as 3D vertices in the x, y, z domain. A closed B-Spline curve can be specified by repeating the limiting control points and by specifying a periodic knot vector.
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. If the weight of a control point increased above 1, the point is more closely approximated by the curve. However the curve is not changed if all weights are multiplied by a common factor. 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.
As a result of the lack of a 4D Coordinate field type in VRML, the control points and the corresponding weight values are held in separate fields. This separation also allows independent animation of the controlPoint fields using a CoordinateInterpolator node.
knots defines the knot vector. The number of knots shall be equal to the number of control points plus the order of the curve. The order shall be non-decreasing. By setting successive knot values equal, the degree of continuity is decreased, which implies that the curve has corners. In general, the curve is of continuity Ck-1-m at a knot point, where k is the order and m is the number of consecutive knots being equal. If k is the order of the curve, k consecutive knots at the end or the beginning of the vector cause the curve to interpolate the last or the first control point respectively. Within the knot vector there may not be more than k-1 consecutive knots of equal value. If the length of a knot vector is 0, a default uniform knot vector is computed.
The tessellation field gives a hint to the curve tessellator by setting an absolute number of subdivision steps. These values shall be greater than or equal to the Order field. A value of 0 indicates that the browser choose a suitable tessellation. Interpretation of values below 0 is implementation dependent.
For an implementation subdividing the surface into an equal number of subdivision steps, tessellation values are 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 × (number of control points)+1;
if a
tessellation value is 0, the number of tessellation points is
(2 × (number of control points)+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.
|
Construct a node with all its fields set to default value, which is equivalent to the code below: tessellation = 0; order = 3; |
|
Virtual destructor, does nothing |
|
Implements Node. |
|
Returns a deep copy of this node, that is a fully independant node with all children (if any) also copied. This is mainly useful for instanciating protos. Implements Node. |
|
Return a handle on the Implements Node. |
|
Return a handle on the event in named
Implements Node. |
|
Return a handle on the
Implements Node. |
|
Return a handle on the event out named
Implements Node. |
|
Return a handle on the
Implements Node. |
|
Return a handle on the field named
Implements Node. |
|
Implements Node. |
|
Returns the number of events in for this node type. Implements Node. |
|
Returns the number of events out for this node type. Implements Node. |
|
Returns the number of fields (exposed or not) for this node type. Implements Node. |
|
Returns Implements Node. |
|
See Detailed Description for meaning of this field. Default value is set to MFVec3f default value |
|
Changed event associated to exposedField controlPoint |
|
See Detailed Description for meaning of this field. Default value is set to MFFloat default value |
|
See Detailed Description for meaning of this field. Default value is set to order = 3; |
|
Set event associated to exposedField controlPoint |
|
Set event associated to exposedField tessellation |
|
Set event associated to exposedField weight |
|
See Detailed Description for meaning of this field. Default value is set to tessellation = 0; |
|
Changed event associated to exposedField tessellation |
|
See Detailed Description for meaning of this field. Default value is set to MFFloat default value |
|
Changed event associated to exposedField weight |
Generated on 24 Feb 2005 with version 1.3.9.1. |