Small fixes to transformations

This commit is contained in:
Thomas Krijnen
2017-06-06 17:12:46 +02:00
parent 8baf6197d5
commit 9ae55ab303
2 changed files with 4 additions and 9 deletions
@@ -34,17 +34,13 @@ namespace IfcGeom {
operator const cgal_placement_t& () { return trsf_; }
virtual double Value(int i, int j) const {
// TODO: Check
// std::cout << "Getting CgalPlacement with i = " << i << " and j = " << j << std::endl;
return CGAL::to_double(trsf_.cartesian(i-1, j-1));
return CGAL::to_double(trsf_.cartesian(i-1, j-1));
}
virtual void Multiply(const ConversionResultPlacement* other) {
// TODO: Check
trsf_ = ((CgalPlacement *)other)->trsf_ * trsf_;
trsf_ = trsf_ * ((CgalPlacement *)other)->trsf_;
}
virtual void PreMultiply(const ConversionResultPlacement* other) {
// TODO: Check
trsf_ = trsf_ * ((CgalPlacement *)other)->trsf_;
trsf_ = ((CgalPlacement *)other)->trsf_ * trsf_;
}
virtual ConversionResultPlacement* clone() const {
return new CgalPlacement(trsf_);
@@ -236,10 +236,9 @@ bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcCartesianTransformationOpe
return true;
}
bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcCartesianTransformationOperator2DnonUniform* l, cgal_placement_t& gtrsf) {
bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcCartesianTransformationOperator2DnonUniform* l, cgal_placement_t& trsf) {
// IN_CACHE(IfcCartesianTransformationOperator2DnonUniform,l,cgal_placement_t,gtrsf)
cgal_placement_t trsf;
cgal_point_t origin;
cgal_direction_t axis1 (1.,0.,0.);
cgal_direction_t axis2 (0.,1.,0.);