VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgConvertUtils.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2022 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
8 #include <vrvOsg/vrvOsg.h>
9 
15 
16 #include <osg/Vec3>
17 #include <osg/Vec4>
18 #include <osg/Vec4ub>
19 #include <osg/Matrix>
20 #include <osg/BoundingBox>
21 
22 namespace makVrv
23 {
26  {
27  public:
30 
32  virtual ~DtOsgConvertUtils();
33 
35  DtOsgConvertUtils(const DtOsgConvertUtils& rhs) = delete;
36 
38  DtOsgConvertUtils& operator=(const DtOsgConvertUtils& rhs) = delete;
39 
40  public:
42  virtual DtColorValue osgVec4ToColorValue(const osg::Vec4& vOsgVec4) const;
43 
45  virtual Vector4_64 osgVec4ToVec4(const osg::Vec4d& vOsgVec4) const;
46  virtual Vector4_32 osgVec4ToVec4(const osg::Vec4f& vOsgVec4) const;
47  virtual Vector3_64 osgVec4ToVec3(const osg::Vec4d& vOsgVec4) const;
48  virtual Vector3_64 osgVec3ToVec3(const osg::Vec3d& vOsgVec3) const;
49  virtual Vector3_32 osgVec3ToVec3(const osg::Vec3f& vOsgVec3) const;
50 
52  virtual osg::Vec3f vec3ToOsgVec3f(const Vector3_32& vec3) const;
53  virtual osg::Vec4f vec4ToOsgVec4f(const Vector4_32& vec4) const;
54  virtual osg::Vec3d vec3ToOsgVec3d(const Vector3_32& vec3) const;
55 
56 
58  virtual Matrix4_64 osgMatrixToMatrix(const osg::Matrixd& matrix) const;
59  virtual Matrix4_32 osgMatrixToMatrix(const osg::Matrixf& matrix) const;
60 
62  virtual DtVector4<unsigned char> toColorUnsignedByte(const osg::Vec4f& osgColor) const;
63 
65  virtual DtVector4<unsigned char> toColorUnsignedByte(const osg::Vec4ub& osgColor) const;
66 
68  virtual AxisAlignedBoundingBox_32 osgBoundingBoxToBoundingBox(const osg::BoundingBoxd& osgBB) const;
69  };
70 }
DtColorValue class.
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
4 dimensional vector
3 dimensional vector
contains some utility functions for converting between osg and VR-Vantage types
Definition: DtOsgConvertUtils.h:25
Template for 32/64 bit Axis Aligned bounding boxesnot virtual because its stored as is on the GPU...
Definition: DtAxisAlignedBoundingBox.h:27
#define vec4
Definition: DtGlslToDtDefines.h:15
Axis Aligned Bounding Box class.
4 dimensional vector
Definition: DtMath.h:22
#define vec3
Definition: DtGlslToDtDefines.h:12
Contains DLL export macros.
Template for Color values in [0,1] range.
Definition: DtColorValue.h:20
4 dimensional matrix

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)