Panda3D
 All Classes Functions Variables Enumerations
subdivSegment.h
1 // Filename: subdivSegment.h
2 // Created by: drose (14Oct03)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef SUBDIVSEGMENT_H
16 #define SUBDIVSEGMENT_H
17 
18 #include "pandatoolbase.h"
19 #include "pvector.h"
20 #include "vector_int.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : SubdivSegment
24 // Description : Represents a single hypothetical subdivided segment,
25 // under consideration by the IsoPlacer.
26 ////////////////////////////////////////////////////////////////////
28 public:
29  INLINE SubdivSegment(const double *cint, int f, int t);
30 
31  INLINE double get_score() const;
32  INLINE double get_need() const;
33  INLINE bool operator < (const SubdivSegment &other) const;
34 
35  void cut();
36 
37  const double *_cint;
38  int _f, _t;
39  int _num_cuts;
40  vector_int _cuts;
41 };
42 
43 #include "subdivSegment.I"
44 
45 #endif
46 
double get_score() const
Returns the net score of the segment.
Definition: subdivSegment.I:35
double get_need() const
Returns a score that indicates how badly the segment needs to be further subdivided.
Definition: subdivSegment.I:47
Represents a single hypothetical subdivided segment, under consideration by the IsoPlacer.
Definition: subdivSegment.h:27
bool operator<(const SubdivSegment &other) const
Sorts the segments in descending order of need.
Definition: subdivSegment.I:57
void cut()
Applies _num_cuts cuts to the segment.