Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
SubdivSegment Class Reference

Represents a single hypothetical subdivided segment, under consideration by the IsoPlacer. More...

#include "subdivSegment.h"

Public Member Functions

 SubdivSegment (const double *cint, int f, int t)
 
void cut ()
 Applies _num_cuts cuts to the segment.
 
double get_need () const
 Returns a score that indicates how badly the segment needs to be further subdivided.
 
double get_score () const
 Returns the net score of the segment.
 
bool operator< (const SubdivSegment &other) const
 Sorts the segments in descending order of need.
 

Public Attributes

const double * _cint
 
vector_int _cuts
 
int _f
 
int _num_cuts
 
int _t
 

Detailed Description

Represents a single hypothetical subdivided segment, under consideration by the IsoPlacer.

Definition at line 25 of file subdivSegment.h.

Constructor & Destructor Documentation

◆ SubdivSegment()

SubdivSegment::SubdivSegment ( const double * cint,
int f,
int t )
inline

Definition at line 17 of file subdivSegment.I.

Member Function Documentation

◆ cut()

void SubdivSegment::cut ( )

Applies _num_cuts cuts to the segment.

Definition at line 40 of file subdivSegment.cxx.

References get_score().

◆ get_need()

double SubdivSegment::get_need ( ) const
inline

Returns a score that indicates how badly the segment needs to be further subdivided.

The greater the number, the greater the need.

Definition at line 37 of file subdivSegment.I.

References get_score().

Referenced by operator<().

◆ get_score()

double SubdivSegment::get_score ( ) const
inline

Returns the net score of the segment.

Definition at line 28 of file subdivSegment.I.

Referenced by cut(), and get_need().

◆ operator<()

bool SubdivSegment::operator< ( const SubdivSegment & other) const
inline

Sorts the segments in descending order of need.

Definition at line 45 of file subdivSegment.I.

References get_need().

Member Data Documentation

◆ _cint

const double* SubdivSegment::_cint

Definition at line 35 of file subdivSegment.h.

◆ _cuts

vector_int SubdivSegment::_cuts

Definition at line 38 of file subdivSegment.h.

◆ _f

int SubdivSegment::_f

Definition at line 36 of file subdivSegment.h.

◆ _num_cuts

int SubdivSegment::_num_cuts

Definition at line 37 of file subdivSegment.h.

◆ _t

int SubdivSegment::_t

Definition at line 36 of file subdivSegment.h.


The documentation for this class was generated from the following files: