VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtLocalMetadataPublisher.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
11 #include <vrvLocalMS/vrvLocalMS.h>
12 
15 
16 namespace makVrv
17 {
18  class DtDe;
19 
21  {
22  public:
23 
25 
26  virtual ~DtLocalMetadataPublisher();
27 
28  virtual void tick( double dt );
29 
30  // Velocity of object attached to, if attached, in Database (local)
31  // coordinates
32  virtual DtVector attachedVelocity();
33 
34  // Get the wind direction, from 0-360. Used by multiple elements
35  virtual double windDirection();
36 
37  // Get the wind speed (m/s). Used by multiple elements
38  virtual double windSpeed();
39 
41 
42 
43 
44  virtual bool haveValidUpperLeftCorner() const;
45  virtual bool haveValidUpperRightCorner() const;
46  virtual bool haveValidLowerRightCorner() const;
47  virtual bool haveValidLowerLeftCorner() const;
49 
51 
52 
53  virtual DtVector upperLeftCorner() const;
55  virtual DtVector upperRightCorner() const;
57  virtual DtVector lowerRightCorner() const;
59  virtual DtVector lowerLeftCorner() const;
61 
62  // What direction is the camera looking
63  virtual DtVector calcLookAt(double hfov, double vfov );
64 
65  // Get the horizontal and vertical field of view in radians
66  virtual void getFieldsOfView(double& hfov, double& vfov );
67  protected:
68 
69  DtLocalMetadataPublisher( DtDe& de, const DtVideoStream& videoStream );
70 
72 
73  virtual void updateTargetCorners();
74 
75  virtual void updateAttachedVelocity(double dt);
76 
77  virtual DtVector getFrustumVector(int corner);
78 
79  unsigned int calcChecksum(unsigned char* buffer, unsigned int length);
80 
81  void setChecksum(unsigned char* buffer, unsigned int length, unsigned int checksum);
82 
83  protected:
86 
91  DtVector myUpperLeftCorner; // point 1 in standard
92  DtVector myUpperRightCorner; // point 2 in standard
93  DtVector myLowerRightCorner; // point 3 in standard
94  DtVector myLowerLeftCorner; // point 4 in standard
95  };
96 
98  {
99  public:
101 
103 
104  virtual DtMetadataPublisher* create( DtDe& de, const DtVideoStream& videoStream );
105  };
106 }
107 

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)