Panda3D

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
QtessInputEntry Class Reference

Stores one entry in the qtess input file. More...

`#include "qtessInputEntry.h"`

## Public Types
enum | Type { T_undefined , T_omit , T_num_tris , T_uv , T_per_isoparam , T_per_score , T_importance , T_match_uu , T_match_vv , T_match_uv , T_match_vu , T_min_u , T_min_v }

## Public Member Functions
| QtessInputEntry (const QtessInputEntry &copy)
| QtessInputEntry (const std::string &name=std::string())
void | add_extra_u_isoparam (double u)
| May be called a number of times before set_uv() to add specific additional isoparams to the tesselation.
void | add_extra_v_isoparam (double u)
| May be called a number of times before set_uv() to add specific additional isoparams to the tesselation.
void | add_node_name (const std::string &name)
int | count_tris (double tri_factor=1.0, int attempts=0)
| Determines the tesselation u,v amounts of each attached surface, and stores this information in the surface pointer.
int | get_num_surfaces () const
Type | match (QtessSurface *surface)
| Tests the surface to see if it matches any of the regular expressions that define this node entry.
void | operator= (const QtessInputEntry &copy)
void | output (std::ostream &out) const
void | set_importance (double i)
void | set_match_uu ()
void | set_match_uv ()
void | set_match_vu ()
void | set_match_vv ()
void | set_min_u (int min_u)
void | set_min_v (int min_v)
void | set_num_tris (int nt)
void | set_omit ()
void | set_per_isoparam (double pi)
void | set_per_score (double pi)
void | set_undefined ()
void | set_uv (int u, int v)
void | set_uv (int u, int v, const std::string params[], int num_params)
| Sets specific tesselation.
void | write (std::ostream &out, int indent_level) const

## Static Public Member Functions
static void | output_extra (std::ostream &out, const pvector< double > &iso, char axis)
| This function is used to identify the extra isoparams in the list added by user control.

## Public Attributes
bool | _auto_distribute
bool | _auto_place
QtessSurface * | _constrain_u
QtessSurface * | _constrain_v
double | _curvature_ratio
double | _importance

## Detailed Description

Stores one entry in the qtess input file.

This consists of a list of name patterns and a set of tesselation parameters.

Definition at line 27 of file qtessInputEntry.h.

## Member Enumeration Documentation

## ◆ Type

enum QtessInputEntry::Type

Definition at line 29 of file qtessInputEntry.h.

## Constructor & Destructor Documentation

## ◆ QtessInputEntry() [1/2]

QtessInputEntry::QtessInputEntry | ( | const std::string & | name = std::string() | ) |

Definition at line 29 of file qtessInputEntry.cxx.

## ◆ QtessInputEntry() [2/2]

QtessInputEntry::QtessInputEntry | ( | const QtessInputEntry & | copy | ) |
| inline

Definition at line 17 of file qtessInputEntry.I.

## Member Function Documentation

## ◆ add_extra_u_isoparam()

void QtessInputEntry::add_extra_u_isoparam | ( | double | u | ) |

May be called a number of times before set_uv() to add specific additional isoparams to the tesselation.

Definition at line 176 of file qtessInputEntry.cxx.

## ◆ add_extra_v_isoparam()

void QtessInputEntry::add_extra_v_isoparam | ( | double | u | ) |

May be called a number of times before set_uv() to add specific additional isoparams to the tesselation.

Definition at line 185 of file qtessInputEntry.cxx.

## ◆ add_node_name()

void QtessInputEntry::add_node_name | ( | const std::string & | name | ) |
| inline

Definition at line 25 of file qtessInputEntry.I.

## ◆ count_tris()

int QtessInputEntry::count_tris | ( | double | tri_factor = 1.0,
|  | int | attempts = 0 )

Determines the tesselation u,v amounts of each attached surface, and stores this information in the surface pointer.

Returns the total number of tris that will be produced.

Definition at line 293 of file qtessInputEntry.cxx.

References count_tris(), QtessSurface::count_tris(), QtessSurface::omit(), QtessSurface::tesselate_per_isoparam(), QtessSurface::tesselate_per_score(), QtessSurface::tesselate_specific(), and QtessSurface::tesselate_uv().

Referenced by count_tris().

## ◆ get_num_surfaces()

int QtessInputEntry::get_num_surfaces | ( |  | ) | const
| inline

Definition at line 147 of file qtessInputEntry.I.

## ◆ match()

QtessInputEntry::Type QtessInputEntry::match | ( | QtessSurface * | surface | ) |

Tests the surface to see if it matches any of the regular expressions that define this node entry.

If so, adds it to the set of matched surfaces and returns the type of the matching entry. If no match is found, returns T_undefined.

