mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Small fixes to transformations
This commit is contained in:
@@ -34,17 +34,13 @@ namespace IfcGeom {
|
|||||||
operator const cgal_placement_t& () { return trsf_; }
|
operator const cgal_placement_t& () { return trsf_; }
|
||||||
|
|
||||||
virtual double Value(int i, int j) const {
|
virtual double Value(int i, int j) const {
|
||||||
// TODO: Check
|
return CGAL::to_double(trsf_.cartesian(i-1, j-1));
|
||||||
// std::cout << "Getting CgalPlacement with i = " << i << " and j = " << j << std::endl;
|
|
||||||
return CGAL::to_double(trsf_.cartesian(i-1, j-1));
|
|
||||||
}
|
}
|
||||||
virtual void Multiply(const ConversionResultPlacement* other) {
|
virtual void Multiply(const ConversionResultPlacement* other) {
|
||||||
// TODO: Check
|
trsf_ = trsf_ * ((CgalPlacement *)other)->trsf_;
|
||||||
trsf_ = ((CgalPlacement *)other)->trsf_ * trsf_;
|
|
||||||
}
|
}
|
||||||
virtual void PreMultiply(const ConversionResultPlacement* other) {
|
virtual void PreMultiply(const ConversionResultPlacement* other) {
|
||||||
// TODO: Check
|
trsf_ = ((CgalPlacement *)other)->trsf_ * trsf_;
|
||||||
trsf_ = trsf_ * ((CgalPlacement *)other)->trsf_;
|
|
||||||
}
|
}
|
||||||
virtual ConversionResultPlacement* clone() const {
|
virtual ConversionResultPlacement* clone() const {
|
||||||
return new CgalPlacement(trsf_);
|
return new CgalPlacement(trsf_);
|
||||||
|
|||||||
@@ -236,10 +236,9 @@ bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcCartesianTransformationOpe
|
|||||||
return true;
|
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)
|
// IN_CACHE(IfcCartesianTransformationOperator2DnonUniform,l,cgal_placement_t,gtrsf)
|
||||||
|
|
||||||
cgal_placement_t trsf;
|
|
||||||
cgal_point_t origin;
|
cgal_point_t origin;
|
||||||
cgal_direction_t axis1 (1.,0.,0.);
|
cgal_direction_t axis1 (1.,0.,0.);
|
||||||
cgal_direction_t axis2 (0.,1.,0.);
|
cgal_direction_t axis2 (0.,1.,0.);
|
||||||
|
|||||||
Reference in New Issue
Block a user