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 #include <RobotAPI/interface/core/PoseBase.h>
30 #include <RobotAPI/interface/core/RobotState.h>
31 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
33 
34 #include <MemoryX/interface/memorytypes/MemoryEntities.h>
35 
36 namespace armarx
37 {
38  /**
39  * @class PrimitiveFilter
40  * @brief A brief description
41  *
42  * Detailed Description
43  */
45  {
46  public:
47  /**
48  * PrimitiveFilter Constructor
49  */
51 
52  /**
53  * PrimitiveFilter Destructor
54  */
56 
57  Eigen::Matrix3Xf updateCameraPosition(Eigen::Matrix4f cameraToWorld);
58 
60 
61  bool intersectsFrustum(Eigen::Matrix4f pose, Eigen::Vector3f extent);
62 
63  bool isPointInFrustum(Eigen::Vector3f point);
64 
66  std::vector<memoryx::EnvironmentalPrimitiveBasePtr> allPrimitives,
67  std::vector<memoryx::EnvironmentalPrimitiveBasePtr>& visiblePrimitives,
68  std::vector<memoryx::EnvironmentalPrimitiveBasePtr>& otherPrimitives);
69 
70  void visualizeFrustum(DebugDrawerInterfacePrx debugDrawerTopicPrx);
71 
72  private:
74  };
75 } // namespace armarx
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:41
armarx::PrimitiveFilter::isPointInFrustum
bool isPointInFrustum(Eigen::Vector3f point)
Definition: PrimitiveFilter.cpp:236
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:650
armarx::PrimitiveFilter::visualizeFrustum
void visualizeFrustum(DebugDrawerInterfacePrx debugDrawerTopicPrx)
Definition: PrimitiveFilter.cpp:70
armarx::PrimitiveFilter::~PrimitiveFilter
~PrimitiveFilter()
PrimitiveFilter Destructor.
Definition: PrimitiveFilter.cpp:36
armarx::PrimitiveFilter
A brief description.
Definition: PrimitiveFilter.h:44
FramedPose.h
armarx::PrimitiveFilter::updateCameraPosition
Eigen::Matrix3Xf updateCameraPosition(Eigen::Matrix4f cameraToWorld)
adapted from https://github.com/vanderlin/FrustumCulling/
Definition: PrimitiveFilter.cpp:134
IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface >
Eigen::Matrix< float, 3, 18 >
GfxTL::Matrix3f
MatrixXX< 3, 3, float > Matrix3f
Definition: MatrixXX.h:649
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::PrimitiveFilter::intersectsFrustum
bool intersectsFrustum(Eigen::Matrix4f pose, Eigen::Vector3f extent)
Definition: PrimitiveFilter.cpp:209
armarx::PrimitiveFilter::PrimitiveFilter
PrimitiveFilter()
PrimitiveFilter Constructor.
Definition: PrimitiveFilter.cpp:32