13 #include <osg/Texture2DArray>
16 #include <osg/MatrixTransform>
17 #include <osg/Geometry>
24 class DtGlSimpleTexture;
44 static void makeRotate(osg::Quat& q,
const double&
angle,
const double& x,
const double& y,
const double& z);
49 static void quatMult(osg::Quat& lhs,
const osg::Quat& rhs);
53 float x,
float y,
float w,
float h);
56 static osg::Camera * CreateTextureQuadOverlay(
osg::Texture * texture,
57 float x,
float y,
float w,
float h);
60 static osg::Camera * CreateTextureQuadOverlay(
const std::string& shader_root, osg::Texture2DArray * textureArray,
61 float x,
float y,
float w,
float h);
64 static osg::MatrixTransform * create_axis_primitive();
68 static osg::Matrix getOrthoMatrix(
bool useReverseZ,
double left,
double right,
double bottom,
double top,
double zNear,
double zFar);
72 static osg::Matrixd oglRevDepthOrtho(
double left,
double right,
double bottom,
73 double top,
double zNear,
double zFar);
78 static bool getRevZProjectionMatrixAsFrustum(
const osg::Matrix& mat,
double& left,
79 double& right,
double& bottom,
double& top,
double& zNear,
double& zFar);
84 static bool getRevPerspective(
const osg::Matrix& mat,
double& fovy,
85 double& aspectRatio,
double& zNear,
double& zFar);
90 static osg::Matrix makeRevFrustum(
double left,
double right,
91 double bottom,
double top,
double zNear,
double zFar);
96 static osg::Matrix makeRevPerspective(
double fovy,
double aspectRatio,
97 double zNear,
double zFar);
100 static void getYPR(
const osg::Matrix& m,
double& yaw,
double& pitch,
double& roll);
103 static void osgPolytopeToFrustum(
const osg::Polytope& polytope,
Frustum_64& frustum);
108 static void computeOsgCameraFrustumPlanes(std::vector<osg::Vec4d>& planes,
const osg::Camera* camera);
111 static void debugDumpShaderState(osg::State* state);
114 static void debugDumpUniformState(
const osg::Node* node);
118 static osg::Vec2 rotateVec2(
const osg::Vec2& v,
double rad );
122 static osg::Vec2 translateVec2(
const osg::Vec2& v,
const osg::Vec2& translation );
125 static osg::Vec2 scaleVec2(
const osg::Vec2& v,
double s );
128 static osg::Vec2 scaleVec2(
const osg::Vec2& v,
double xScale,
double yScale );
132 static bool clipLine(
double xMin,
double xMax,
double yMin,
double yMax,
133 double x0src,
double y0src,
double x1src,
double y1src,
134 double &x0clip,
double &y0clip,
double &x1clip,
double &y1clip );
137 static void clipPolygon(
double xMin,
double xMax,
double yMin,
double yMax,
138 std::vector<osg::Vec2>& vertices );
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
void updateDebugFrustum(osg::Vec3d *frustumVertices)
Contains makVrv::DtOsgShaderFilesCache class.
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Wrapper for OpenGL Texture.
Definition: DtGlSimpleTexture.h:35
osg::ref_ptr< osg::MatrixTransform > myTransform
Definition: DtOsgUtils.h:34
Camera forward declarations.
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
helper class, random osg debug helpers and math
Definition: DtOsgUtils.h:40
osg::ref_ptr< osg::Geometry > myGeometry
Definition: DtOsgUtils.h:35
DtOsgDebugFrustum(const osg::Vec4 &color)
helper for visualizing debug frustra
Definition: DtOsgUtils.h:28
Template for 32/64 bit bit frustums.
Definition: DtCamera.h:148