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