本文整理汇总了C++中Metric::get_m32方法的典型用法代码示例。如果您正苦于以下问题:C++ Metric::get_m32方法的具体用法?C++ Metric::get_m32怎么用?C++ Metric::get_m32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Metric
的用法示例。
在下文中一共展示了Metric::get_m32方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: create_spawns
void Filler::create_spawns(GEntity* ge,MElementOctree* octree,Node* node,std::vector<Node*>& spawns){
double x,y,z;
double x1,y1,z1;
double x2,y2,z2;
double x3,y3,z3;
double x4,y4,z4;
double x5,y5,z5;
double x6,y6,z6;
double h;
double h1,h2,h3,h4,h5,h6;
Metric m;
SPoint3 point;
point = node->get_point();
x = point.x();
y = point.y();
z = point.z();
h = node->get_size();
m = node->get_metric();
h1 = improvement(ge,octree,point,h,SVector3(m.get_m11(),m.get_m21(),m.get_m31()));
x1 = x + h1*m.get_m11();
y1 = y + h1*m.get_m21();
z1 = z + h1*m.get_m31();
h2 = improvement(ge,octree,point,h,SVector3(-m.get_m11(),-m.get_m21(),-m.get_m31()));
x2 = x - h2*m.get_m11();
y2 = y - h2*m.get_m21();
z2 = z - h2*m.get_m31();
h3 = improvement(ge,octree,point,h,SVector3(m.get_m12(),m.get_m22(),m.get_m32()));
x3 = x + h3*m.get_m12();
y3 = y + h3*m.get_m22();
z3 = z + h3*m.get_m32();
h4 = improvement(ge,octree,point,h,SVector3(-m.get_m12(),-m.get_m22(),-m.get_m32()));
x4 = x - h4*m.get_m12();
y4 = y - h4*m.get_m22();
z4 = z - h4*m.get_m32();
h5 = improvement(ge,octree,point,h,SVector3(m.get_m13(),m.get_m23(),m.get_m33()));
x5 = x + h5*m.get_m13();
y5 = y + h5*m.get_m23();
z5 = z + h5*m.get_m33();
h6 = improvement(ge,octree,point,h,SVector3(-m.get_m13(),-m.get_m23(),-m.get_m33()));
x6 = x - h6*m.get_m13();
y6 = y - h6*m.get_m23();
z6 = z - h6*m.get_m33();
*spawns[0] = Node(SPoint3(x1,y1,z1));
*spawns[1] = Node(SPoint3(x2,y2,z2));
*spawns[2] = Node(SPoint3(x3,y3,z3));
*spawns[3] = Node(SPoint3(x4,y4,z4));
*spawns[4] = Node(SPoint3(x5,y5,z5));
*spawns[5] = Node(SPoint3(x6,y6,z6));
}
示例2: print_node
void Filler::print_node(Node* node,std::ofstream& file){
double x,y,z;
double x1,y1,z1;
double x2,y2,z2;
double x3,y3,z3;
double x4,y4,z4;
double x5,y5,z5;
double x6,y6,z6;
double h;
Metric m;
SPoint3 point;
point = node->get_point();
x = point.x();
y = point.y();
z = point.z();
h = node->get_size();
m = node->get_metric();
x1 = x + k1*h*m.get_m11();
y1 = y + k1*h*m.get_m21();
z1 = z + k1*h*m.get_m31();
x2 = x - k1*h*m.get_m11();
y2 = y - k1*h*m.get_m21();
z2 = z - k1*h*m.get_m31();
x3 = x + k1*h*m.get_m12();
y3 = y + k1*h*m.get_m22();
z3 = z + k1*h*m.get_m32();
x4 = x - k1*h*m.get_m12();
y4 = y - k1*h*m.get_m22();
z4 = z - k1*h*m.get_m32();
x5 = x + k1*h*m.get_m13();
y5 = y + k1*h*m.get_m23();
z5 = z + k1*h*m.get_m33();
x6 = x - k1*h*m.get_m13();
y6 = y - k1*h*m.get_m23();
z6 = z - k1*h*m.get_m33();
print_segment(SPoint3(x,y,z),SPoint3(x1,y1,z1),file);
print_segment(SPoint3(x,y,z),SPoint3(x2,y2,z2),file);
print_segment(SPoint3(x,y,z),SPoint3(x3,y3,z3),file);
print_segment(SPoint3(x,y,z),SPoint3(x4,y4,z4),file);
print_segment(SPoint3(x,y,z),SPoint3(x5,y5,z5),file);
print_segment(SPoint3(x,y,z),SPoint3(x6,y6,z6),file);
}
示例3: infinity_distance
double infinity_distance(SPoint3 p1,SPoint3 p2,Metric m){
double distance;
double x1,y1,z1;
double x2,y2,z2;
double a,b,c,d,e,f,g,h,i;
a = m.get_m11();
b = m.get_m21();
c = m.get_m31();
d = m.get_m12();
e = m.get_m22();
f = m.get_m32();
g = m.get_m13();
h = m.get_m23();
i = m.get_m33();
x1 = a*p1.x() + b*p1.y() + c*p1.z();
y1 = d*p1.x() + e*p1.y() + f*p1.z();
z1 = g*p1.x() + h*p1.y() + i*p1.z();
x2 = a*p2.x() + b*p2.y() + c*p2.z();
y2 = d*p2.x() + e*p2.y() + f*p2.z();
z2 = g*p2.x() + h*p2.y() + i*p2.z();
distance = std::max(std::max(fabs(x2-x1),fabs(y2-y1)),fabs(z2-z1));
return distance;
}