PrimitiveFilter.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package VisionX
19  * @author Markus Grotz ( markus dot grotz at kit dot edu )
20  * @date 2015
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 #pragma once
25 
26 #include <Eigen/Core>
27 #include <Eigen/Geometry>
28 
29 
30 #include <RobotAPI/interface/core/PoseBase.h>
31 #include <RobotAPI/interface/core/RobotState.h>
32 
33 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
34 
36 
37 
38 #include <MemoryX/interface/memorytypes/MemoryEntities.h>
39 
40 namespace armarx
41 {
42  /**
43  * @class PrimitiveFilter
44  * @brief A brief description
45  *
46  * Detailed Description
47  */
49  {
50  public:
51  /**
52  * PrimitiveFilter Constructor
53  */
55 
56  /**
57  * PrimitiveFilter Destructor
58  */
60 
61  Eigen::Matrix3Xf updateCameraPosition(Eigen::Matrix4f cameraToWorld);
62 
64 
65  bool intersectsFrustum(Eigen::Matrix4f pose, Eigen::Vector3f extent);
66 
67  bool isPointInFrustum(Eigen::Vector3f point);
68 
69  void getPrimitivesInFieldOfView(std::vector<memoryx::EnvironmentalPrimitiveBasePtr> allPrimitives, std::vector<memoryx::EnvironmentalPrimitiveBasePtr>& visiblePrimitives, std::vector<memoryx::EnvironmentalPrimitiveBasePtr>& otherPrimitives);
70 
71  void visualizeFrustum(DebugDrawerInterfacePrx debugDrawerTopicPrx);
72 
73  private:
74 
76 
77  };
78 }
armarx::PrimitiveFilter::getFrustum
const Eigen::Matrix3f getFrustum()
armarx::PrimitiveFilter::getPrimitivesInFieldOfView
void getPrimitivesInFieldOfView(std::vector< memoryx::EnvironmentalPrimitiveBasePtr > allPrimitives, std::vector< memoryx::EnvironmentalPrimitiveBasePtr > &visiblePrimitives, std::vector< memoryx::EnvironmentalPrimitiveBasePtr > &otherPrimitives)
Definition: PrimitiveFilter.cpp:42
armarx::PrimitiveFilter::isPointInFrustum
bool isPointInFrustum(Eigen::Vector3f point)
Definition: PrimitiveFilter.cpp:227
armarx::PrimitiveFilter::visualizeFrustum
void visualizeFrustum(DebugDrawerInterfacePrx debugDrawerTopicPrx)
Definition: PrimitiveFilter.cpp:67
armarx::PrimitiveFilter::~PrimitiveFilter
~PrimitiveFilter()
PrimitiveFilter Destructor.
Definition: PrimitiveFilter.cpp:36
armarx::PrimitiveFilter
A brief description.
Definition: PrimitiveFilter.h:48
FramedPose.h
armarx::PrimitiveFilter::updateCameraPosition
Eigen::Matrix3Xf updateCameraPosition(Eigen::Matrix4f cameraToWorld)
adapted from https://github.com/vanderlin/FrustumCulling/
Definition: PrimitiveFilter.cpp:127
GfxTL::Matrix3f
MatrixXX< 3, 3, float > Matrix3f
Definition: MatrixXX.h:600
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface >
Eigen::Matrix< float, 3, 18 >
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::PrimitiveFilter::intersectsFrustum
bool intersectsFrustum(Eigen::Matrix4f pose, Eigen::Vector3f extent)
Definition: PrimitiveFilter.cpp:200
armarx::PrimitiveFilter::PrimitiveFilter
PrimitiveFilter()
PrimitiveFilter Constructor.
Definition: PrimitiveFilter.cpp:32