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
36namespace 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
59 const Eigen::Matrix3f getFrustum();
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
Eigen::Matrix3Xf updateCameraPosition(Eigen::Matrix4f cameraToWorld)
adapted from https://github.com/vanderlin/FrustumCulling/
const Eigen::Matrix3f getFrustum()
bool intersectsFrustum(Eigen::Matrix4f pose, Eigen::Vector3f extent)
void visualizeFrustum(DebugDrawerInterfacePrx debugDrawerTopicPrx)
PrimitiveFilter()
PrimitiveFilter Constructor.
void getPrimitivesInFieldOfView(std::vector< memoryx::EnvironmentalPrimitiveBasePtr > allPrimitives, std::vector< memoryx::EnvironmentalPrimitiveBasePtr > &visiblePrimitives, std::vector< memoryx::EnvironmentalPrimitiveBasePtr > &otherPrimitives)
bool isPointInFrustum(Eigen::Vector3f point)
~PrimitiveFilter()
PrimitiveFilter Destructor.
This file offers overloads of toIce() and fromIce() functions for STL container types.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx