00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef NURBSCURVERESULT_H
00020 #define NURBSCURVERESULT_H
00021
00022 #include "pandabase.h"
00023 #include "referenceCount.h"
00024 #include "nurbsMatrixVector.h"
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 class EXPCL_PANDA NurbsCurveResult : public ReferenceCount {
00041 public:
00042 NurbsCurveResult(const NurbsMatrixVector &basis, int order,
00043 const LVecBase4f verts[], int num_vertices);
00044
00045 PUBLISHED:
00046 INLINE ~NurbsCurveResult();
00047
00048 INLINE float get_start_t() const;
00049 INLINE float get_end_t() const;
00050
00051 INLINE bool eval_point(float t, LVecBase3f &point);
00052 INLINE bool eval_tangent(float t, LVecBase3f &tangent);
00053
00054 INLINE int get_num_segments() const;
00055 void eval_segment_point(int segment, float t, LVecBase3f &point) const;
00056 void eval_segment_tangent(int segment, float t, LVecBase3f &tangent) const;
00057 INLINE float get_segment_t(int segment, float t) const;
00058
00059 private:
00060 int find_segment(float t);
00061 int r_find_segment(float t, int top, int bot) const;
00062
00063 NurbsMatrixVector _prod;
00064
00065 int _last_segment;
00066 float _last_from;
00067 float _last_to;
00068 };
00069
00070 #include "nurbsCurveResult.I"
00071
00072 #endif
00073