ExtruderCone.h
Go to the documentation of this file.
1 /*
2 * ==========================================================================
3 * This file is part of the implementation of
4 *
5 * <FrameFab: Robotic Fabrication of Frame Shapes>
6 * Yijiang Huang, Juyong Zhang, Xin Hu, Guoxian Song, Zhongyuan Liu, Lei Yu, Ligang Liu
7 * In ACM Transactions on Graphics (Proc. SIGGRAPH Asia 2016)
8 ----------------------------------------------------------------------------
9 * class: ExtruderCone
10 *
11 * Description: This class maintains extruder bounding cone info
12 * and OpenGL rendering interfaces.
13 *
14 * Version: 2.0
15 * Created: Oct/20/2015
16 * Updated: Aug/24/2016
17 *
18 * Author: Xin Hu, Yijiang Huang, Guoxian Song
19 * Company: GCL@USTC
20 * Citation: This file use some geometric API and objects from
21 * Title: Geometric Tools Engine
22 * a library of source code for computing in the fields of
23 * mathematics, graphics, image analysis, and physics.
24 * Code Version: 3.2.6
25 * Availability: http://www.geometrictools.com/index.html
26 ----------------------------------------------------------------------------
27 * Copyright (C) 2016 Yijiang Huang, Xin Hu, Guoxian Song, Juyong Zhang
28 * and Ligang Liu.
29 *
30 * FrameFab is free software: you can redistribute it and/or modify
31 * it under the terms of the GNU General Public License as published by
32 * the Free Software Foundation, either version 3 of the License, or
33 * (at your option) any later version.
34 *
35 * FrameFab is distributed in the hope that it will be useful,
36 * but WITHOUT ANY WARRANTY; without even the implied warranty of
37 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 * GNU General Public License for more details.
39 *
40 * You should have received a copy of the GNU General Public License
41 * along with FrameFab. If not, see <http://www.gnu.org/licenses/>.
42 * ==========================================================================
43 */
44 
45 #pragma once
49 
50 using namespace std;
51 using namespace Geometry;
52 
54 {
55 public:
56  ExtruderCone();
58  double height,
59  point base_point,
60  Vec3f normal,
61  double angle
62  );
63  ~ExtruderCone();
64 
65 public:
66  /* Data I/O */
67  double Height() { return height_; }
68  double Angle() { return angle_; }
69  double WaveAngle() { return wave_angle_; }
70  double ToolLenth() { return tool_lenth_; }
71  double Radii() { return radii_; }
72  double CyclinderLenth(){ return cyclinder_height_; }
73  point BasePoint() { return base_point_; }
74  Vec3f Normal() { return normal_; }
75 
76 
77  /*top cylidner*/
78  double TopCenter(){ return top_cylin_center_lenth_; }
79  double TopLenth(){ return top_cylin_lenth_; }
80  double TopRadii(){ return top_cylin_radii_; }
81  /* Generate Extruder Cone */
82  void GeneCone();
83 
84  /* Debug Screenplay Function */
85  void Test();
86 
87  /* Geometric transformation, for rendering purpose */
88  void RotateTri(Triangle temp);
89  point Multi(point s);
90  void Rotation(double angle, point start, point end);
91  void Rotation(GeoV3 normal, point start, point end);
92 
93  /* OpenGL Rendering Interface */
94  void Render(WireFrame* ptr_frame, double alpha);
95 
96 private:
97  /* Extruder Property Data */
98  double angle_;
99  double height_;
100  double tool_lenth_;
101  double radii_;
103 
104  double wave_angle_;
105  vector<Triangle> side_;
108 
109  /* Extruder Render Data */
110  int divide_; /* Traingle division for cone */
111  vector<Triangle> side_end_; /* Triangle Approx for the cone */
112  vector<point> top_; /* Ploygon represent top covering */
113 
114  /* Transformation for Rendering */
115  float rotate_[4][4];
116  point start_,end_;
117 
118  //Top_Cylinder
122 };
double wave_angle_
Definition: ExtruderCone.h:104
GLfloat GLfloat GLfloat alpha
point BasePoint()
Definition: ExtruderCone.h:73
double top_cylin_center_lenth_
Definition: ExtruderCone.h:119
GLuint start
GLfloat angle
point base_point_
Definition: ExtruderCone.h:106
vector< Triangle > side_end_
Definition: ExtruderCone.h:111
double top_cylin_radii_
Definition: ExtruderCone.h:121
double Radii()
Definition: ExtruderCone.h:71
GLuint GLuint end
double WaveAngle()
Definition: ExtruderCone.h:69
double cyclinder_height_
Definition: ExtruderCone.h:102
double angle_
Definition: ExtruderCone.h:98
GLint GLsizei GLsizei height
double height_
Definition: ExtruderCone.h:99
Vec3f Normal()
Definition: ExtruderCone.h:74
GLdouble s
double TopCenter()
Definition: ExtruderCone.h:78
double TopRadii()
Definition: ExtruderCone.h:80
double TopLenth()
Definition: ExtruderCone.h:79
double ToolLenth()
Definition: ExtruderCone.h:70
double Angle()
Definition: ExtruderCone.h:68
double top_cylin_lenth_
Definition: ExtruderCone.h:120
vector< point > top_
Definition: ExtruderCone.h:112
double Height()
Definition: ExtruderCone.h:67
vector< Triangle > side_
Definition: ExtruderCone.h:105
double CyclinderLenth()
Definition: ExtruderCone.h:72
double tool_lenth_
Definition: ExtruderCone.h:100


choreo_task_sequence_planner
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:03:14