14 #ifndef QTESSSURFACE_H 15 #define QTESSSURFACE_H 36 INLINE
const std::string &get_name()
const;
53 void tesselate_uv(
int u,
int v,
bool autoplace,
double ratio);
61 void record_vertex_extras();
62 INLINE
int get_joint_membership_index(
EggGroup *joint);
63 INLINE
int get_dxyz_index(
const std::string &morph_name);
64 INLINE
int get_drgba_index(
const std::string &morph_name);
67 PT(
EggGroup) do_uniform_tesselate(
int &tris)
const;
68 PT(
EggVertex) evaluate_vertex(
double u,
double v)
const;
73 bool _has_vertex_color;
78 typedef std::map<EggGroup *, int> JointTable;
79 JointTable _joint_table;
80 typedef std::map<std::string, int> MorphTable;
81 MorphTable _dxyz_table;
82 MorphTable _drgba_table;
99 bool _match_u_to_u, _match_v_to_v;
A reference to an EggNurbsSurface in the egg file, and its parameters as set by the user input file a...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int count_tris() const
Returns the number of triangles that will be generated by the current tesselation parameters.
void set_importance(double importance2)
Sets the importance of the surface, as a ratio in proportion to the square of its size.
int write_qtess_parameter(std::ostream &out)
Writes a line to the given output file telling qtess how this surface should be tesselated uniformly.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_match_v(QtessSurface **match_v, bool match_v_to_v)
Indicates the surface to which this surface must match in its V direction.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class is an abstraction for evaluating NURBS surfaces.
void set_match_u(QtessSurface **match_u, bool match_u_to_u)
Indicates the surface to which this surface must match in its U direction.
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Contains the logic used to place isoparams where they'll do the most good on a surface.
void set_min_v(int min_v)
Specifies the absolute minimum number of segments allowed in the V direction.
bool is_valid() const
Returns true if the defined surface is valid, false otherwise.
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void tesselate_auto(int u, int v, double ratio)
Sets the surface up to tesselate itself by automatically determining the best place to put the indica...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The result of a NurbsSurfaceEvaluator.
double get_score(double ratio)
Computes the curvature/stretch score for the surface, if it has not been already computed,...
void set_min_u(int min_u)
Specifies the absolute minimum number of segments allowed in the U direction.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void omit()
Sets up the surface to omit itself from the output.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void tesselate_specific(const pvector< double > &u_list, const pvector< double > &v_list)
Sets the surface up to tesselate itself at specific isoparams only.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for all things that want to be reference-counted.
int tesselate()
Applies the appropriate tesselation to the surface, and replaces its node in the tree with an EggGrou...
A parametric NURBS surface.
void tesselate_per_isoparam(double pi, bool autoplace, double ratio)
Sets the surface up to tesselate itself to a uniform amount per isoparam.
void tesselate_per_score(double pi, bool autoplace, double ratio)
Sets the surface up to tesselate itself according to its computed curvature score in both dimensions.
double count_patches() const
Returns the number of patches the NURBS contains.
void tesselate_uv(int u, int v, bool autoplace, double ratio)
Sets the surface up to tesselate itself uniformly at u x v, or if autoplace is true,...