BRL-CAD
test_root3-subd.cpp File Reference
#include "common.h"
#include <map>
#include <set>
#include <queue>
#include <list>
#include <iostream>
#include <fstream>
#include "vmath.h"
#include "raytrace.h"
#include "wdb.h"
#include "plot3.h"
#include "opennurbs.h"
Include dependency graph for test_root3-subd.cpp:

Go to the source code of this file.

Data Structures

struct  Mesh_Info
 

Functions

void plot_face (ON_3dPoint *pt1, ON_3dPoint *pt2, ON_3dPoint *pt3, int r, int g, int b, FILE *c_plot)
 
void find_q_pts (struct Mesh_Info *mesh)
 
fastf_t alpha_n (size_t n)
 
void point_inf (size_t p, struct Mesh_Info *mesh, ON_3dPointArray *p_a)
 
void point_subdiv (size_t m, size_t p, struct Mesh_Info *mesh, ON_3dPointArray *p_a)
 
ON_3dPoint p_edge_new (ON_3dPoint *p1, ON_3dPoint *p2, ON_3dPoint *curr)
 
ON_3dPoint p_edge_move (ON_3dPoint *p1, ON_3dPoint *p2, ON_3dPoint *curr)
 
std::pair< size_t, size_t > mk_edge (size_t pt_A, size_t pt_B)
 
void mesh_add_face (size_t pt1, size_t pt2, size_t pt3, size_t face_cnt, struct Mesh_Info *mesh)
 
void mesh_info_init (struct rt_bot_internal *bot, struct Mesh_Info *mesh)
 
void get_all_edges (struct Mesh_Info *mesh, std::set< std::pair< size_t, size_t > > *edges)
 
void get_boundaries (struct Mesh_Info *mesh, std::set< size_t > *outer_pts, std::set< std::pair< size_t, size_t > > *outer_edges, std::set< size_t > *outer_faces)
 
struct Mesh_Infoiterate (struct rt_bot_internal *bot, struct Mesh_Info *prev_mesh)
 
int main (int argc, char *argv[])
 

Function Documentation

void plot_face ( ON_3dPoint *  pt1,
ON_3dPoint *  pt2,
ON_3dPoint *  pt3,
int  r,
int  g,
int  b,
FILE *  c_plot 
)

Definition at line 38 of file test_root3-subd.cpp.

References pdv_3cont(), pdv_3move(), pl_color(), and VSET.

Referenced by main().

Here is the call graph for this function:

void find_q_pts ( struct Mesh_Info mesh)

Definition at line 73 of file test_root3-subd.cpp.

References Mesh_Info::face_pts, Mesh_Info::points_p0, and Mesh_Info::points_q.

Referenced by iterate().

fastf_t alpha_n ( size_t  n)

Definition at line 94 of file test_root3-subd.cpp.

Referenced by point_inf(), and point_subdiv().

void point_inf ( size_t  p,
struct Mesh_Info mesh,
ON_3dPointArray *  p_a 
)

Definition at line 102 of file test_root3-subd.cpp.

References OSL::Strings::alpha, alpha_n(), Mesh_Info::point_neighbors, Mesh_Info::point_valence, and Mesh_Info::points_p0.

Referenced by point_subdiv().

Here is the call graph for this function:

void point_subdiv ( size_t  m,
size_t  p,
struct Mesh_Info mesh,
ON_3dPointArray *  p_a 
)

Definition at line 128 of file test_root3-subd.cpp.

References alpha_n(), point_inf(), Mesh_Info::point_valence, Mesh_Info::points_inf, and Mesh_Info::points_p0.

Here is the call graph for this function:

ON_3dPoint p_edge_new ( ON_3dPoint *  p1,
ON_3dPoint *  p2,
ON_3dPoint *  curr 
)

Definition at line 143 of file test_root3-subd.cpp.

ON_3dPoint p_edge_move ( ON_3dPoint *  p1,
ON_3dPoint *  p2,
ON_3dPoint *  curr 
)

Definition at line 151 of file test_root3-subd.cpp.

std::pair<size_t, size_t> mk_edge ( size_t  pt_A,
size_t  pt_B 
)

Definition at line 305 of file test_root3-subd.cpp.

Referenced by edge_mappings(), get_all_edges(), iterate(), and mesh_add_face().

void mesh_add_face ( size_t  pt1,
size_t  pt2,
size_t  pt3,
size_t  face_cnt,
struct Mesh_Info mesh 
)

Definition at line 316 of file test_root3-subd.cpp.

References Mesh_Info::edges_to_faces, Mesh_Info::face_pts, mk_edge(), Mesh_Info::point_neighbors, and Mesh_Info::point_valence.

Referenced by iterate(), and mesh_info_init().

Here is the call graph for this function:

void mesh_info_init ( struct rt_bot_internal *  bot,
struct Mesh_Info mesh 
)

Definition at line 337 of file test_root3-subd.cpp.

References Mesh_Info::iteration_cnt, Mesh_Info::iteration_of_insert, mesh_add_face(), and Mesh_Info::points_p0.

Referenced by iterate().

Here is the call graph for this function:

void get_all_edges ( struct Mesh_Info mesh,
std::set< std::pair< size_t, size_t > > *  edges 
)

Definition at line 354 of file test_root3-subd.cpp.

References Mesh_Info::face_pts, and mk_edge().

Referenced by iterate().

Here is the call graph for this function:

void get_boundaries ( struct Mesh_Info mesh,
std::set< size_t > *  outer_pts,
std::set< std::pair< size_t, size_t > > *  outer_edges,
std::set< size_t > *  outer_faces 
)

Definition at line 370 of file test_root3-subd.cpp.

References Mesh_Info::edges_to_faces.

Referenced by iterate().

struct Mesh_Info* iterate ( struct rt_bot_internal *  bot,
struct Mesh_Info prev_mesh 
)

Definition at line 387 of file test_root3-subd.cpp.

References Mesh_Info::edges_to_faces, Mesh_Info::face_pts, find_q_pts(), get_all_edges(), get_boundaries(), Mesh_Info::index_in_next, Mesh_Info::iteration_cnt, Mesh_Info::iteration_of_insert, mesh_add_face(), mesh_info_init(), mk_edge(), Mesh_Info::points_p0, and Mesh_Info::points_q.

Referenced by main().

Here is the call graph for this function: