Panda3D
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

QtessInputEntry Class Reference

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

#include "qtessInputEntry.h"

List of all members.

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 string &name=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.
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 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 (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 string params[], int num_params)
 Sets specific tesselation.
void write (ostream &out, int indent_level) const

Static Public Member Functions

static void output_extra (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 30 of file qtessInputEntry.h.


Member Function Documentation

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

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 314 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().

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 213 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::output_extra ( 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 383 of file qtessInputEntry.cxx.

Referenced by QtessSurface::write_qtess_parameter().

void QtessInputEntry::set_uv ( int  u,
int  v,
const 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 103 of file qtessInputEntry.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations