Atoms Crowd  7.0.0
MergeOperator.h
1 #pragma once
2 // ===========================================================================
3 // Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
4 //
5 // Use of this software is subject to the terms of the Toolchefs license
6 // agreement provided at the time of installation or download, or which
7 // otherwise accompanies this software in either electronic or hard copy form.
8 // ===========================================================================
9 
10 #include <AtomsGraph/Ports.h>
11 
12 #include <Atoms/Globals.h>
13 #include <Atoms/Graph/Operator.h>
14 
15 namespace Atoms
16 {
17 
18  class ATOMS_EXPORT MergeOperator: public Operator
19  {
20  public:
21 
23  {
27  };
28 
29  NODE_STANDARD_MEMBERS
30 
31  MergeOperator();
32 
33  virtual ~MergeOperator();
34 
35  bool compute(const AtomsGraph::ComputeData* computeData);
36 
37  void reset();
38 
39  unsigned int addPose();
40 
41  unsigned int getNumInputs();
42 
43  inline InputPosePortData& inputPosePort(size_t index) { return m_inputPosePorts[index]; }
44 
45  private:
46  void processMetadata(AtomsCore::MapMetadata &outMetadata, std::vector<AtomsCore::MapMetadata*> &inMetadatas, const std::vector<double> &inputWeightVector);
47 
48  unsigned int counter;
49 
50  std::vector<InputPosePortData> m_inputPosePorts;
51 
52  std::vector<AtomsCore::Pose*> m_posePorts;
53  std::vector<double> m_weightPorts;
54  std::vector<AtomsGraph::DoubleArrayPort*> m_jointWeightsPorts;
55  };
56 }
Definition: MergeOperator.h:19
void reset()
Operator reset function.
bool compute(const AtomsGraph::ComputeData *computeData)
Compute function.
Operator node.
Definition: Operator.h:26
MapMetadata class.
Definition: MapMetadata.h:24
Definition: Node.h:21
Generic node port class.
Definition: PortTemplate.h:24
Atoms namespace.
Definition: Agent.h:29
Definition: MergeOperator.h:23