Panda3D

nurbsVertex.h

00001 // Filename: nurbsVertex.h
00002 // Created by:  drose (03Dec02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef NURBSVERTEX_H
00016 #define NURBSVERTEX_H
00017 
00018 #include "pandabase.h"
00019 #include "luse.h"
00020 #include "nodePath.h"
00021 #include "pmap.h"
00022 
00023 ////////////////////////////////////////////////////////////////////
00024 //       Class : NurbsVertex
00025 // Description : This represents a single control vertex in a
00026 //               NurbsEvaluator.  It may be relative to a particular
00027 //               coordinate space; or its coordinate space may be
00028 //               unspecified.
00029 //
00030 //               This is not related to NurbsCurve, CubicCurveseg or
00031 //               any of the ParametricCurve-derived objects in this
00032 //               module.  It is a completely parallel implementation
00033 //               of NURBS curves, and will probably eventually replace
00034 //               the whole ParametricCurve class hierarchy.
00035 ////////////////////////////////////////////////////////////////////
00036 class EXPCL_PANDA_PARAMETRICS NurbsVertex {
00037 public:
00038   INLINE NurbsVertex();
00039   INLINE NurbsVertex(const NurbsVertex &copy);
00040   INLINE void operator = (const NurbsVertex &copy);
00041   INLINE ~NurbsVertex();
00042 
00043   INLINE void set_vertex(const LVecBase4 &vertex);
00044   INLINE const LVecBase4 &get_vertex() const;
00045 
00046   INLINE void set_space(const NodePath &space);
00047   INLINE void set_space(const string &space);
00048   INLINE NodePath get_space(const NodePath &rel_to) const;
00049 
00050   void set_extended_vertex(int d, PN_stdfloat value);
00051   PN_stdfloat get_extended_vertex(int d) const;
00052 
00053 private:
00054   LVecBase4 _vertex;
00055   NodePath _space;
00056   string _space_path;
00057   typedef pmap<int, PN_stdfloat> Extended;
00058   Extended _extended;
00059 };
00060 
00061 #include "nurbsVertex.I"
00062 
00063 #endif
00064 
 All Classes Functions Variables Enumerations