bool GlareSensor_Impl::setTransformation(const openstudio::Transformation& transformation) { Vector3d translation = transformation.translation(); this->setPositionXCoordinate(translation.x()); this->setPositionYCoordinate(translation.y()); this->setPositionZCoordinate(translation.z()); EulerAngles eulerAngles = transformation.eulerAngles(); setPsiRotationAroundXAxis(radToDeg(eulerAngles.psi())); setThetaRotationAroundYAxis(radToDeg(eulerAngles.theta())); setPhiRotationAroundZAxis(radToDeg(eulerAngles.phi())); return true; }
bool PlanarSurfaceGroup_Impl::setTransformation(const openstudio::Transformation& transformation) { EulerAngles eulerAngles = transformation.eulerAngles(); if ((eulerAngles.psi() != 0) || (eulerAngles.theta() != 0)){ return false; } double dORN = -radToDeg(eulerAngles.phi()); this->setDirectionofRelativeNorth(dORN, false); Vector3d translation = transformation.translation(); this->setXOrigin(translation.x(), false); this->setYOrigin(translation.y(), false); this->setZOrigin(translation.z(), false); this->emitChangeSignals(); return true; }
bool IlluminanceMap_Impl::setTransformation(const openstudio::Transformation& transformation) { bool test; Vector3d translation = transformation.translation(); this->setOriginXCoordinate(translation.x()); this->setOriginYCoordinate(translation.y()); this->setOriginZCoordinate(translation.z()); EulerAngles eulerAngles = transformation.eulerAngles(); test = this->setPsiRotationAroundXAxis(radToDeg(eulerAngles.psi())); OS_ASSERT(test); test = this->setThetaRotationAroundYAxis(radToDeg(eulerAngles.theta())); OS_ASSERT(test); test = this->setPhiRotationAroundZAxis(radToDeg(eulerAngles.phi())); OS_ASSERT(test); return true; }