Definition at line 196 of file qtessInputEntry.cxx.

References QtessSurface::count_patches(), QtessSurface::get_score(), GlobPattern::matches(), QtessSurface::set_importance(), QtessSurface::set_match_u(), QtessSurface::set_match_v(), QtessSurface::set_min_u(), and QtessSurface::set_min_v().

## ◆ operator=()

void QtessInputEntry::operator= | ( | const QtessInputEntry & | copy | ) |

Definition at line 44 of file qtessInputEntry.cxx.

## ◆ output()

void QtessInputEntry::output | ( | std::ostream & | out | ) | const

Definition at line 380 of file qtessInputEntry.cxx.

## ◆ output_extra()

void QtessInputEntry::output_extra | ( | std::ostream & | out,
|  | const pvector< double > & | iso,
|  | char | axis )
| static

This function is used to identify the extra isoparams in the list added by user control.

Definition at line 358 of file qtessInputEntry.cxx.

Referenced by QtessSurface::write_qtess_parameter().

## ◆ set_importance()

void QtessInputEntry::set_importance | ( | double | i | ) |
| inline

Definition at line 33 of file qtessInputEntry.I.

## ◆ set_match_uu()

void QtessInputEntry::set_match_uu | ( |  | ) |
| inline

Definition at line 42 of file qtessInputEntry.I.

## ◆ set_match_uv()

void QtessInputEntry::set_match_uv | ( |  | ) |
| inline

Definition at line 60 of file qtessInputEntry.I.

## ◆ set_match_vu()

void QtessInputEntry::set_match_vu | ( |  | ) |
| inline

Definition at line 69 of file qtessInputEntry.I.

## ◆ set_match_vv()

void QtessInputEntry::set_match_vv | ( |  | ) |
| inline

Definition at line 51 of file qtessInputEntry.I.

## ◆ set_min_u()

void QtessInputEntry::set_min_u | ( | int | min_u | ) |
| inline

Definition at line 78 of file qtessInputEntry.I.

## ◆ set_min_v()

void QtessInputEntry::set_min_v | ( | int | min_v | ) |
| inline

Definition at line 87 of file qtessInputEntry.I.

## ◆ set_num_tris()

void QtessInputEntry::set_num_tris | ( | int | nt | ) |
| inline

Definition at line 112 of file qtessInputEntry.I.

## ◆ set_omit()

void QtessInputEntry::set_omit | ( |  | ) |
| inline

Definition at line 104 of file qtessInputEntry.I.

## ◆ set_per_isoparam()

void QtessInputEntry::set_per_isoparam | ( | double | pi | ) |
| inline

Definition at line 129 of file qtessInputEntry.I.

## ◆ set_per_score()

void QtessInputEntry::set_per_score | ( | double | pi | ) |
| inline

Definition at line 138 of file qtessInputEntry.I.

## ◆ set_undefined()

void QtessInputEntry::set_undefined | ( |  | ) |
| inline

Definition at line 96 of file qtessInputEntry.I.

## ◆ set_uv() [1/2]

void QtessInputEntry::set_uv | ( | int | u,
|  | int | v )
| inline

Definition at line 121 of file qtessInputEntry.I.

## ◆ set_uv() [2/2]

void QtessInputEntry::set_uv | ( | int | u,
|  | int | v,
|  | const std::string | params[],
|  | int | num_params )

Sets specific tesselation.

The tesselation will be u by v quads, with the addition of any isoparams described in the list of params.

Definition at line 93 of file qtessInputEntry.cxx.

References string_to_double().

## ◆ write()

void QtessInputEntry::write | ( | std::ostream & | out,
|  | int | indent_level ) const

Definition at line 462 of file qtessInputEntry.cxx.

## Member Data Documentation

## ◆ _auto_distribute

bool QtessInputEntry::_auto_distribute

Definition at line 65 of file qtessInputEntry.h.

## ◆ _auto_place

bool QtessInputEntry::_auto_place

Definition at line 65 of file qtessInputEntry.h.

## ◆ _constrain_u

QtessSurface* QtessInputEntry::_constrain_u

Definition at line 68 of file qtessInputEntry.h.

## ◆ _constrain_v

QtessSurface * QtessInputEntry::_constrain_v

Definition at line 68 of file qtessInputEntry.h.

## ◆ _curvature_ratio

double QtessInputEntry::_curvature_ratio

Definition at line 66 of file qtessInputEntry.h.

## ◆ _importance

double QtessInputEntry::_importance

Definition at line 67 of file qtessInputEntry.h.

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

- pandatool/src/egg-qtess/qtessInputEntry.h
- pandatool/src/egg-qtess/qtessInputEntry.cxx
- pandatool/src/egg-qtess/qtessInputEntry.I