IntensityGraph.h
Go to the documentation of this file.
1// *****************************************************************
2// Filename: IntensityGraph.h
3// Copyright: Kai Welke, Chair Prof. Dillmann (IAIM),
4// Institute for Computer Science and Engineering (CSE),
5// University of Karlsruhe. All rights reserved.
6// Author: Kai Welke
7// Date: 12.06.2008
8// *****************************************************************
9
10#pragma once
11
12// *****************************************************************
13// includes
14// *****************************************************************
15#include <string>
16
17#include "SphericalGraph.h"
18
19// *****************************************************************
20// structures
21// *****************************************************************
22// *****************************************************************
23// definition of nodes
24// *****************************************************************
25class CIntensityNode : public CSGNode
26{
27public:
30 ~CIntensityNode() override;
31
32 void setIntensity(float fIntensity);
33 float getIntensity();
34
35 CSGNode*
36 clone() override
37 {
39 copy->setIndex(m_nIndex);
40 copy->setIntensity(m_fIntensity);
41 return copy;
42 }
43
44private:
45 float m_fIntensity;
46};
47
48// *****************************************************************
49// definition of sensory egosphere
50// *****************************************************************
52{
53public:
56 //CIntensityGraph(int nNumberNodes);
57 CIntensityGraph(std::string sFileName);
58 ~CIntensityGraph() override;
59
60 void reset();
61 void set(float fIntensity);
62
63
64 void graphToVec(std::vector<float>& vec);
65
66 ///////////////////////////////
67 // file io
68 ///////////////////////////////
69 bool read(std::istream& infile) override;
70 bool readNode(std::istream& infile) override;
71 bool readEdge(std::istream& infile) override;
72
73 bool write(std::ostream& outfile) override;
74 bool writeNode(std::ostream& outfile, int n) override;
75 bool writeEdge(std::ostream& outfile, int e) override;
76
77 // inherited
79 getNewNode() override
80 {
81 return new CIntensityNode();
82 }
83
84 ///////////////////////////////
85 // operators
86 ///////////////////////////////
88};
bool readNode(std::istream &infile) override
bool read(std::istream &infile) override
CIntensityGraph(const CIntensityGraph &prototype)
~CIntensityGraph() override
bool write(std::ostream &outfile) override
void set(float fIntensity)
CIntensityGraph & operator=(CIntensityGraph const &rhs)
CIntensityNode * getNewNode() override
void graphToVec(std::vector< float > &vec)
bool writeNode(std::ostream &outfile, int n) override
bool readEdge(std::istream &infile) override
bool writeEdge(std::ostream &outfile, int e) override
CSGNode * clone() override
void setIntensity(float fIntensity)
~CIntensityNode() override
TSphereCoord m_Position
void setIndex(int nIndex)