EggNurbsCurve

from panda3d.egg import EggNurbsCurve
class EggNurbsCurve

Bases: EggCurve

A parametric NURBS curve.

Inheritance diagram

Inheritance diagram of EggNurbsCurve

__init__(*args, **kwargs)
assign()

C++ Interface: assign(const EggNurbsCurve self, const EggNurbsCurve copy)

/**

*/

closed
degree
getClassType()

C++ Interface: get_class_type()

getDegree()

C++ Interface: get_degree(EggNurbsCurve self)

/**
  • Returns the degree of the curve. For a typical NURBS, the degree is 3.

*/

getKnot()

C++ Interface: get_knot(EggNurbsCurve self, int k)

/**
  • Returns the nth knot value defined.

*/

getKnots()
getNumCvs()

C++ Interface: get_num_cvs(EggNurbsCurve self)

/**
  • Returns the total number of control vertices that should be defined for

  • the curve. This is determined by the number of knots and the order, in

  • each direction; it does not necessarily reflect the number of vertices that

  • have actually been added to the curve. (However, if the number of vertices

  • in the curve are wrong, the curve is invalid.)

*/

getNumKnots()

C++ Interface: get_num_knots(EggNurbsCurve self)

/**
  • Returns the number of knots.

*/

getOrder()

C++ Interface: get_order(EggNurbsCurve self)

/**
  • Returns the order of the curve. The order is the degree of the NURBS

  • equation plus 1; for a typical NURBS, the order is 4. With this

  • implementation of NURBS, the order must be in the range [1, 4].

*/

get_class_type()

C++ Interface: get_class_type()

get_degree()

C++ Interface: get_degree(EggNurbsCurve self)

/**
  • Returns the degree of the curve. For a typical NURBS, the degree is 3.

*/

get_knot()

C++ Interface: get_knot(EggNurbsCurve self, int k)

/**
  • Returns the nth knot value defined.

*/

get_knots()
get_num_cvs()

C++ Interface: get_num_cvs(EggNurbsCurve self)

/**
  • Returns the total number of control vertices that should be defined for

  • the curve. This is determined by the number of knots and the order, in

  • each direction; it does not necessarily reflect the number of vertices that

  • have actually been added to the curve. (However, if the number of vertices

  • in the curve are wrong, the curve is invalid.)

*/

get_num_knots()

C++ Interface: get_num_knots(EggNurbsCurve self)

/**
  • Returns the number of knots.

*/

get_order()

C++ Interface: get_order(EggNurbsCurve self)

/**
  • Returns the order of the curve. The order is the degree of the NURBS

  • equation plus 1; for a typical NURBS, the order is 4. With this

  • implementation of NURBS, the order must be in the range [1, 4].

*/

isClosed()

C++ Interface: is_closed(EggNurbsCurve self)

/**
  • Returns true if the curve appears to be closed. Since the Egg syntax does

  • not provide a means for explicit indication of closure, this has to be

  • guessed at by examining the curve itself.

*/

isValid()

C++ Interface: is_valid(EggNurbsCurve self)

/**
  • Returns true if the NURBS parameters are all internally consistent (e.g.

  • it has the right number of vertices to match its number of knots and order

  • in each dimension), or false otherwise.

*/

is_closed()

C++ Interface: is_closed(EggNurbsCurve self)

/**
  • Returns true if the curve appears to be closed. Since the Egg syntax does

  • not provide a means for explicit indication of closure, this has to be

  • guessed at by examining the curve itself.

*/

is_valid()

C++ Interface: is_valid(EggNurbsCurve self)

/**
  • Returns true if the NURBS parameters are all internally consistent (e.g.

  • it has the right number of vertices to match its number of knots and order

  • in each dimension), or false otherwise.

*/

knots
order
setKnot()

C++ Interface: set_knot(const EggNurbsCurve self, int k, double value)

/**
  • Resets the value of the indicated knot as indicated. k must be in the

  • range 0 <= k < get_num_knots(), and the value must be in the range

  • get_knot(k - 1) <= value <= get_knot(k + 1).

*/

setNumKnots()

C++ Interface: set_num_knots(const EggNurbsCurve self, int num)

/**
  • Directly changes the number of knots. This will either add zero-valued

  • knots onto the end, or truncate knot values from the end, depending on

  • whether the list is being increased or decreased. If possible, it is

  • preferable to use the setup() method instead of directly setting the number

  • of knots, as this may result in an invalid curve.

*/

setOrder()

C++ Interface: set_order(const EggNurbsCurve self, int order)

/**
  • Directly changes the order to the indicated value (which must be an integer

  • in the range 1 <= order <= 4). If possible, it is preferable to use the

  • setup() method instead of this method, since changing the order directly

  • may result in an invalid curve.

*/

set_knot()

C++ Interface: set_knot(const EggNurbsCurve self, int k, double value)

/**
  • Resets the value of the indicated knot as indicated. k must be in the

  • range 0 <= k < get_num_knots(), and the value must be in the range

  • get_knot(k - 1) <= value <= get_knot(k + 1).

*/

set_num_knots()

C++ Interface: set_num_knots(const EggNurbsCurve self, int num)

/**
  • Directly changes the number of knots. This will either add zero-valued

  • knots onto the end, or truncate knot values from the end, depending on

  • whether the list is being increased or decreased. If possible, it is

  • preferable to use the setup() method instead of directly setting the number

  • of knots, as this may result in an invalid curve.

*/

set_order()

C++ Interface: set_order(const EggNurbsCurve self, int order)

/**
  • Directly changes the order to the indicated value (which must be an integer

  • in the range 1 <= order <= 4). If possible, it is preferable to use the

  • setup() method instead of this method, since changing the order directly

  • may result in an invalid curve.

*/

setup()

C++ Interface: setup(const EggNurbsCurve self, int order, int num_knots)

/**
  • Prepares a new curve definition with the indicated order and number of

  • knots. This also implies a particular number of vertices as well (the

  • number of knots minus the order), but it is up to the user to add the

  • correct number of vertices to the curve by repeatedly calling push_back().

*/