CylinderPatch.cpp
Go to the documentation of this file.
00001 /*
00002  * CylinderPatch.cpp
00003  *
00004  *  Created on: Dec 6, 2010
00005  *      Author: oehler
00006  */
00007 
00008 #include <structureColoring/structures/CylinderPatch.h>
00009 //#include <structureColoring/RotationHelper.h>
00010 
00011 //void CylinderPatch::computeTransformation(){
00012 //      Vec3 zAxis(0.f, 0.f, 1.f);
00013 //      calculateRotation(mRotAxis, mRotAngle, mAxisDirection, zAxis);
00014 //      mTransformRot = Eigen::AngleAxisf(mRotAngle, mRotAxis);
00015 //      mTransformTrans= -mPointOnAxis;
00016 //      mReTransformRot = Eigen::AngleAxisf(-mRotAngle, mRotAxis);
00017 //}
00018 
00019 /*****************************************************************************/
00020 
00021 //void CylinderPatch::setTransformation(const float rotationAngle, const Vec3& rotationAxis){
00022 //      mTransformRot = Eigen::AngleAxisf(rotationAngle, rotationAxis);
00023 //      mReTransformRot = Eigen::AngleAxisf(-rotationAngle, rotationAxis);
00024 //      mTransformTrans = -mPointOnAxis;
00025 //}
00026 
00027 /*****************************************************************************/
00028 
00029 void CylinderPatch::computeOrientedBoundingBox(){
00030         //push BBVertices(bounding box vertices)
00031         mBBVertices.push_back(Vec3(mAxisMin, -mRadius, -mRadius));
00032         mBBVertices.push_back(Vec3(mAxisMin, mRadius, -mRadius));
00033         mBBVertices.push_back(Vec3(mAxisMax, -mRadius, -mRadius));
00034         mBBVertices.push_back(Vec3(mAxisMax, mRadius, -mRadius));
00035         mBBVertices.push_back(Vec3(mAxisMax, -mRadius, mRadius));
00036         mBBVertices.push_back(Vec3(mAxisMax, mRadius, mRadius));
00037         mBBVertices.push_back(Vec3(mAxisMin, -mRadius, mRadius));
00038         mBBVertices.push_back(Vec3(mAxisMin, mRadius, mRadius));
00039 
00040         //transform to robot coordinate system
00041         for(unsigned int i=0; i<mBBVertices.size();i++){
00042                 Vec3 tmpPoint;
00043                 transformToXYZCoords(tmpPoint, mBBVertices[i]);
00044                 mBBVertices[i] = tmpPoint;
00045         }
00046 }


structure_coloring_fkie
Author(s): Bastian Gaspers
autogenerated on Sun Jan 5 2014 11:38:09