本文整理汇总了C++中PointSetHandle::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ PointSetHandle::push_back方法的具体用法?C++ PointSetHandle::push_back怎么用?C++ PointSetHandle::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointSetHandle
的用法示例。
在下文中一共展示了PointSetHandle::push_back方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: p
QuadToy() {
handles.push_back(&psh);
for(unsigned i = 0; i < 100; i++) {
Geom::Point p(uniform() * 400, uniform() * 400);
psh.push_back(p);
psh.push_back(p + Geom::Point(uniform() * 40, uniform() * 40));
}
}
示例2: SBZeros
SBZeros () {
for(unsigned i = 0; i < SIZE; i++)
pB1.push_back(150+uniform()*300,150+uniform()*300);
for(unsigned i = 0; i < SIZE; i++)
pB2.push_back(150+uniform()*300,150+uniform()*300);
handles.push_back(&pB1);
handles.push_back(&pB2);
}
示例3: LengthTester
LengthTester(){
for(int i = 0; i < SIZE; i++) {
b1_handle.push_back(150+uniform()*300,150+uniform()*300);
b2_handle.push_back(150+uniform()*300,150+uniform()*300);
}
b1_handle.pts[0] = Geom::Point(150,150);
b1_handle.pts[1] = Geom::Point(150,150);
b1_handle.pts[2] = Geom::Point(150,450);
b1_handle.pts[3] = Geom::Point(450,150);
handles.push_back(&b1_handle);
handles.push_back(&b2_handle);
}
示例4: ConvolutionToy
ConvolutionToy(){
for(int i = 0; i < SIZE; i++) {
b1_handle.push_back(150+uniform()*300,150+uniform()*300);
b2_handle.push_back(150+uniform()*300,150+uniform()*300);
}
handles.push_back(&b1_handle);
handles.push_back(&b2_handle);
adjuster.pos = Geom::Point(400,100+300*uniform());
handles.push_back(&adjuster);
}
示例5: NormalBundleToy
NormalBundleToy(){
if(handles.empty()) {
handles.push_back(&B_handle);
handles.push_back(&P_handle);
handles.push_back(&O_handle);
for(unsigned i = 0; i < 4; i++)
B_handle.push_back(200+50*i,400);
for(unsigned i = 0; i < 4; i++)
P_handle.push_back(100+uniform()*400,
150+uniform()*100);
O_handle.pos = Geom::Point(200,200);
}
}
示例6: PathAlongPathToy
PathAlongPathToy() : origin_handle(150,150) {
if(handles.empty()) {
handles.push_back(&skel_handles);
handles.push_back(&pat_handles);
for(int i = 0; i < 8; i++)
skel_handles.push_back(200+50*i,400);
for(int i = 0; i < 4; i++)
pat_handles.push_back(100+uniform()*400,
150+uniform()*100);
handles.push_back(&origin_handle);
}
}
示例7: first_time
void first_time(int argc, char** argv) {
const char *path_name="sanitize_examples.svgd";
if(argc > 1)
path_name = argv[1];
paths = read_svgd(path_name);
//es = edges(paths, crossings_among(paths));
handles.push_back(&angh); handles.push_back(&pathix);
angh.push_back(100, 100);
angh.push_back(80, 100);
angh.push_back(100, 80);
pathix.push_back(30, 200);
}
示例8: RandomToy
RandomToy(){
for(int i = 0; i < SIZE; i++) {
b1_handle.push_back(150+uniform()*300,150+uniform()*300);
b2_handle.push_back(150+uniform()*300,150+uniform()*300);
}
b1_handle.pts[0] = Geom::Point(400,300);
b1_handle.pts[1] = Geom::Point(400,400);
b1_handle.pts[2] = Geom::Point(100,400);
b1_handle.pts[3] = Geom::Point(100,300);
b2_handle.pts[0] = Geom::Point(100,300);
b2_handle.pts[1] = Geom::Point(100,200);
b2_handle.pts[2] = Geom::Point(400,200);
b2_handle.pts[3] = Geom::Point(400,300);
handles.push_back(&b1_handle);
handles.push_back(&b2_handle);
for(unsigned i = 0; i < NB_SLIDER; i++) {
adjuster[i].pos = Geom::Point(30+i*20,250);
handles.push_back(&(adjuster[i]));
}
}
示例9: BezierFitTester
BezierFitTester(){
for(int i = 0; i < SIZE; i++) {
b_handle.push_back(150+uniform()*300,150+uniform()*300);
}
b_handle.pts[0] = Geom::Point(70,250);
b_handle.pts[1] = Geom::Point(200,150);
b_handle.pts[2] = Geom::Point(200,350);
b_handle.pts[3] = Geom::Point(350,200);
handles.push_back(&b_handle);
// M 70 250 C 860 766 200 350 350 200
// M 70 250 C 906 833 200 350 350 200
// M 70 250 C 800 738 200 350 350 200
sliders.push_back(Slider(2, 50, 1, 25, "number of points"));
handles.push_back(&(sliders[0]));
}
示例10: PortionTester
PortionTester(){
toggles.push_back(Toggle("Path", true));
toggles[0].bounds = Rect(Point(10,100), Point(100, 130));
toggles.push_back(Toggle("Curve", true));
toggles[1].bounds = Rect(Point(10,130), Point(100, 160));
if(handles.empty()) {
handles.push_back(&curve_handle);
handles.push_back(&sample_point1);
handles.push_back(&sample_point2);
for(unsigned i = 0; i < 4; i++)
curve_handle.push_back(150+uniform()*300,150+uniform()*300);
sample_point1.pos = Geom::Point(250,300);
sample_point2.pos = Geom::Point(350,300);
}
}
示例11: Rect
Conic5() {
handles.push_back(&path_handles);
handles.push_back(&rh);
rh.pos = Rect(Point(100,100), Point(200,200));
rh.show_center_handle = true;
handles.push_back(&oncurve);
for(int j = 0; j < 3; j++){
path_handles.push_back(uniform()*400, 100+ uniform()*300);
}
oncurve.pos = ((path_handles.pts[0]+path_handles.pts[1]+path_handles.pts[2])/3);
handles.push_back(&cutting_plane);
for(int j = 0; j < 2; j++){
cutting_plane.push_back(uniform()*400, 100+ uniform()*300);
}
sliders.push_back(Slider(0.0, 5.0, 0, 0.0, "a"));
sliders.push_back(Slider(0.0, 5.0, 0, 0.0, "b"));
sliders.push_back(Slider(0.0, 5.0, 0, 0.0, "c"));
handles.push_back(&(sliders[0]));
handles.push_back(&(sliders[1]));
handles.push_back(&(sliders[2]));
sliders[0].geometry(Point(50, 20), 250);
sliders[1].geometry(Point(50, 50), 250);
sliders[2].geometry(Point(50, 80), 250);
}
示例12: ConvexTest
ConvexTest () {
handles.push_back(&psh[0]);
if(ch2_tests)
handles.push_back(&psh[1]);
if(0) {
handles.push_back(&direction_handle);
direction_handle.pos = Point(10,10);
}
for(unsigned i = 0; i < 5; i++){
psh[0].push_back(uniform()*uniform()*400+200,
uniform()*uniform()*400+200);
if(ch2_tests)
psh[1].push_back(uniform()*uniform()*400+200,
uniform()*uniform()*400+200);
}
if(0) {
handles.push_back(&test_window);
test_window.push_back(Point(100,100));
test_window.push_back(Point(200,200));
}
}
示例13: SimpleRect
SimpleRect (unsigned no_of_handles) {
handles.push_back(&psh);
for(unsigned i = 0; i < no_of_handles; i++)
psh.push_back( 200 + ( i * 10 ), 300 + ( i * 10 ) );
}
示例14: CircleIntersect
CircleIntersect(){
eh.push_back(300,300); eh.push_back(450,150); eh.push_back(250, 350);
lh.push_back(280, 50); lh.push_back(320,550);
handles.push_back(&eh);
handles.push_back(&lh);
}
示例15: uniform
SelfIntersect () {
handles.push_back(&psh);
for(unsigned i = 0; i < bez_ord; i++)
psh.push_back(uniform()*400, uniform()*400);
}