Panda3D
|
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 ©) | |
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 ©) |
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 |
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.
enum QtessInputEntry::Type |
Definition at line 29 of file qtessInputEntry.h.
QtessInputEntry::QtessInputEntry | ( | const std::string & | name = std::string() | ) |
Definition at line 29 of file qtessInputEntry.cxx.
|
inline |
Definition at line 17 of file qtessInputEntry.I.
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.
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.
|
inline |
Definition at line 25 of file qtessInputEntry.I.
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 QtessSurface::count_tris(), count_tris(), QtessSurface::omit(), QtessSurface::tesselate_per_isoparam(), QtessSurface::tesselate_per_score(), QtessSurface::tesselate_specific(), and QtessSurface::tesselate_uv().
Referenced by count_tris().
|
inline |
Definition at line 147 of file qtessInputEntry.I.
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().
void QtessInputEntry::operator= | ( | const QtessInputEntry & | copy | ) |
Definition at line 44 of file qtessInputEntry.cxx.
void QtessInputEntry::output | ( | std::ostream & | out | ) | const |
Definition at line 380 of file qtessInputEntry.cxx.
|
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().
|
inline |
Definition at line 33 of file qtessInputEntry.I.
|
inline |
Definition at line 42 of file qtessInputEntry.I.
|
inline |
Definition at line 60 of file qtessInputEntry.I.
|
inline |
Definition at line 69 of file qtessInputEntry.I.
|
inline |
Definition at line 51 of file qtessInputEntry.I.
|
inline |
Definition at line 78 of file qtessInputEntry.I.
|
inline |
Definition at line 87 of file qtessInputEntry.I.
|
inline |
Definition at line 112 of file qtessInputEntry.I.
|
inline |
Definition at line 104 of file qtessInputEntry.I.
|
inline |
Definition at line 129 of file qtessInputEntry.I.
|
inline |
Definition at line 138 of file qtessInputEntry.I.
|
inline |
Definition at line 96 of file qtessInputEntry.I.
|
inline |
Definition at line 121 of file qtessInputEntry.I.
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().
void QtessInputEntry::write | ( | std::ostream & | out, |
int | indent_level ) const |
Definition at line 462 of file qtessInputEntry.cxx.
bool QtessInputEntry::_auto_distribute |
Definition at line 65 of file qtessInputEntry.h.
bool QtessInputEntry::_auto_place |
Definition at line 65 of file qtessInputEntry.h.
QtessSurface* QtessInputEntry::_constrain_u |
Definition at line 68 of file qtessInputEntry.h.
QtessSurface * QtessInputEntry::_constrain_v |
Definition at line 68 of file qtessInputEntry.h.
double QtessInputEntry::_curvature_ratio |
Definition at line 66 of file qtessInputEntry.h.
double QtessInputEntry::_importance |
Definition at line 67 of file qtessInputEntry.h.