Main Page
Namespaces
Classes
Files
File List
File Members
include
choreo_task_sequence_planner
utils
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
46
#include "
choreo_task_sequence_planner/utils/GCommon.h
"
47
#include "
choreo_task_sequence_planner/utils/WireFrame.h
"
48
#include "
choreo_task_sequence_planner/utils/Triangle.h
"
49
50
using namespace
std
;
51
using namespace
Geometry
;
52
53
class
ExtruderCone
54
{
55
public
:
56
ExtruderCone
();
57
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_
;
102
double
cyclinder_height_
;
103
104
double
wave_angle_
;
105
vector<Triangle>
side_
;
106
point
base_point_
;
107
Vec3f
normal_
;
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
119
double
top_cylin_center_lenth_
;
120
double
top_cylin_lenth_
;
121
double
top_cylin_radii_
;
122
};
ExtruderCone::wave_angle_
double wave_angle_
Definition:
ExtruderCone.h:104
ExtruderCone::divide_
int divide_
Definition:
ExtruderCone.h:110
alpha
GLfloat GLfloat GLfloat alpha
ExtruderCone::BasePoint
point BasePoint()
Definition:
ExtruderCone.h:73
ExtruderCone::top_cylin_center_lenth_
double top_cylin_center_lenth_
Definition:
ExtruderCone.h:119
start
GLuint start
ExtruderCone::normal_
Vec3f normal_
Definition:
ExtruderCone.h:107
GCommon.h
angle
GLfloat angle
ExtruderCone::base_point_
point base_point_
Definition:
ExtruderCone.h:106
std
ExtruderCone::radii_
double radii_
Definition:
ExtruderCone.h:101
ExtruderCone::start_
point start_
Definition:
ExtruderCone.h:116
ExtruderCone::side_end_
vector< Triangle > side_end_
Definition:
ExtruderCone.h:111
ExtruderCone::top_cylin_radii_
double top_cylin_radii_
Definition:
ExtruderCone.h:121
ExtruderCone::Radii
double Radii()
Definition:
ExtruderCone.h:71
Triangle.h
Geometry::Vector3d
Definition:
Geometry.h:64
end
GLuint GLuint end
WireFrame
Definition:
WireFrame.h:188
ExtruderCone::WaveAngle
double WaveAngle()
Definition:
ExtruderCone.h:69
ExtruderCone::cyclinder_height_
double cyclinder_height_
Definition:
ExtruderCone.h:102
Triangle
Definition:
Triangle.h:46
ExtruderCone::angle_
double angle_
Definition:
ExtruderCone.h:98
height
GLint GLsizei GLsizei height
ExtruderCone::height_
double height_
Definition:
ExtruderCone.h:99
ExtruderCone::Normal
Vec3f Normal()
Definition:
ExtruderCone.h:74
s
GLdouble s
ExtruderCone::TopCenter
double TopCenter()
Definition:
ExtruderCone.h:78
ExtruderCone::TopRadii
double TopRadii()
Definition:
ExtruderCone.h:80
ExtruderCone::TopLenth
double TopLenth()
Definition:
ExtruderCone.h:79
ExtruderCone::ToolLenth
double ToolLenth()
Definition:
ExtruderCone.h:70
WireFrame.h
ExtruderCone::Angle
double Angle()
Definition:
ExtruderCone.h:68
ExtruderCone::top_cylin_lenth_
double top_cylin_lenth_
Definition:
ExtruderCone.h:120
ExtruderCone::top_
vector< point > top_
Definition:
ExtruderCone.h:112
trimesh::Vec
Definition:
Vec.h:104
ExtruderCone
Definition:
ExtruderCone.h:53
ExtruderCone::Height
double Height()
Definition:
ExtruderCone.h:67
ExtruderCone::side_
vector< Triangle > side_
Definition:
ExtruderCone.h:105
Geometry
Definition:
Geometry.h:52
ExtruderCone::CyclinderLenth
double CyclinderLenth()
Definition:
ExtruderCone.h:72
ExtruderCone::tool_lenth_
double tool_lenth_
Definition:
ExtruderCone.h:100
choreo_task_sequence_planner
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:03:14