Panda3D
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 std::string &name=std::string())
 
 QtessInputEntry (const QtessInputEntry &copy)
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

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 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 177 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 186 of file qtessInputEntry.cxx.

◆ 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 294 of file qtessInputEntry.cxx.

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

◆ 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 197 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().

◆ 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 359 of file qtessInputEntry.cxx.

Referenced by QtessSurface::write_qtess_parameter().

◆ set_uv()

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 94 of file qtessInputEntry.cxx.


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