Go to the documentation of this file.
20 a_v0.
x(),a_v0.
y(),a_v0.
z(),
21 a_p1.
x(),a_p1.
y(),a_p1.
z(),
22 a_v1.
x(),a_v1.
y(),a_v1.
z());
24 cubic(
const T& a_p0_x,
const T& a_p0_y,
const T& a_p0_z,
25 const T& a_v0_x,
const T& a_v0_y,
const T& a_v0_z,
26 const T& a_p1_x,
const T& a_p1_y,
const T& a_p1_z,
27 const T& a_v1_x,
const T& a_v1_y,
const T& a_v1_z){
31 a_v1_x,a_v1_y,a_v1_z);
53 T s = T(a_index)/T(a_num-1);
58 void get_point(
unsigned int a_index,
unsigned int a_num,T& a_x,T& a_y,T& a_z){
61 T s = T(a_index)/T(a_num-1);
69 void initialize(
const T& a_p0_x,
const T& a_p0_y,
const T& a_p0_z,
70 const T& a_v0_x,
const T& a_v0_y,
const T& a_v0_z,
71 const T& a_p1_x,
const T& a_p1_y,
const T& a_p1_z,
72 const T& a_v1_x,
const T& a_v1_y,
const T& a_v1_z){
91 T a_x = -2*a_p1_x + a_v0_x + 2*a_p0_x + a_v1_x;
92 T a_y = -2*a_p1_y + a_v0_y + 2*a_p0_y + a_v1_y;
93 T a_z = -2*a_p1_z + a_v0_z + 2*a_p0_z + a_v1_z;
94 m_a.set_value(a_x,a_y,a_z);
96 T b_x = 3*(a_p1_x - a_v0_x - a_p0_x) - (a_v1_x - a_v0_x);
97 T b_y = 3*(a_p1_y - a_v0_y - a_p0_y) - (a_v1_y - a_v0_y);
98 T b_z = 3*(a_p1_z - a_v0_z - a_p0_z) - (a_v1_z - a_v0_z);
99 m_b.set_value(b_x,b_y,b_z);
101 m_c.set_value(a_v0_x,a_v0_y,a_v0_z);
102 m_d.set_value(a_p0_x,a_p0_y,a_p0_z);
119 template <
class VEC3>
122 typedef typename VEC3::elem_t
T;
128 clip& operator=(
const clip&){
return *
this;}
151 for(
size_t i = 0; i < n; i++) {
158 if (d0 >= 0.0f && d1 < 0.0f) {
162 T dot = dir.dot(planeN);
163 VEC3 newvertex = v0 - dir * (d0/dot);
165 }
else if (d0 < 0.0f && d1 >= 0.0f) {
169 T dot = dir.dot(planeN);
170 VEC3 newvertex = v0 - dir * (d0/dot);
173 }
else if (d0 >= 0.0f && d1 >= 0.0f) {