本文整理汇总了C++中base::Matrix4D::move方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix4D::move方法的具体用法?C++ Matrix4D::move怎么用?C++ Matrix4D::move使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类base::Matrix4D
的用法示例。
在下文中一共展示了Matrix4D::move方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnReadInsert
void DraftDxfRead::OnReadInsert(const double* point, const double* scale, const char* name, double rotation)
{
std::cout << "Inserting block " << name << " rotation " << rotation << " pos " << point[0] << "," << point[1] << "," << point[2] << std::endl;
for(std::map<std::string,std::vector<Part::TopoShape*> > ::const_iterator i = layers.begin(); i != layers.end(); ++i) {
std::string k = i->first;
std::string prefix = "BLOCKS ";
prefix += name;
prefix += " ";
if(k.substr(0, prefix.size()) == prefix) {
BRep_Builder builder;
TopoDS_Compound comp;
builder.MakeCompound(comp);
std::vector<Part::TopoShape*> v = i->second;
for(std::vector<Part::TopoShape*>::const_iterator j = v.begin(); j != v.end(); ++j) {
const TopoDS_Shape& sh = (*j)->_Shape;
if (!sh.IsNull())
builder.Add(comp, sh);
}
if (!comp.IsNull()) {
Part::TopoShape* pcomp = new Part::TopoShape(comp);
Base::Matrix4D mat;
mat.scale(scale[0],scale[1],scale[2]);
mat.rotZ(rotation);
mat.move(point[0],point[1],point[2]);
pcomp->transformShape(mat,true);
AddObject(pcomp);
}
}
}
}
示例2: PlaceBox
// Create a Box and Place it a coords (x,y,z)
MeshObjectRef PlaceBox(float x, float y, float z)
{
MeshObjectRef mesh = new Mesh::MeshObject(*globalBox);
Base::Matrix4D m;
m.move(x,y,z);
mesh->getKernel().Transform(m);
return mesh;
}
示例3: translate
PyObject* MeshPy::translate(PyObject *args)
{
float x,y,z;
if (!PyArg_ParseTuple(args, "fff",&x,&y,&z))
return NULL;
PY_TRY {
Base::Matrix4D m;
m.move(x,y,z);
getMeshObjectPtr()->getKernel().Transform(m);
} PY_CATCH;
Py_Return;
}
示例4: applyTranslation
void ComplexGeoData::applyTranslation(const Base::Vector3d& mov)
{
Base::Matrix4D mat;
mat.move(mov);
setTransform(mat * getTransform());
}