![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
util
文章平均质量分 72
-TianSF-
-
展开
-
gdal工具函数
参考void setProjection(const std::string& sourceFile){ GDALAllRegister(); CPLSetConfigOption("SHAPE_ENCODING", ""); //解决中文乱码问题 CPLSetConfigOption("GDAL_FILENAME_IS_UTF8", "NO"); //解决中文路径崩溃 char* srs_str; OGRSpatialReference ogrSrs; ogrSrs.S原创 2020-07-30 16:00:53 · 417 阅读 · 0 评论 -
osg create line
inline osg::Geometry* createLine(const std::vector<osg::Vec3>& allPTs, osg::Vec4 color, osg::PrimitiveSet::Mode model = osg::PrimitiveSet::LINE_STRIP, float nWidth = 2){ int nCount = all...原创 2020-03-11 09:54:44 · 215 阅读 · 0 评论 -
InstancePool
//https://github.com/jose-villegas/VCTRenderer#include <iostream>#include<memory>#include<map>#include<vector>#include<string>using namespace std;/// <summ...原创 2018-11-05 09:30:52 · 157 阅读 · 0 评论 -
type_have_function
#ifndef type_have_function#define type_have_function(NAME, FUNC)\template<typename T>\struct NAME \{\private:\ template<typename>\ struct check : std::true_type {};\ \ template&l...原创 2018-11-15 16:35:26 · 148 阅读 · 0 评论 -
简单的cpp反射
头文件#pragma once#ifndef dtReflection_H#define dtReflection_H#include "dtMarco.h"//https://blog.csdn.net/scythe666/article/details/51718864class dtData;typedef void* (*dtPTR_CreateObject)(void)...原创 2019-03-06 09:37:15 · 901 阅读 · 0 评论 -
osgearth StringUtils
/* -*-c++-*- *//* osgEarth - Geospatial SDK for OpenSceneGraph * Copyright 2019 Pelican Mapping * http://osgearth.org * * osgEarth is free software; you can redistribute it and/or modify * it un...原创 2019-07-31 09:48:43 · 182 阅读 · 0 评论 -
三角形插值
// 计算权重 CalculateWeightBOOL CalcWeight(const osg::Vec3d& p0, const osg::Vec3d& p1, const osg::Vec3d& p2, const osg::Vec3d& k, double& a, double& b, double& c){ double Ar...原创 2019-09-16 12:50:38 · 1155 阅读 · 0 评论