|
| primitive_visitor () |
|
virtual | ~primitive_visitor () |
|
| primitive_visitor (const primitive_visitor &) |
|
primitive_visitor & | operator= (const primitive_visitor &) |
|
void | add_one_point (float a_x, float a_y, float a_z) |
|
void | add_one_point (float a_x, float a_y, float a_z, float a_r, float a_g, float a_b, float a_a) |
|
bool | add_triangle_fan (size_t a_floatn, const float *a_xyzs, bool a_stop=false) |
|
bool | add_triangle_fan_normal (size_t a_floatn, const float *a_xyzs, const float *a_nms, bool a_stop=false) |
|
bool | add_triangle_fan_normal_rgba (size_t a_floatn, const float *a_xyzs, const float *a_nms, const float *a_rgbas, bool a_stop=false) |
|
bool | add_triangle_strip (size_t a_floatn, const float *a_xyzs, bool a_stop=false) |
|
bool | add_triangles (size_t a_floatn, const float *a_xyzs, bool a_stop=false) |
|
bool | add_triangle_strip_normal (size_t a_floatn, const float *a_xyzs, const float *a_nms, bool a_stop=false) |
|
bool | add_triangle_strip_normal_rgba (size_t a_floatn, const float *a_xyzs, const float *a_nms, const float *a_rgbas, bool a_stop=false) |
|
bool | add_triangles_normal (size_t a_floatn, const float *a_xyzs, const float *a_nms, bool a_stop=false) |
|
bool | add_triangles_rgba (size_t a_floatn, const float *a_xyzs, const float *a_rgbas, bool a_stop=false) |
|
bool | add_triangles_normal_rgba (size_t a_floatn, const float *a_xyzs, const float *a_nms, const float *a_rgbas, bool a_stop=false) |
|
bool | add_line_strip (size_t a_floatn, const float *a_xyzs, bool a_stop=false) |
|
bool | add_line_strip_rgba (size_t a_floatn, const float *a_xyzs, const float *a_rgbas, bool a_stop=false) |
|
bool | add_line_strip_normal (size_t a_floatn, const float *a_xyzs, const float *a_nms, bool a_stop=false) |
|
bool | add_line_strip_normal_rgba (size_t a_floatn, const float *a_xyzs, const float *a_nms, const float *a_rgbas, bool a_stop=false) |
|
bool | add_line_loop (size_t a_floatn, const float *a_xyzs, bool a_stop=false) |
|
bool | add_line_loop_rgba (size_t a_floatn, const float *a_xyzs, const float *a_rgbas, bool a_stop=false) |
|
bool | add_line_loop_normal (size_t a_floatn, const float *a_xyzs, const float *a_nms, bool a_stop=false) |
|
bool | add_line_loop_normal_rgba (size_t a_floatn, const float *a_xyzs, const float *a_nms, const float *a_rgbas, bool a_stop=false) |
|
bool | add_lines (size_t a_floatn, const float *a_xyzs, bool a_stop=false) |
|
bool | add_lines_rgba (size_t a_floatn, const float *a_xyzs, const float *a_rgbas, bool a_stop=false) |
|
bool | add_lines_normal (size_t a_floatn, const float *a_xyzs, const float *a_nms, bool a_stop=false) |
|
bool | add_lines_normal_rgba (size_t a_floatn, const float *a_xyzs, const float *a_nms, const float *a_rgbas, bool a_stop=false) |
|
bool | add_points (size_t a_floatn, const float *a_xyzs, bool a_stop=false) |
|
bool | add_points_rgba (size_t a_floatn, const float *a_xyzs, const float *a_rgbas, bool a_stop=false) |
|
bool | add_points_normal (size_t a_floatn, const float *a_xyzs, const float *a_nms, bool a_stop=false) |
|
bool | add_points_normal_rgba (size_t a_floatn, const float *a_xyzs, const float *a_nms, const float *a_rgbas, bool a_stop=false) |
|
bool | add_primitive (gl::mode_t a_mode, size_t a_floatn, const float *a_xyzs, bool a_stop=false) |
|
bool | add_primitive_rgba (gl::mode_t a_mode, size_t a_floatn, const float *a_xyzs, const float *a_rgbas, bool a_stop=false) |
|
bool | add_primitive_normal (gl::mode_t a_mode, size_t a_floatn, const float *a_xyzs, const float *a_nms, bool a_stop=false) |
|
bool | add_primitive_normal_rgba (gl::mode_t a_mode, size_t a_floatn, const float *a_xyzs, const float *a_nms, const float *a_rgbas, bool a_stop=false) |
|
bool | add_points_xy (size_t a_floatn, const float *a_xys, bool a_stop=false) |
| points with x,y only /////////////////////////////// More...
|
|
bool | add_triangle_fan_xy (size_t a_floatn, const float *a_xys, bool a_stop=false, bool a_triangle_revert=false) |
|
bool | add_triangle_strip_xy (size_t a_floatn, const float *a_xys, bool a_stop=false, bool a_triangle_revert=false) |
|
bool | add_triangles_xy (size_t a_floatn, const float *a_xys, bool a_stop=false, bool a_triangle_revert=false) |
|
bool | add_line_loop_xy (size_t a_floatn, const float *a_xys, bool a_stop=false) |
|
bool | add_line_strip_xy (size_t a_floatn, const float *a_xys, bool a_stop=false) |
|
bool | add_lines_xy (size_t a_floatn, const float *a_xys, bool a_stop=false) |
|
bool | add_primitive_xy (gl::mode_t a_mode, size_t a_floatn, const float *a_xys, bool a_stop=false, bool a_triangle_revert=false) |
|
bool | add_primitive (gl::mode_t a_mode, const std::vector< float > &a_xyzs, bool a_stop=false) |
|
bool | add_primitive_xy (gl::mode_t a_mode, const std::vector< float > &a_xys, bool a_stop=false, bool a_triangle_revert=false) |
|
bool | add_line_strip (const std::vector< float > &a_xyzs, bool a_stop=false) |
|
bool | add_line_loop (const std::vector< float > &a_xyzs, bool a_stop=false) |
|
bool | add_lines (const std::vector< float > &a_xyzs, bool a_stop=false) |
|
bool | add_points (const std::vector< float > &a_xyzs, bool a_stop=false) |
|
bool | add_triangle_strip (const std::vector< float > &a_xyzs, bool a_stop=false) |
|
bool | add_points_xy (const std::vector< float > &a_xys, bool a_stop=false) |
|
bool | add_lines_xy (const std::vector< float > &a_xys, bool a_stop=false) |
|
bool | add_triangle_strip_xy (const std::vector< float > &a_xys, bool a_stop=false) |
|
bool | add_triangle_fan_texture_normal (size_t a_floatn, const float *a_xyzs, const float *a_nms, unsigned int, const float *) |
|
bool | add_triangle_strip_texture_normal (size_t a_floatn, const float *a_xyzs, const float *a_nms, unsigned int, const float *) |
|
bool | add_triangle_strip_as_triangles (size_t a_floatn, const float *a_xyzs, const float *a_nms) |
|
void | add_texture (std::ostream &a_out, size_t a_xyzn, const float *a_xyzs, const img_byte &a_img, const float *a_tcs) |
|
|
virtual bool | project (float &a_x, float &a_y, float &a_z, float &a_w)=0 |
|
virtual bool | add_point (float, float, float, float)=0 |
|
virtual bool | add_point (float, float, float, float, float, float, float, float)=0 |
|
virtual bool | add_line (float, float, float, float, float, float, float, float)=0 |
|
virtual bool | add_line (float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float)=0 |
|
virtual bool | add_triangle (float, float, float, float, float, float, float, float, float, float, float, float)=0 |
|
virtual bool | add_triangle (float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float)=0 |
|
virtual bool | project_normal (float &a_x, float &a_y, float &a_z)=0 |
|
virtual bool | add_point_normal (float, float, float, float, float, float, float)=0 |
|
virtual bool | add_point_normal (float, float, float, float, float, float, float, float, float, float, float)=0 |
|
virtual bool | add_line_normal (float, float, float, float, float, float, float, float, float, float, float, float, float, float)=0 |
|
virtual bool | add_line_normal (float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float)=0 |
|
virtual bool | add_triangle_normal (float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float)=0 |
|
virtual bool | add_triangle_normal (float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float)=0 |
|
Definition at line 20 of file primitive_visitor.
◆ primitive_visitor() [1/2]
tools::sg::primitive_visitor::primitive_visitor |
( |
| ) |
|
|
inline |
◆ ~primitive_visitor()
virtual tools::sg::primitive_visitor::~primitive_visitor |
( |
| ) |
|
|
inlinevirtual |
◆ primitive_visitor() [2/2]
◆ add_line() [1/2]
virtual bool tools::sg::primitive_visitor::add_line |
( |
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
|
protectedpure virtual |
◆ add_line() [2/2]
virtual bool tools::sg::primitive_visitor::add_line |
( |
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
|
protectedpure virtual |
◆ add_line_loop() [1/2]
bool tools::sg::primitive_visitor::add_line_loop |
( |
const std::vector< float > & |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
◆ add_line_loop() [2/2]
bool tools::sg::primitive_visitor::add_line_loop |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 950 of file primitive_visitor.
951 size_t num = a_floatn/3;
952 if(num<=1)
return false;
957 float xb,yb,zb,wb,xe,ye,ze,we;
959 for(
size_t iseg = 0;iseg<nseg;iseg++) {
960 pos = (
float*)(a_xyzs+3*iseg);
971 if(!
add_line(xb,yb,zb,wb, xe,ye,ze,we)) {
if(a_stop)
return false;}
975 {pos = (
float*)(a_xyzs+3*(nseg-1)+3);
981 pos = (
float*)(a_xyzs);
987 if(!
add_line(xb,yb,zb,wb, xe,ye,ze,we)){
if(a_stop)
return false;}
◆ add_line_loop_normal()
bool tools::sg::primitive_visitor::add_line_loop_normal |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1065 of file primitive_visitor.
1066 size_t num = a_floatn/3;
1067 if(num<=1)
return false;
1068 size_t nseg = num-1;
1072 float xb,yb,zb,wb,xe,ye,ze,we;
1073 float nxb,nyb,nzb,nxe,nye,nze;
1076 for(
size_t iseg = 0;iseg<nseg;iseg++) {
1077 pos = (
float*)(a_xyzs+3*iseg);
1088 nos = (
float*)(a_nms+3*iseg);
1100 xe,ye,ze,we, nxe,nye,nze)) {
if(a_stop)
return false;}
1104 {pos = (
float*)(a_xyzs+3*(nseg-1)+3);
1110 pos = (
float*)(a_xyzs);
1116 nos = (
float*)(a_nms+3*(nseg-1)+3);
1122 nos = (
float*)(a_nms);
1129 xe,ye,ze,we, nxe,nye,nze)) {
if(a_stop)
return false;}
◆ add_line_loop_normal_rgba()
bool tools::sg::primitive_visitor::add_line_loop_normal_rgba |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1136 of file primitive_visitor.
1137 size_t num = a_floatn/3;
1138 if(num<=1)
return false;
1139 size_t nseg = num-1;
1143 float xb,yb,zb,wb,xe,ye,ze,we;
1144 float nxb,nyb,nzb,nxe,nye,nze;
1145 float rb,gb,bb,ab,re,
ge,be,ae;
1149 for(
size_t iseg = 0;iseg<nseg;iseg++) {
1150 pos = (
float*)(a_xyzs+3*iseg);
1161 nos = (
float*)(a_nms+3*iseg);
1172 ros = (
float*)(a_rgbas+4*iseg);
1183 if(!
add_line_normal(xb,yb,zb,wb, nxb,nyb,nzb, rb,gb,bb,ab,
1184 xe,ye,ze,we, nxe,nye,nze, re,
ge,be,ae)) {
1185 if(a_stop)
return false;
1190 {pos = (
float*)(a_xyzs+3*nseg);
1196 pos = (
float*)(a_xyzs);
1202 nos = (
float*)(a_nms+3*nseg);
1208 nos = (
float*)(a_nms);
1214 ros = (
float*)(a_rgbas+4*nseg);
1220 ros = (
float*)(a_rgbas);
1226 if(!
add_line_normal(xb,yb,zb,wb, nxb,nyb,nzb, rb,gb,bb,ab,
1227 xe,ye,ze,we, nxe,nye,nze, re,
ge,be,ae)) {
1228 if(a_stop)
return false;
◆ add_line_loop_rgba()
bool tools::sg::primitive_visitor::add_line_loop_rgba |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 993 of file primitive_visitor.
994 size_t num = a_floatn/3;
995 if(num<=1)
return false;
1000 float xb,yb,zb,wb,xe,ye,ze,we;
1001 float rb,gb,bb,ab,re,
ge,be,ae;
1004 for(
size_t iseg = 0;iseg<nseg;iseg++) {
1005 pos = (
float*)(a_xyzs+3*iseg);
1016 ros = (
float*)(a_rgbas+4*iseg);
1027 if(!
add_line(xb,yb,zb,wb,rb,gb,bb,ab,
1028 xe,ye,ze,we,re,
ge,be,ae)) {
1029 if(a_stop)
return false;
1034 {pos = (
float*)(a_xyzs+3*nseg);
1040 pos = (
float*)(a_xyzs);
1046 ros = (
float*)(a_rgbas+4*nseg);
1052 ros = (
float*)(a_rgbas);
1058 if(!
add_line(xb,yb,zb,wb,rb,gb,bb,ab,
1059 xe,ye,ze,we,re,
ge,be,ae)){
if(a_stop)
return false;}
◆ add_line_loop_xy()
bool tools::sg::primitive_visitor::add_line_loop_xy |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xys, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1838 of file primitive_visitor.
1839 size_t num = a_floatn/2;
1840 if(num<=1)
return false;
1841 size_t nseg = num-1;
1845 float xb,yb,zb,wb,xe,ye,ze,we;
1847 for(
size_t iseg = 0;iseg<nseg;iseg++) {
1848 pos = (
float*)(a_xys+2*iseg);
1859 if(!
add_line(xb,yb,zb,wb, xe,ye,ze,we)) {
if(a_stop)
return false;}
1863 {pos = (
float*)(a_xys+2*(nseg-1)+2);
1869 pos = (
float*)(a_xys);
1875 if(!
add_line(xb,yb,zb,wb, xe,ye,ze,we)){
if(a_stop)
return false;}
◆ add_line_normal() [1/2]
virtual bool tools::sg::primitive_visitor::add_line_normal |
( |
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
|
protectedpure virtual |
◆ add_line_normal() [2/2]
virtual bool tools::sg::primitive_visitor::add_line_normal |
( |
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
|
protectedpure virtual |
◆ add_line_strip() [1/2]
bool tools::sg::primitive_visitor::add_line_strip |
( |
const std::vector< float > & |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
◆ add_line_strip() [2/2]
bool tools::sg::primitive_visitor::add_line_strip |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 787 of file primitive_visitor.
788 size_t num = a_floatn/3;
789 if(num<=1)
return false;
794 float xb,yb,zb,wb,xe,ye,ze,we;
796 for(
size_t iseg = 0;iseg<nseg;iseg++) {
797 pos = (
float*)(a_xyzs+3*iseg);
808 if(!
add_line(xb,yb,zb,wb, xe,ye,ze,we)) {
if(a_stop)
return false;}
◆ add_line_strip_normal()
bool tools::sg::primitive_visitor::add_line_strip_normal |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 855 of file primitive_visitor.
856 size_t num = a_floatn/3;
857 if(num<=1)
return false;
862 float xb,yb,zb,wb,xe,ye,ze,we;
863 float nxb,nyb,nzb,nxe,nye,nze;
866 for(
size_t iseg = 0;iseg<nseg;iseg++) {
867 pos = (
float*)(a_xyzs+3*iseg);
878 nos = (
float*)(a_nms+3*iseg);
890 xe,ye,ze,we, nxe,nye,nze)) {
if(a_stop)
return false;}
◆ add_line_strip_normal_rgba()
bool tools::sg::primitive_visitor::add_line_strip_normal_rgba |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 895 of file primitive_visitor.
896 size_t num = a_floatn/3;
897 if(num<=1)
return false;
902 float xb,yb,zb,wb,xe,ye,ze,we;
903 float nxb,nyb,nzb,nxe,nye,nze;
904 float rb,gb,bb,ab,re,
ge,be,ae;
908 for(
size_t iseg = 0;iseg<nseg;iseg++) {
909 pos = (
float*)(a_xyzs+3*iseg);
920 nos = (
float*)(a_nms+3*iseg);
931 ros = (
float*)(a_rgbas+4*iseg);
942 if(!
add_line_normal(xb,yb,zb,wb, nxb,nyb,nzb, rb,gb,bb,ab,
943 xe,ye,ze,we, nxe,nye,nze, re,
ge,be,ae)) {
944 if(a_stop)
return false;
◆ add_line_strip_rgba()
bool tools::sg::primitive_visitor::add_line_strip_rgba |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 813 of file primitive_visitor.
814 size_t num = a_floatn/3;
815 if(num<=1)
return false;
820 float xb,yb,zb,wb,xe,ye,ze,we;
821 float rb,gb,bb,ab,re,
ge,be,ae;
824 for(
size_t iseg = 0;iseg<nseg;iseg++) {
825 pos = (
float*)(a_xyzs+3*iseg);
836 ros = (
float*)(a_rgbas+4*iseg);
847 if(!
add_line(xb,yb,zb,wb,rb,gb,bb,ab,
848 xe,ye,ze,we,re,
ge,be,ae)) {
849 if(a_stop)
return false;
◆ add_line_strip_xy()
bool tools::sg::primitive_visitor::add_line_strip_xy |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xys, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1881 of file primitive_visitor.
1882 size_t num = a_floatn/2;
1883 if(num<=1)
return false;
1884 size_t nseg = num-1;
1888 float xb,yb,zb,wb,xe,ye,ze,we;
1890 for(
size_t iseg = 0;iseg<nseg;iseg++) {
1891 pos = (
float*)(a_xys+2*iseg);
1902 if(!
add_line(xb,yb,zb,wb, xe,ye,ze,we)) {
if(a_stop)
return false;}
◆ add_lines() [1/2]
bool tools::sg::primitive_visitor::add_lines |
( |
const std::vector< float > & |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1982 of file primitive_visitor.
1983 const float* _xyzs = vec_data<float>(a_xyzs);
1984 return add_lines(a_xyzs.size(),_xyzs,a_stop);
◆ add_lines() [2/2]
bool tools::sg::primitive_visitor::add_lines |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1236 of file primitive_visitor.
1238 size_t num = a_floatn/3;
1240 size_t nseg = num/2;
1241 if(!nseg)
return false;
1245 float xb,yb,zb,wb,xe,ye,ze,we;
1247 for(
size_t iseg = 0;iseg<nseg;iseg++) {
1248 pos = (
float*)(a_xyzs+6*iseg);
1259 if(!
add_line(xb,yb,zb,wb, xe,ye,ze,we)) {
if(a_stop)
return false;}
◆ add_lines_normal()
bool tools::sg::primitive_visitor::add_lines_normal |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1305 of file primitive_visitor.
1307 size_t num = a_floatn/3;
1309 size_t nseg = num/2;
1310 if(!nseg)
return false;
1314 float xb,yb,zb,wb,xe,ye,ze,we;
1315 float nxb,nyb,nzb,nxe,nye,nze;
1320 for(
size_t iseg = 0;iseg<nseg;iseg++) {
1321 pos = (
float*)(a_xyzs+6*iseg);
1332 nos = (
float*)(a_nms+6*iseg);
1344 xe,ye,ze,we, nxe,nye,nze)) {
if(a_stop)
return false;}
◆ add_lines_normal_rgba()
bool tools::sg::primitive_visitor::add_lines_normal_rgba |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1349 of file primitive_visitor.
1351 size_t num = a_floatn/3;
1353 size_t nseg = num/2;
1354 if(!nseg)
return false;
1358 float xb,yb,zb,wb,xe,ye,ze,we;
1359 float nxb,nyb,nzb,nxe,nye,nze;
1360 float rb,gb,bb,ab,re,
ge,be,ae;
1365 for(
size_t iseg = 0;iseg<nseg;iseg++) {
1366 pos = (
float*)(a_xyzs+6*iseg);
1377 nos = (
float*)(a_nms+6*iseg);
1388 ros = (
float*)(a_rgbas+8*iseg);
1399 if(!
add_line_normal(xb,yb,zb,wb, nxb,nyb,nzb, rb,gb,bb,ab,
1400 xe,ye,ze,we, nxe,nye,nze, re,
ge,be,ae)) {
if(a_stop)
return false;}
◆ add_lines_rgba()
bool tools::sg::primitive_visitor::add_lines_rgba |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1264 of file primitive_visitor.
1266 size_t num = a_floatn/3;
1268 size_t nseg = num/2;
1269 if(!nseg)
return false;
1273 float xb,yb,zb,wb,xe,ye,ze,we;
1274 float rb,gb,bb,ab,re,
ge,be,ae;
1277 for(
size_t iseg = 0;iseg<nseg;iseg++) {
1278 pos = (
float*)(a_xyzs+6*iseg);
1289 ros = (
float*)(a_rgbas+8*iseg);
1300 if(!
add_line(xb,yb,zb,wb,rb,gb,bb,ab, xe,ye,ze,we,re,
ge,be,ae)) {
if(a_stop)
return false;}
◆ add_lines_xy() [1/2]
bool tools::sg::primitive_visitor::add_lines_xy |
( |
const std::vector< float > & |
a_xys, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
◆ add_lines_xy() [2/2]
bool tools::sg::primitive_visitor::add_lines_xy |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xys, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1907 of file primitive_visitor.
1911 size_t num = a_floatn/2;
1913 size_t nseg = num/2;
1914 if(!nseg)
return false;
1918 float xb,yb,zb,wb,xe,ye,ze,we;
1920 for(
size_t iseg = 0;iseg<nseg;iseg++) {
1921 pos = (
float*)(a_xys+4*iseg);
1932 if(!
add_line(xb,yb,zb,wb, xe,ye,ze,we)) {
if(a_stop)
return false;}
◆ add_one_point() [1/2]
void tools::sg::primitive_visitor::add_one_point |
( |
float |
a_x, |
|
|
float |
a_y, |
|
|
float |
a_z |
|
) |
| |
|
inline |
◆ add_one_point() [2/2]
void tools::sg::primitive_visitor::add_one_point |
( |
float |
a_x, |
|
|
float |
a_y, |
|
|
float |
a_z, |
|
|
float |
a_r, |
|
|
float |
a_g, |
|
|
float |
a_b, |
|
|
float |
a_a |
|
) |
| |
|
inline |
◆ add_point() [1/2]
virtual bool tools::sg::primitive_visitor::add_point |
( |
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
|
protectedpure virtual |
◆ add_point() [2/2]
virtual bool tools::sg::primitive_visitor::add_point |
( |
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
|
protectedpure virtual |
◆ add_point_normal() [1/2]
virtual bool tools::sg::primitive_visitor::add_point_normal |
( |
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
|
protectedpure virtual |
◆ add_point_normal() [2/2]
virtual bool tools::sg::primitive_visitor::add_point_normal |
( |
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
|
protectedpure virtual |
◆ add_points() [1/2]
bool tools::sg::primitive_visitor::add_points |
( |
const std::vector< float > & |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
◆ add_points() [2/2]
bool tools::sg::primitive_visitor::add_points |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1405 of file primitive_visitor.
1406 size_t num = a_floatn/3;
1412 for(
size_t ipt=0;ipt<num;ipt++) {
1413 pos = (
float*)(a_xyzs+3*ipt);
1419 if(!
add_point(x,y,z,w)) {
if(a_stop)
return false;}
◆ add_points_normal()
bool tools::sg::primitive_visitor::add_points_normal |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1453 of file primitive_visitor.
1454 size_t num = a_floatn/3;
1463 for(
size_t ipt=0;ipt<num;ipt++) {
1464 pos = (
float*)(a_xyzs+3*ipt);
1470 nos = (
float*)(a_nms+3*ipt);
◆ add_points_normal_rgba()
bool tools::sg::primitive_visitor::add_points_normal_rgba |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1481 of file primitive_visitor.
1482 size_t num = a_floatn/3;
1494 for(
size_t ipt=0;ipt<num;ipt++) {
1495 pos = (
float*)(a_xyzs+3*ipt);
1501 nos = (
float*)(a_nms+3*ipt);
1507 ros = (
float*)(a_rgbas+4*ipt);
1513 if(!
add_point_normal(x,y,z,w,nx,ny,nz,r,g,b,a)) {
if(a_stop)
return false;}
◆ add_points_rgba()
bool tools::sg::primitive_visitor::add_points_rgba |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 1424 of file primitive_visitor.
1425 size_t num = a_floatn/3;
1435 for(
size_t ipt=0;ipt<num;ipt++) {
1436 pos = (
float*)(a_xyzs+3*ipt);
1442 ros = (
float*)(a_rgbas+4*ipt);
1448 if(!
add_point(x,y,z,w,r,g,b,a)) {
if(a_stop)
return false;}
◆ add_points_xy() [1/2]
bool tools::sg::primitive_visitor::add_points_xy |
( |
const std::vector< float > & |
a_xys, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
◆ add_points_xy() [2/2]
bool tools::sg::primitive_visitor::add_points_xy |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xys, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
points with x,y only ///////////////////////////////
Definition at line 1636 of file primitive_visitor.
1637 size_t num = a_floatn/2;
1643 for(
size_t ipt=0;ipt<num;ipt++) {
1644 pos = (
float*)(a_xys+2*ipt);
1651 if(!
add_point(x,y,z,w)) {
if(a_stop)
return false;}
◆ add_primitive() [1/2]
bool tools::sg::primitive_visitor::add_primitive |
( |
gl::mode_t |
a_mode, |
|
|
const std::vector< float > & |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
◆ add_primitive() [2/2]
bool tools::sg::primitive_visitor::add_primitive |
( |
gl::mode_t |
a_mode, |
|
|
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
◆ add_primitive_normal()
bool tools::sg::primitive_visitor::add_primitive_normal |
( |
gl::mode_t |
a_mode, |
|
|
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
◆ add_primitive_normal_rgba()
bool tools::sg::primitive_visitor::add_primitive_normal_rgba |
( |
gl::mode_t |
a_mode, |
|
|
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
◆ add_primitive_rgba()
bool tools::sg::primitive_visitor::add_primitive_rgba |
( |
gl::mode_t |
a_mode, |
|
|
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
◆ add_primitive_xy() [1/2]
bool tools::sg::primitive_visitor::add_primitive_xy |
( |
gl::mode_t |
a_mode, |
|
|
const std::vector< float > & |
a_xys, |
|
|
bool |
a_stop = false , |
|
|
bool |
a_triangle_revert = false |
|
) |
| |
|
inline |
◆ add_primitive_xy() [2/2]
bool tools::sg::primitive_visitor::add_primitive_xy |
( |
gl::mode_t |
a_mode, |
|
|
size_t |
a_floatn, |
|
|
const float * |
a_xys, |
|
|
bool |
a_stop = false , |
|
|
bool |
a_triangle_revert = false |
|
) |
| |
|
inline |
◆ add_texture()
void tools::sg::primitive_visitor::add_texture |
( |
std::ostream & |
a_out, |
|
|
size_t |
a_xyzn, |
|
|
const float * |
a_xyzs, |
|
|
const img_byte & |
a_img, |
|
|
const float * |
a_tcs |
|
) |
| |
|
inline |
Definition at line 2047 of file primitive_visitor.
2048 if(a_img.is_empty())
return;
2050 unsigned int imw = a_img.width();
2051 unsigned int imh = a_img.height();
2052 unsigned int imn = a_img.bpp();
2053 if((imn!=3)&&(imn!=4)) {
2054 a_out <<
"tools::sg::primitive_visitor::add_texture :"
2055 <<
" not a 3 or 4 bytes per pixel image."
2061 a_out <<
"tools::sg::primitive_visitor::add_texture :"
2062 <<
" primitive has not four points."
2070 vec3f p1(a_xyzs[0],a_xyzs[ 1],a_xyzs[ 2]);
2071 vec3f p2(a_xyzs[3],a_xyzs[ 4],a_xyzs[ 5]);
2073 vec3f p4(a_xyzs[9],a_xyzs[10],a_xyzs[11]);
2078 vec2f t1(a_tcs[0],a_tcs[1]);
2079 vec2f t2(a_tcs[2],a_tcs[3]);
2080 vec2f t3(a_tcs[4],a_tcs[5]);
2081 vec2f t4(a_tcs[6],a_tcs[7]);
2085 a_out <<
"tools::sg::primitive_visitor::add_texture :"
2091 a_out <<
"tools::sg::primitive_visitor::add_texture :"
2096 std::vector<vec2f> poly;
2103 {
float r,g,b,a,tx,ty;
2106 unsigned char* pos = (
unsigned char*)a_img.buffer();
2107 for(
unsigned int row=0;row<imh;row++) {
2108 for(
unsigned int col=0;col<imw;col++) {
2109 r = (*pos)/255.0f;pos++;
2110 g = (*pos)/255.0f;pos++;
2111 b = (*pos)/255.0f;pos++;
2114 a = (*pos)/255.0f;pos++;
2117 tx = float(col)/float(imw-1);
2118 ty = float(row)/float(imh-1);
2126 p = p1+dx*t.x()/tdx.length()+dy*t.y()/tdy.length();
◆ add_triangle() [1/2]
virtual bool tools::sg::primitive_visitor::add_triangle |
( |
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
|
protectedpure virtual |
◆ add_triangle() [2/2]
virtual bool tools::sg::primitive_visitor::add_triangle |
( |
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
|
protectedpure virtual |
◆ add_triangle_fan()
bool tools::sg::primitive_visitor::add_triangle_fan |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 74 of file primitive_visitor.
75 size_t num = a_floatn/3;
76 if(num<3)
return false;
80 float p1x,p1y,p1z,w1=1;
81 float p2x,p2y,p2z,w2=1;
82 float p3x,p3y,p3z,w3=1;
84 const float* pos1 = a_xyzs+3*0;
90 const float* pos2 = a_xyzs+3*1;
96 for(
size_t index=2;index<num;index++) {
97 const float* pos = a_xyzs+3*index;
106 if(a_stop)
return false;
◆ add_triangle_fan_normal()
bool tools::sg::primitive_visitor::add_triangle_fan_normal |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 117 of file primitive_visitor.
118 size_t num = a_floatn/3;
119 if(num<3)
return false;
123 float p1x,p1y,p1z,w1=1;
124 float p2x,p2y,p2z,w2=1;
125 float p3x,p3y,p3z,w3=1;
127 const float* pos1 = a_xyzs+3*0;
133 const float* pos2 = a_xyzs+3*1;
143 const float* nos1 = a_nms+3*0;
149 const float* nos2 = a_nms+3*1;
155 for(
size_t index=2;index<num;index++) {
156 const float* pos = a_xyzs+3*index;
162 const float* nos = a_nms+3*index;
169 p2x,p2y,p2z,w2, n2x,n2y,n2z,
170 p3x,p3y,p3z,w3, n3x,n3y,n3z)) {
171 if(a_stop)
return false;
◆ add_triangle_fan_normal_rgba()
bool tools::sg::primitive_visitor::add_triangle_fan_normal_rgba |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 186 of file primitive_visitor.
187 size_t num = a_floatn/3;
188 if(num<3)
return false;
192 float p1x,p1y,p1z,w1=1;
193 float p2x,p2y,p2z,w2=1;
194 float p3x,p3y,p3z,w3=1;
200 const float* pos1 = a_xyzs+3*0;
206 const float* pos2 = a_xyzs+3*1;
216 const float* nos1 = a_nms+3*0;
222 const float* nos2 = a_nms+3*1;
228 const float* ros1 = a_rgbas+4*0;
234 const float* ros2 = a_rgbas+4*1;
240 for(
size_t index=2;index<num;index++) {
241 const float* pos = a_xyzs+3*index;
247 const float* nos = a_nms+3*index;
253 const float* ros = a_rgbas+4*index;
259 if(!
add_triangle_normal(p1x,p1y,p1z,w1, n1x,n1y,n1z, r1,b1,g1,a1,
260 p2x,p2y,p2z,w2, n2x,n2y,n2z, r2,b2,g2,a2,
261 p3x,p3y,p3z,w3, n3x,n3y,n3z, r3,b3,g3,a3)) {
262 if(a_stop)
return false;
◆ add_triangle_fan_texture_normal()
bool tools::sg::primitive_visitor::add_triangle_fan_texture_normal |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
unsigned int |
, |
|
|
const float * |
|
|
) |
| |
|
inline |
◆ add_triangle_fan_xy()
bool tools::sg::primitive_visitor::add_triangle_fan_xy |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xys, |
|
|
bool |
a_stop = false , |
|
|
bool |
a_triangle_revert = false |
|
) |
| |
|
inline |
Definition at line 1656 of file primitive_visitor.
1659 size_t num = a_floatn/2;
1660 if(num<3)
return false;
1664 float p1x,p1y,p1z,w1=1;
1665 float p2x,p2y,p2z,w2=1;
1666 float p3x,p3y,p3z,w3=1;
1668 const float* pos1 = a_xys+2*0;
1674 const float* pos2 = a_xys+2*1;
1680 for(
size_t index=2;index<num;index++) {
1681 const float* pos = a_xys+2*index;
1687 if(a_triangle_revert) {
1691 if(a_stop)
return false;
1697 if(a_stop)
return false;
◆ add_triangle_normal() [1/2]
virtual bool tools::sg::primitive_visitor::add_triangle_normal |
( |
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
|
protectedpure virtual |
◆ add_triangle_normal() [2/2]
virtual bool tools::sg::primitive_visitor::add_triangle_normal |
( |
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
|
protectedpure virtual |
◆ add_triangle_strip() [1/2]
bool tools::sg::primitive_visitor::add_triangle_strip |
( |
const std::vector< float > & |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
◆ add_triangle_strip() [2/2]
bool tools::sg::primitive_visitor::add_triangle_strip |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 282 of file primitive_visitor.
283 size_t num = a_floatn/3;
284 if(num<3)
return false;
288 float p1x,p1y,p1z,w1=1;
289 float p2x,p2y,p2z,w2=1;
290 float p3x,p3y,p3z,w3=1;
292 const float* pos1 = a_xyzs+3*0;
298 const float* pos2 = a_xyzs+3*1;
305 for(
size_t index=2;index<num;index++) {
306 const float* pos = a_xyzs+3*index;
316 if(a_stop)
return false;
322 if(a_stop)
return false;
336 flip = flip?
false:
true;
◆ add_triangle_strip_as_triangles()
bool tools::sg::primitive_visitor::add_triangle_strip_as_triangles |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms |
|
) |
| |
|
inline |
◆ add_triangle_strip_normal()
bool tools::sg::primitive_visitor::add_triangle_strip_normal |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 379 of file primitive_visitor.
380 size_t num = a_floatn/3;
381 if(num<3)
return false;
385 float p1x,p1y,p1z,w1=1;
386 float p2x,p2y,p2z,w2=1;
387 float p3x,p3y,p3z,w3=1;
389 const float* pos1 = a_xyzs+3*0;
395 const float* pos2 = a_xyzs+3*1;
405 const float* nos1 = a_nms+3*0;
411 const float* nos2 = a_nms+3*1;
418 for(
size_t index=2;index<num;index++) {
419 const float* pos = a_xyzs+3*index;
425 const float* nos = a_nms+3*index;
433 p3x,p3y,p3z,w3, n3x,n3y,n3z,
434 p2x,p2y,p2z,w2, n2x,n2y,n2z)) {
435 if(a_stop)
return false;
439 p2x,p2y,p2z,w2, n2x,n2y,n2z,
440 p3x,p3y,p3z,w3, n3x,n3y,n3z)) {
441 if(a_stop)
return false;
463 flip = flip?
false:
true;
◆ add_triangle_strip_normal_rgba()
bool tools::sg::primitive_visitor::add_triangle_strip_normal_rgba |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 468 of file primitive_visitor.
469 size_t num = a_floatn/3;
470 if(num<3)
return false;
474 float p1x,p1y,p1z,w1=1;
475 float p2x,p2y,p2z,w2=1;
476 float p3x,p3y,p3z,w3=1;
482 const float* pos1 = a_xyzs+3*0;
488 const float* pos2 = a_xyzs+3*1;
498 const float* nos1 = a_nms+3*0;
504 const float* nos2 = a_nms+3*1;
510 const float* ros1 = a_rgbas+4*0;
516 const float* ros2 = a_rgbas+4*1;
523 for(
size_t index=2;index<num;index++) {
524 const float* pos = a_xyzs+3*index;
530 const float* nos = a_nms+3*index;
536 const float* ros = a_rgbas+4*index;
543 if(!
add_triangle_normal(p1x,p1y,p1z,w1, n1x,n1y,n1z, r1,g1,b1,a1,
544 p3x,p3y,p3z,w3, n3x,n3y,n3z, r3,g3,b3,a3,
545 p2x,p2y,p2z,w2, n2x,n2y,n2z, r2,g2,b2,a2)) {
546 if(a_stop)
return false;
549 if(!
add_triangle_normal(p1x,p1y,p1z,w1, n1x,n1y,n1z, r1,g1,b1,a1,
550 p2x,p2y,p2z,w2, n2x,n2y,n2z, r2,g2,b2,a2,
551 p3x,p3y,p3z,w3, n3x,n3y,n3z, r3,g3,b3,a3)) {
552 if(a_stop)
return false;
584 flip = flip?
false:
true;
◆ add_triangle_strip_texture_normal()
bool tools::sg::primitive_visitor::add_triangle_strip_texture_normal |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
unsigned int |
, |
|
|
const float * |
|
|
) |
| |
|
inline |
◆ add_triangle_strip_xy() [1/2]
bool tools::sg::primitive_visitor::add_triangle_strip_xy |
( |
const std::vector< float > & |
a_xys, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
◆ add_triangle_strip_xy() [2/2]
bool tools::sg::primitive_visitor::add_triangle_strip_xy |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xys, |
|
|
bool |
a_stop = false , |
|
|
bool |
a_triangle_revert = false |
|
) |
| |
|
inline |
Definition at line 1710 of file primitive_visitor.
1713 size_t num = a_floatn/2;
1714 if(num<3)
return false;
1718 float p1x,p1y,p1z,w1=1;
1719 float p2x,p2y,p2z,w2=1;
1720 float p3x,p3y,p3z,w3=1;
1722 const float* pos1 = a_xys+2*0;
1728 const float* pos2 = a_xys+2*1;
1735 for(
size_t index=2;index<num;index++) {
1736 const float* pos = a_xys+2*index;
1742 if(a_triangle_revert) {
1748 if(a_stop)
return false;
1754 if(a_stop)
return false;
1764 if(a_stop)
return false;
1770 if(a_stop)
return false;
1786 flip = flip?
false:
true;
◆ add_triangles()
bool tools::sg::primitive_visitor::add_triangles |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 341 of file primitive_visitor.
342 size_t num = a_floatn/3;
343 if(num<3)
return false;
347 float p1x,p1y,p1z,w1=1;
348 float p2x,p2y,p2z,w2=1;
349 float p3x,p3y,p3z,w3=1;
351 for(
size_t index=0;index<num;index+=3) {
353 const float* pos = a_xyzs+3*index;
373 if(a_stop)
return false;
◆ add_triangles_normal()
bool tools::sg::primitive_visitor::add_triangles_normal |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 589 of file primitive_visitor.
590 size_t num = a_floatn/3;
591 if(num<3)
return false;
595 float p1x,p1y,p1z,w1=1;
596 float p2x,p2y,p2z,w2=1;
597 float p3x,p3y,p3z,w3=1;
603 for(
size_t index=0;index<num;index+=3) {
605 const float* pos = a_xyzs+3*index;
622 const float* nos = a_nms+3*index;
640 p2x,p2y,p2z,w2, n2x,n2y,n2z,
641 p3x,p3y,p3z,w3, n3x,n3y,n3z)) {
642 if(a_stop)
return false;
◆ add_triangles_normal_rgba()
bool tools::sg::primitive_visitor::add_triangles_normal_rgba |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_nms, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 707 of file primitive_visitor.
708 size_t num = a_floatn/3;
709 if(num<3)
return false;
713 float p1x,p1y,p1z,w1=1;
714 float p2x,p2y,p2z,w2=1;
715 float p3x,p3y,p3z,w3=1;
725 for(
size_t index=0;index<num;index+=3) {
727 const float* pos = a_xyzs+3*index;
744 const float* nos = a_nms+3*index;
761 const float* ros = a_rgbas+4*index;
778 if(!
add_triangle_normal(p1x,p1y,p1z,w1, n1x,n1y,n1z, r1,g1,b1,a1,
779 p2x,p2y,p2z,w2, n2x,n2y,n2z, r2,g2,b2,a2,
780 p3x,p3y,p3z,w3, n3x,n3y,n3z, r3,g3,b3,a3)) {
781 if(a_stop)
return false;
◆ add_triangles_rgba()
bool tools::sg::primitive_visitor::add_triangles_rgba |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xyzs, |
|
|
const float * |
a_rgbas, |
|
|
bool |
a_stop = false |
|
) |
| |
|
inline |
Definition at line 648 of file primitive_visitor.
649 size_t num = a_floatn/3;
650 if(num<3)
return false;
654 float p1x,p1y,p1z,w1=1;
655 float p2x,p2y,p2z,w2=1;
656 float p3x,p3y,p3z,w3=1;
662 for(
size_t index=0;index<num;index+=3) {
664 const float* pos = a_xyzs+3*index;
681 const float* ros = a_rgbas+4*index;
699 p2x,p2y,p2z,w2,r2,g2,b2,a2,
700 p3x,p3y,p3z,w3,r3,g3,b3,a3)) {
701 if(a_stop)
return false;
◆ add_triangles_xy()
bool tools::sg::primitive_visitor::add_triangles_xy |
( |
size_t |
a_floatn, |
|
|
const float * |
a_xys, |
|
|
bool |
a_stop = false , |
|
|
bool |
a_triangle_revert = false |
|
) |
| |
|
inline |
Definition at line 1791 of file primitive_visitor.
1792 size_t num = a_floatn/2;
1793 if(num<3)
return false;
1797 float p1x,p1y,p1z,w1=1;
1798 float p2x,p2y,p2z,w2=1;
1799 float p3x,p3y,p3z,w3=1;
1801 for(
size_t index=0;index<num;index+=3) {
1803 const float* pos1 = a_xys+2*index;
1809 const float* pos2 = a_xys+2*(index+1);
1815 const float* pos3 = a_xys+2*(index+2);
1821 if(a_triangle_revert) {
1825 if(a_stop)
return false;
1831 if(a_stop)
return false;
◆ operator=()
◆ project()
virtual bool tools::sg::primitive_visitor::project |
( |
float & |
a_x, |
|
|
float & |
a_y, |
|
|
float & |
a_z, |
|
|
float & |
a_w |
|
) |
| |
|
protectedpure virtual |
◆ project_normal()
virtual bool tools::sg::primitive_visitor::project_normal |
( |
float & |
a_x, |
|
|
float & |
a_y, |
|
|
float & |
a_z |
|
) |
| |
|
protectedpure virtual |
◆ m_mode
The documentation for this class was generated from the following file: