├── .gitignore ├── README.md ├── assets └── README │ ├── image-20200106221403128.png │ ├── image-20200106224530582.png │ ├── image-20200106224724246.png │ ├── image-20200106225037695.png │ ├── image-20200106225624894.png │ ├── image-20200106230620249.png │ ├── image-20200106232416658.png │ ├── image-20200106235642890.png │ ├── image-20200107001046196.png │ ├── image-20200107001156147.png │ ├── image-20200107001859513.png │ ├── image-20200107185942202.png │ ├── image-20200107185955935.png │ ├── image-20200107190402735.png │ ├── image-20200107190825175.png │ ├── image-20200107191135646.png │ ├── image-20200107191314255.png │ ├── image-20200107191331158.png │ └── image-20200107191609858.png ├── iCGIS.sln └── iCGIS ├── dll ├── gdal204.dll ├── libpq.dll ├── vcruntime140.dll └── vcruntime140_1.dll ├── iCGIS.vcxproj ├── iCGIS.vcxproj.filters ├── iCGIS.vcxproj.user ├── icgis.qrc ├── include ├── GL │ ├── eglew.h │ ├── glew.h │ ├── glxew.h │ └── wglew.h ├── gdal │ ├── cpl_alibaba_oss.h │ ├── cpl_atomic_ops.h │ ├── cpl_auto_close.h │ ├── cpl_aws.h │ ├── cpl_azure.h │ ├── cpl_config.h │ ├── cpl_config_extras.h │ ├── cpl_conv.h │ ├── cpl_cpu_features.h │ ├── cpl_csv.h │ ├── cpl_error.h │ ├── cpl_google_cloud.h │ ├── cpl_hash_set.h │ ├── cpl_http.h │ ├── cpl_json.h │ ├── cpl_json_header.h │ ├── cpl_json_streaming_parser.h │ ├── cpl_list.h │ ├── cpl_md5.h │ ├── cpl_mem_cache.h │ ├── cpl_minixml.h │ ├── cpl_minizip_ioapi.h │ ├── cpl_minizip_unzip.h │ ├── cpl_minizip_zip.h │ ├── cpl_multiproc.h │ ├── cpl_odbc.h │ ├── cpl_port.h │ ├── cpl_progress.h │ ├── cpl_quad_tree.h │ ├── cpl_sha1.h │ ├── cpl_sha256.h │ ├── cpl_spawn.h │ ├── cpl_string.h │ ├── cpl_swift.h │ ├── cpl_time.h │ ├── cpl_userfaultfd.h │ ├── cpl_virtualmem.h │ ├── cpl_vsi.h │ ├── cpl_vsi_error.h │ ├── cpl_vsi_virtual.h │ ├── cpl_vsil_curl_class.h │ ├── cpl_vsil_curl_priv.h │ ├── cpl_worker_thread_pool.h │ ├── cplkeywordparser.h │ ├── gdal.h │ ├── gdal_alg.h │ ├── gdal_alg_priv.h │ ├── gdal_csv.h │ ├── gdal_frmts.h │ ├── gdal_mdreader.h │ ├── gdal_pam.h │ ├── gdal_priv.h │ ├── gdal_proxy.h │ ├── gdal_rat.h │ ├── gdal_simplesurf.h │ ├── gdal_utils.h │ ├── gdal_version.h │ ├── gdal_vrt.h │ ├── gdalexif.h │ ├── gdalgeorefpamdataset.h │ ├── gdalgrid.h │ ├── gdalgrid_priv.h │ ├── gdaljp2abstractdataset.h │ ├── gdaljp2metadata.h │ ├── gdaljp2metadatagenerator.h │ ├── gdallinearsystem.h │ ├── gdalpansharpen.h │ ├── gdalsse_priv.h │ ├── gdalwarper.h │ ├── gdalwarpkernel_opencl.h │ ├── gnm.h │ ├── gnm_api.h │ ├── gnmgraph.h │ ├── gvgcpfit.h │ ├── internal_qhull_headers.h │ ├── memdataset.h │ ├── ogr_api.h │ ├── ogr_attrind.h │ ├── ogr_core.h │ ├── ogr_expat.h │ ├── ogr_feature.h │ ├── ogr_featurestyle.h │ ├── ogr_geo_utils.h │ ├── ogr_geocoding.h │ ├── ogr_geometry.h │ ├── ogr_geos.h │ ├── ogr_libs.h │ ├── ogr_p.h │ ├── ogr_sfcgal.h │ ├── ogr_spatialref.h │ ├── ogr_srs_api.h │ ├── ogr_srs_esri_names.h │ ├── ogr_xerces.h │ ├── ogr_xerces_headers.h │ ├── ograpispy.h │ ├── ogrgeomediageometry.h │ ├── ogrpgeogeometry.h │ ├── ogrsf_frmts.h │ ├── osr_cs_wkt.h │ ├── osr_cs_wkt_parser.h │ ├── rawdataset.h │ ├── swq.h │ ├── thinplatespline.h │ └── vrtdataset.h ├── glm │ ├── CMakeLists.txt │ ├── common.hpp │ ├── detail │ │ ├── _features.hpp │ │ ├── _fixes.hpp │ │ ├── _noise.hpp │ │ ├── _swizzle.hpp │ │ ├── _swizzle_func.hpp │ │ ├── _vectorize.hpp │ │ ├── compute_common.hpp │ │ ├── compute_vector_relational.hpp │ │ ├── func_common.inl │ │ ├── func_common_simd.inl │ │ ├── func_exponential.inl │ │ ├── func_exponential_simd.inl │ │ ├── func_geometric.inl │ │ ├── func_geometric_simd.inl │ │ ├── func_integer.inl │ │ ├── func_integer_simd.inl │ │ ├── func_matrix.inl │ │ ├── func_matrix_simd.inl │ │ ├── func_packing.inl │ │ ├── func_packing_simd.inl │ │ ├── func_trigonometric.inl │ │ ├── func_trigonometric_simd.inl │ │ ├── func_vector_relational.inl │ │ ├── func_vector_relational_simd.inl │ │ ├── glm.cpp │ │ ├── qualifier.hpp │ │ ├── setup.hpp │ │ ├── type_float.hpp │ │ ├── type_half.hpp │ │ ├── type_half.inl │ │ ├── type_mat2x2.hpp │ │ ├── type_mat2x2.inl │ │ ├── type_mat2x3.hpp │ │ ├── type_mat2x3.inl │ │ ├── type_mat2x4.hpp │ │ ├── type_mat2x4.inl │ │ ├── type_mat3x2.hpp │ │ ├── type_mat3x2.inl │ │ ├── type_mat3x3.hpp │ │ ├── type_mat3x3.inl │ │ ├── type_mat3x4.hpp │ │ ├── type_mat3x4.inl │ │ ├── type_mat4x2.hpp │ │ ├── type_mat4x2.inl │ │ ├── type_mat4x3.hpp │ │ ├── type_mat4x3.inl │ │ ├── type_mat4x4.hpp │ │ ├── type_mat4x4.inl │ │ ├── type_mat4x4_simd.inl │ │ ├── type_quat.hpp │ │ ├── type_quat.inl │ │ ├── type_quat_simd.inl │ │ ├── type_vec1.hpp │ │ ├── type_vec1.inl │ │ ├── type_vec2.hpp │ │ ├── type_vec2.inl │ │ ├── type_vec3.hpp │ │ ├── type_vec3.inl │ │ ├── type_vec4.hpp │ │ ├── type_vec4.inl │ │ └── type_vec4_simd.inl │ ├── exponential.hpp │ ├── ext.hpp │ ├── ext │ │ ├── matrix_clip_space.hpp │ │ ├── matrix_clip_space.inl │ │ ├── matrix_common.hpp │ │ ├── matrix_common.inl │ │ ├── matrix_double2x2.hpp │ │ ├── matrix_double2x2_precision.hpp │ │ ├── matrix_double2x3.hpp │ │ ├── matrix_double2x3_precision.hpp │ │ ├── matrix_double2x4.hpp │ │ ├── matrix_double2x4_precision.hpp │ │ ├── matrix_double3x2.hpp │ │ ├── matrix_double3x2_precision.hpp │ │ ├── matrix_double3x3.hpp │ │ ├── matrix_double3x3_precision.hpp │ │ ├── matrix_double3x4.hpp │ │ ├── matrix_double3x4_precision.hpp │ │ ├── matrix_double4x2.hpp │ │ ├── matrix_double4x2_precision.hpp │ │ ├── matrix_double4x3.hpp │ │ ├── matrix_double4x3_precision.hpp │ │ ├── matrix_double4x4.hpp │ │ ├── matrix_double4x4_precision.hpp │ │ ├── matrix_float2x2.hpp │ │ ├── matrix_float2x2_precision.hpp │ │ ├── matrix_float2x3.hpp │ │ ├── matrix_float2x3_precision.hpp │ │ ├── matrix_float2x4.hpp │ │ ├── matrix_float2x4_precision.hpp │ │ ├── matrix_float3x2.hpp │ │ ├── matrix_float3x2_precision.hpp │ │ ├── matrix_float3x3.hpp │ │ ├── matrix_float3x3_precision.hpp │ │ ├── matrix_float3x4.hpp │ │ ├── matrix_float3x4_precision.hpp │ │ ├── matrix_float4x2.hpp │ │ ├── matrix_float4x2_precision.hpp │ │ ├── matrix_float4x3.hpp │ │ ├── matrix_float4x3_precision.hpp │ │ ├── matrix_float4x4.hpp │ │ ├── matrix_float4x4_precision.hpp │ │ ├── matrix_projection.hpp │ │ ├── matrix_projection.inl │ │ ├── matrix_relational.hpp │ │ ├── matrix_relational.inl │ │ ├── matrix_transform.hpp │ │ ├── matrix_transform.inl │ │ ├── quaternion_common.hpp │ │ ├── quaternion_common.inl │ │ ├── quaternion_common_simd.inl │ │ ├── quaternion_double.hpp │ │ ├── quaternion_double_precision.hpp │ │ ├── quaternion_exponential.hpp │ │ ├── quaternion_exponential.inl │ │ ├── quaternion_float.hpp │ │ ├── quaternion_float_precision.hpp │ │ ├── quaternion_geometric.hpp │ │ ├── quaternion_geometric.inl │ │ ├── quaternion_relational.hpp │ │ ├── quaternion_relational.inl │ │ ├── quaternion_transform.hpp │ │ ├── quaternion_transform.inl │ │ ├── quaternion_trigonometric.hpp │ │ ├── quaternion_trigonometric.inl │ │ ├── scalar_common.hpp │ │ ├── scalar_common.inl │ │ ├── scalar_constants.hpp │ │ ├── scalar_constants.inl │ │ ├── scalar_int_sized.hpp │ │ ├── scalar_integer.hpp │ │ ├── scalar_integer.inl │ │ ├── scalar_relational.hpp │ │ ├── scalar_relational.inl │ │ ├── scalar_uint_sized.hpp │ │ ├── scalar_ulp.hpp │ │ ├── scalar_ulp.inl │ │ ├── vector_bool1.hpp │ │ ├── vector_bool1_precision.hpp │ │ ├── vector_bool2.hpp │ │ ├── vector_bool2_precision.hpp │ │ ├── vector_bool3.hpp │ │ ├── vector_bool3_precision.hpp │ │ ├── vector_bool4.hpp │ │ ├── vector_bool4_precision.hpp │ │ ├── vector_common.hpp │ │ ├── vector_common.inl │ │ ├── vector_double1.hpp │ │ ├── vector_double1_precision.hpp │ │ ├── vector_double2.hpp │ │ ├── vector_double2_precision.hpp │ │ ├── vector_double3.hpp │ │ ├── vector_double3_precision.hpp │ │ ├── vector_double4.hpp │ │ ├── vector_double4_precision.hpp │ │ ├── vector_float1.hpp │ │ ├── vector_float1_precision.hpp │ │ ├── vector_float2.hpp │ │ ├── vector_float2_precision.hpp │ │ ├── vector_float3.hpp │ │ ├── vector_float3_precision.hpp │ │ ├── vector_float4.hpp │ │ ├── vector_float4_precision.hpp │ │ ├── vector_int1.hpp │ │ ├── vector_int1_precision.hpp │ │ ├── vector_int2.hpp │ │ ├── vector_int2_precision.hpp │ │ ├── vector_int3.hpp │ │ ├── vector_int3_precision.hpp │ │ ├── vector_int4.hpp │ │ ├── vector_int4_precision.hpp │ │ ├── vector_integer.hpp │ │ ├── vector_integer.inl │ │ ├── vector_relational.hpp │ │ ├── vector_relational.inl │ │ ├── vector_uint1.hpp │ │ ├── vector_uint1_precision.hpp │ │ ├── vector_uint2.hpp │ │ ├── vector_uint2_precision.hpp │ │ ├── vector_uint3.hpp │ │ ├── vector_uint3_precision.hpp │ │ ├── vector_uint4.hpp │ │ ├── vector_uint4_precision.hpp │ │ ├── vector_ulp.hpp │ │ └── vector_ulp.inl │ ├── fwd.hpp │ ├── geometric.hpp │ ├── glm.hpp │ ├── gtc │ │ ├── bitfield.hpp │ │ ├── bitfield.inl │ │ ├── color_space.hpp │ │ ├── color_space.inl │ │ ├── constants.hpp │ │ ├── constants.inl │ │ ├── epsilon.hpp │ │ ├── epsilon.inl │ │ ├── integer.hpp │ │ ├── integer.inl │ │ ├── matrix_access.hpp │ │ ├── matrix_access.inl │ │ ├── matrix_integer.hpp │ │ ├── matrix_inverse.hpp │ │ ├── matrix_inverse.inl │ │ ├── matrix_transform.hpp │ │ ├── matrix_transform.inl │ │ ├── noise.hpp │ │ ├── noise.inl │ │ ├── packing.hpp │ │ ├── packing.inl │ │ ├── quaternion.hpp │ │ ├── quaternion.inl │ │ ├── quaternion_simd.inl │ │ ├── random.hpp │ │ ├── random.inl │ │ ├── reciprocal.hpp │ │ ├── reciprocal.inl │ │ ├── round.hpp │ │ ├── round.inl │ │ ├── type_aligned.hpp │ │ ├── type_precision.hpp │ │ ├── type_precision.inl │ │ ├── type_ptr.hpp │ │ ├── type_ptr.inl │ │ ├── ulp.hpp │ │ ├── ulp.inl │ │ └── vec1.hpp │ ├── gtx │ │ ├── associated_min_max.hpp │ │ ├── associated_min_max.inl │ │ ├── bit.hpp │ │ ├── bit.inl │ │ ├── closest_point.hpp │ │ ├── closest_point.inl │ │ ├── color_encoding.hpp │ │ ├── color_encoding.inl │ │ ├── color_space.hpp │ │ ├── color_space.inl │ │ ├── color_space_YCoCg.hpp │ │ ├── color_space_YCoCg.inl │ │ ├── common.hpp │ │ ├── common.inl │ │ ├── compatibility.hpp │ │ ├── compatibility.inl │ │ ├── component_wise.hpp │ │ ├── component_wise.inl │ │ ├── dual_quaternion.hpp │ │ ├── dual_quaternion.inl │ │ ├── easing.hpp │ │ ├── easing.inl │ │ ├── euler_angles.hpp │ │ ├── euler_angles.inl │ │ ├── extend.hpp │ │ ├── extend.inl │ │ ├── extended_min_max.hpp │ │ ├── extended_min_max.inl │ │ ├── exterior_product.hpp │ │ ├── exterior_product.inl │ │ ├── fast_exponential.hpp │ │ ├── fast_exponential.inl │ │ ├── fast_square_root.hpp │ │ ├── fast_square_root.inl │ │ ├── fast_trigonometry.hpp │ │ ├── fast_trigonometry.inl │ │ ├── float_notmalize.inl │ │ ├── functions.hpp │ │ ├── functions.inl │ │ ├── gradient_paint.hpp │ │ ├── gradient_paint.inl │ │ ├── handed_coordinate_space.hpp │ │ ├── handed_coordinate_space.inl │ │ ├── hash.hpp │ │ ├── hash.inl │ │ ├── integer.hpp │ │ ├── integer.inl │ │ ├── intersect.hpp │ │ ├── intersect.inl │ │ ├── io.hpp │ │ ├── io.inl │ │ ├── log_base.hpp │ │ ├── log_base.inl │ │ ├── matrix_cross_product.hpp │ │ ├── matrix_cross_product.inl │ │ ├── matrix_decompose.hpp │ │ ├── matrix_decompose.inl │ │ ├── matrix_factorisation.hpp │ │ ├── matrix_factorisation.inl │ │ ├── matrix_interpolation.hpp │ │ ├── matrix_interpolation.inl │ │ ├── matrix_major_storage.hpp │ │ ├── matrix_major_storage.inl │ │ ├── matrix_operation.hpp │ │ ├── matrix_operation.inl │ │ ├── matrix_query.hpp │ │ ├── matrix_query.inl │ │ ├── matrix_transform_2d.hpp │ │ ├── matrix_transform_2d.inl │ │ ├── mixed_product.hpp │ │ ├── mixed_product.inl │ │ ├── norm.hpp │ │ ├── norm.inl │ │ ├── normal.hpp │ │ ├── normal.inl │ │ ├── normalize_dot.hpp │ │ ├── normalize_dot.inl │ │ ├── number_precision.hpp │ │ ├── number_precision.inl │ │ ├── optimum_pow.hpp │ │ ├── optimum_pow.inl │ │ ├── orthonormalize.hpp │ │ ├── orthonormalize.inl │ │ ├── perpendicular.hpp │ │ ├── perpendicular.inl │ │ ├── polar_coordinates.hpp │ │ ├── polar_coordinates.inl │ │ ├── projection.hpp │ │ ├── projection.inl │ │ ├── quaternion.hpp │ │ ├── quaternion.inl │ │ ├── range.hpp │ │ ├── raw_data.hpp │ │ ├── raw_data.inl │ │ ├── rotate_normalized_axis.hpp │ │ ├── rotate_normalized_axis.inl │ │ ├── rotate_vector.hpp │ │ ├── rotate_vector.inl │ │ ├── scalar_multiplication.hpp │ │ ├── scalar_relational.hpp │ │ ├── scalar_relational.inl │ │ ├── spline.hpp │ │ ├── spline.inl │ │ ├── std_based_type.hpp │ │ ├── std_based_type.inl │ │ ├── string_cast.hpp │ │ ├── string_cast.inl │ │ ├── texture.hpp │ │ ├── texture.inl │ │ ├── transform.hpp │ │ ├── transform.inl │ │ ├── transform2.hpp │ │ ├── transform2.inl │ │ ├── type_aligned.hpp │ │ ├── type_aligned.inl │ │ ├── type_trait.hpp │ │ ├── type_trait.inl │ │ ├── vec_swizzle.hpp │ │ ├── vector_angle.hpp │ │ ├── vector_angle.inl │ │ ├── vector_query.hpp │ │ ├── vector_query.inl │ │ ├── wrap.hpp │ │ └── wrap.inl │ ├── integer.hpp │ ├── mat2x2.hpp │ ├── mat2x3.hpp │ ├── mat2x4.hpp │ ├── mat3x2.hpp │ ├── mat3x3.hpp │ ├── mat3x4.hpp │ ├── mat4x2.hpp │ ├── mat4x3.hpp │ ├── mat4x4.hpp │ ├── matrix.hpp │ ├── packing.hpp │ ├── simd │ │ ├── common.h │ │ ├── exponential.h │ │ ├── geometric.h │ │ ├── integer.h │ │ ├── matrix.h │ │ ├── packing.h │ │ ├── platform.h │ │ ├── trigonometric.h │ │ └── vector_relational.h │ ├── trigonometric.hpp │ ├── vec2.hpp │ ├── vec3.hpp │ ├── vec4.hpp │ └── vector_relational.hpp ├── jsoncpp │ └── json │ │ ├── allocator.h │ │ ├── assertions.h │ │ ├── autolink.h │ │ ├── config.h │ │ ├── forwards.h │ │ ├── json.h │ │ ├── json_features.h │ │ ├── reader.h │ │ ├── value.h │ │ ├── version.h │ │ └── writer.h ├── mapbox │ └── earcut.hpp ├── pugixml │ ├── pugiconfig.hpp │ ├── pugixml.cpp │ └── pugixml.hpp └── spdlog │ ├── async.h │ ├── async_logger-inl.h │ ├── async_logger.h │ ├── common-inl.h │ ├── common.h │ ├── details │ ├── backtracer-inl.h │ ├── backtracer.h │ ├── circular_q.h │ ├── console_globals.h │ ├── file_helper-inl.h │ ├── file_helper.h │ ├── fmt_helper.h │ ├── log_msg-inl.h │ ├── log_msg.h │ ├── log_msg_buffer-inl.h │ ├── log_msg_buffer.h │ ├── mpmc_blocking_q.h │ ├── null_mutex.h │ ├── os-inl.h │ ├── os.h │ ├── pattern_formatter-inl.h │ ├── pattern_formatter.h │ ├── periodic_worker-inl.h │ ├── periodic_worker.h │ ├── registry-inl.h │ ├── registry.h │ ├── synchronous_factory.h │ ├── thread_pool-inl.h │ └── thread_pool.h │ ├── fmt │ ├── bin_to_hex.h │ ├── bundled │ │ ├── LICENSE.rst │ │ ├── chrono.h │ │ ├── color.h │ │ ├── compile.h │ │ ├── core.h │ │ ├── format-inl.h │ │ ├── format.h │ │ ├── locale.h │ │ ├── ostream.h │ │ ├── posix.h │ │ ├── printf.h │ │ ├── ranges.h │ │ └── safe-duration-cast.h │ ├── fmt.h │ └── ostr.h │ ├── formatter.h │ ├── logger-inl.h │ ├── logger.h │ ├── sinks │ ├── android_sink.h │ ├── ansicolor_sink-inl.h │ ├── ansicolor_sink.h │ ├── base_sink-inl.h │ ├── base_sink.h │ ├── basic_file_sink-inl.h │ ├── basic_file_sink.h │ ├── daily_file_sink.h │ ├── dist_sink.h │ ├── dup_filter_sink.h │ ├── msvc_sink.h │ ├── null_sink.h │ ├── ostream_sink.h │ ├── ringbuffer_sink.h │ ├── rotating_file_sink-inl.h │ ├── rotating_file_sink.h │ ├── sink-inl.h │ ├── sink.h │ ├── stdout_color_sinks-inl.h │ ├── stdout_color_sinks.h │ ├── stdout_sinks-inl.h │ ├── stdout_sinks.h │ ├── syslog_sink.h │ ├── systemd_sink.h │ ├── wincolor_sink-inl.h │ └── wincolor_sink.h │ ├── spdlog-inl.h │ ├── spdlog.h │ ├── tweakme.h │ └── version.h ├── lib ├── gdal_i.lib ├── glew32s.lib ├── glfw3.lib ├── jsoncpp.lib ├── jsoncppd.lib └── spdlog.lib ├── res ├── icons │ ├── Thumbs.db │ ├── Thumbs.db:encryptable │ ├── app_32x32.ico │ ├── app_64x64.ico │ ├── check-hov.png │ ├── check-nor.png │ ├── check-part.png │ ├── check-sel.png │ ├── clear-text-hover.png │ ├── clear-text.ico │ ├── clear-text.png │ ├── clear.ico │ ├── color-palette.ico │ ├── connect-db.ico │ ├── developer.png │ ├── developer_64x64.png │ ├── editing-arrow.ico │ ├── geojson.ico │ ├── layer.ico │ ├── log.ico │ ├── map-2.ico │ ├── map.ico │ ├── new.ico │ ├── normal-arrow.ico │ ├── open.ico │ ├── palm.ico │ ├── postgresql.ico │ ├── remove.ico │ ├── rename.ico │ ├── rotate.ico │ ├── search-focus-in.ico │ ├── search-focus-out.ico │ ├── search-hover.png │ ├── search-press.png │ ├── search.png │ ├── shapefile.ico │ ├── shapefilex.ico │ ├── show-less.ico │ ├── show-more.ico │ ├── start-editing.ico │ ├── stop-editing.ico │ ├── table.ico │ ├── tiff.ico │ ├── tool.ico │ ├── toolbox.ico │ ├── what-is-this.ico │ ├── what-is-this.png │ ├── zoom-to-layer.ico │ └── zoom-to-map.ico └── shaders │ ├── border_frag.glsl │ ├── border_vert.glsl │ ├── highlight_frag.glsl │ ├── highlight_vert.glsl │ ├── line_frag.glsl │ ├── line_vert.glsl │ ├── point_frag.glsl │ ├── point_vert.glsl │ ├── polygon_frag.glsl │ ├── polygon_vert.glsl │ ├── texture_frag.glsl │ └── texture_vert.glsl └── src ├── dialog ├── aboutdialog.cpp ├── aboutdialog.h ├── globalsearchresult.cpp ├── globalsearchresult.h ├── headerviewwithcheckbox.cpp ├── headerviewwithcheckbox.h ├── layerattributetabledialog.cpp ├── layerattributetabledialog.h ├── layerstyledialog.cpp ├── layerstyledialog.h ├── newmapdialog.cpp ├── newmapdialog.h ├── postgresqlconnect.cpp ├── postgresqlconnect.h ├── postgresqltableselect.cpp ├── postgresqltableselect.h ├── viewlog.cpp ├── viewlog.h ├── whatisthisdialog.cpp └── whatisthisdialog.h ├── geo ├── geo_base.hpp ├── geometry │ ├── geogeometry.cpp │ ├── geogeometry.h │ ├── geogeometrycollection.cpp │ ├── geolinearring.cpp │ ├── geolinestring.cpp │ ├── geomultilinestring.cpp │ ├── geomultipoint.cpp │ ├── geomultipolygon.cpp │ ├── geopoint.cpp │ └── geopolygon.cpp ├── index │ ├── grid.cpp │ ├── grid.h │ ├── gridindex.cpp │ ├── gridindex.h │ ├── spatialindex.cpp │ └── spatialindex.h ├── map │ ├── geofeature.cpp │ ├── geofeature.h │ ├── geofeaturelayer.cpp │ ├── geofeaturelayerproperty.cpp │ ├── geofeaturelayerproperty.h │ ├── geofielddefn.h │ ├── geolayer.h │ ├── geomap.cpp │ ├── geomap.h │ ├── geomapproperty.h │ ├── georasterlayer.cpp │ ├── georasterlayerproperty.cpp │ └── georasterlayerproperty.h ├── raster │ ├── georasterband.cpp │ ├── georasterband.h │ ├── georasterdata.cpp │ ├── georasterdata.h │ ├── geotiff.cpp │ └── geotiff.h ├── tool │ ├── geotool.cpp │ ├── geotool.h │ ├── kernel_density.cpp │ └── kernel_density.h └── utility │ ├── filereader.cpp │ ├── filereader.h │ ├── geo_convert.cpp │ ├── geo_convert.h │ ├── geo_math.cpp │ ├── geo_math.h │ ├── geo_utility.cpp │ ├── geo_utility.h │ ├── geojson.cpp │ ├── geojson.h │ ├── sld.cpp │ └── sld.h ├── icgis.cpp ├── icgis.h ├── main.cpp ├── opengl ├── glcall.cpp ├── glcall.h ├── indexbuffer.cpp ├── indexbuffer.h ├── openglfeaturedescriptor.cpp ├── openglfeaturedescriptor.h ├── openglrasterdescriptor.cpp ├── openglrasterdescriptor.h ├── renderer.cpp ├── renderer.h ├── shader.cpp ├── shader.h ├── texture.cpp ├── texture.h ├── vertexarray.cpp ├── vertexarray.h ├── vertexbuffer.cpp ├── vertexbuffer.h ├── vertexbufferlayout.cpp └── vertexbufferlayout.h ├── operation ├── operation.cpp ├── operation.h ├── operationlist.cpp └── operationlist.h ├── stable.h ├── util ├── appevent.cpp ├── appevent.h ├── env.cpp ├── env.h ├── logger.h ├── memoryleakdetect.h ├── utility.cpp └── utility.h └── widget ├── colorblockwidget.cpp ├── colorblockwidget.h ├── globalsearchwidget.cpp ├── globalsearchwidget.h ├── layerstreewidget.cpp ├── layerstreewidget.h ├── layerstreewidgetitem.cpp ├── layerstreewidgetitem.h ├── openglwidget.cpp ├── openglwidget.h ├── searchcompleter.cpp ├── searchcompleter.h ├── statusbar.cpp ├── statusbar.h ├── toolbar.cpp ├── toolbar.h ├── toolboxtreewidget.cpp └── toolboxtreewidget.h /.gitignore: -------------------------------------------------------------------------------- 1 | .vs/* 2 | iCGIS/bin/* 3 | iCGIS/build/* 4 | iCGIS/logs/* 5 | iCGIS/data 6 | iCGIS/userdata/config/* 7 | -------------------------------------------------------------------------------- /assets/README/image-20200106221403128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200106221403128.png -------------------------------------------------------------------------------- /assets/README/image-20200106224530582.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200106224530582.png -------------------------------------------------------------------------------- /assets/README/image-20200106224724246.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200106224724246.png -------------------------------------------------------------------------------- /assets/README/image-20200106225037695.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200106225037695.png -------------------------------------------------------------------------------- /assets/README/image-20200106225624894.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200106225624894.png -------------------------------------------------------------------------------- /assets/README/image-20200106230620249.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200106230620249.png -------------------------------------------------------------------------------- /assets/README/image-20200106232416658.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200106232416658.png -------------------------------------------------------------------------------- /assets/README/image-20200106235642890.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200106235642890.png -------------------------------------------------------------------------------- /assets/README/image-20200107001046196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200107001046196.png -------------------------------------------------------------------------------- /assets/README/image-20200107001156147.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200107001156147.png -------------------------------------------------------------------------------- /assets/README/image-20200107001859513.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200107001859513.png -------------------------------------------------------------------------------- /assets/README/image-20200107185942202.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200107185942202.png -------------------------------------------------------------------------------- /assets/README/image-20200107185955935.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200107185955935.png -------------------------------------------------------------------------------- /assets/README/image-20200107190402735.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200107190402735.png -------------------------------------------------------------------------------- /assets/README/image-20200107190825175.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200107190825175.png -------------------------------------------------------------------------------- /assets/README/image-20200107191135646.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200107191135646.png -------------------------------------------------------------------------------- /assets/README/image-20200107191314255.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200107191314255.png -------------------------------------------------------------------------------- /assets/README/image-20200107191331158.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200107191331158.png -------------------------------------------------------------------------------- /assets/README/image-20200107191609858.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/assets/README/image-20200107191609858.png -------------------------------------------------------------------------------- /iCGIS.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.1062 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iCGIS", "iCGIS\iCGIS.vcxproj", "{D4D92F5C-0AAE-4731-9C58-AEB3F7504EA9}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Release|x64 = Release|x64 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {D4D92F5C-0AAE-4731-9C58-AEB3F7504EA9}.Debug|x64.ActiveCfg = Debug|x64 15 | {D4D92F5C-0AAE-4731-9C58-AEB3F7504EA9}.Debug|x64.Build.0 = Debug|x64 16 | {D4D92F5C-0AAE-4731-9C58-AEB3F7504EA9}.Release|x64.ActiveCfg = Release|x64 17 | {D4D92F5C-0AAE-4731-9C58-AEB3F7504EA9}.Release|x64.Build.0 = Release|x64 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {F00E3DCB-DF23-4904-8F30-4E52903F8339} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /iCGIS/dll/gdal204.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/dll/gdal204.dll -------------------------------------------------------------------------------- /iCGIS/dll/libpq.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/dll/libpq.dll -------------------------------------------------------------------------------- /iCGIS/dll/vcruntime140.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/dll/vcruntime140.dll -------------------------------------------------------------------------------- /iCGIS/dll/vcruntime140_1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/dll/vcruntime140_1.dll -------------------------------------------------------------------------------- /iCGIS/iCGIS.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | true 5 | 6 | -------------------------------------------------------------------------------- /iCGIS/icgis.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /iCGIS/include/gdal/cpl_config_extras.h: -------------------------------------------------------------------------------- 1 | /* $Id: cpl_config_extras.h 55f4cce7557b301901f754e28cd6193f2f02b522 2016-12-23 14:54:07Z Kurt Schwehr $ */ 2 | 3 | #ifndef INCLUDED_CPL_CONFIG_EXTRAS 4 | #define INCLUDED_CPL_CONFIG_EXTRAS 5 | 6 | #if defined(__APPLE__) 7 | 8 | #ifdef __BIG_ENDIAN__ 9 | #define HOST_FILLORDER FILLORDER_MSB2LSB 10 | #else 11 | #define HOST_FILLORDER FILLORDER_LSB2MSB 12 | #endif 13 | 14 | #ifdef __LP64__ 15 | #define SIZEOF_UNSIGNED_LONG 8 16 | #else 17 | #define SIZEOF_UNSIGNED_LONG 4 18 | #endif 19 | 20 | #ifdef __LP64__ 21 | #define SIZEOF_VOIDP 8 22 | #else 23 | #define SIZEOF_VOIDP 4 24 | #endif 25 | 26 | #ifdef __BIG_ENDIAN__ 27 | #define WORDS_BIGENDIAN 1 28 | #else 29 | #undef WORDS_BIGENDIAN 30 | #endif 31 | 32 | #undef VSI_STAT64 33 | #undef VSI_STAT64_T 34 | 35 | #define VSI_STAT64 stat 36 | #define VSI_STAT64_T stat 37 | 38 | #endif // APPLE 39 | 40 | #endif // INCLUDED_CPL_CONFIG_EXTRAS 41 | -------------------------------------------------------------------------------- /iCGIS/include/gdal/cpl_md5.h: -------------------------------------------------------------------------------- 1 | /* See md5.cpp for explanation and copyright information. */ 2 | 3 | #ifndef CPL_MD5_H 4 | #define CPL_MD5_H 5 | 6 | #include "cpl_port.h" 7 | 8 | CPL_C_START 9 | const char CPL_DLL *CPLMD5String( const char *pszText ); 10 | CPL_C_END 11 | 12 | #ifndef DOXYGEN_SKIP 13 | 14 | struct CPLMD5Context { 15 | GUInt32 buf[4]; 16 | GUInt32 bits[2]; 17 | unsigned char in[64]; 18 | }; 19 | 20 | void CPLMD5Init( struct CPLMD5Context *context ); 21 | void CPLMD5Update( struct CPLMD5Context *context, unsigned char const *buf, 22 | unsigned len ); 23 | void CPLMD5Final( unsigned char digest[16], struct CPLMD5Context *context ); 24 | void CPLMD5Transform( GUInt32 buf[4], const unsigned char inraw[64] ); 25 | 26 | #endif // #ifndef DOXYGEN_SKIP 27 | 28 | #endif /* !CPL_MD5_H */ 29 | -------------------------------------------------------------------------------- /iCGIS/include/gdal/gdal_version.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | 3 | /* -------------------------------------------------------------------- */ 4 | /* GDAL Version Information. */ 5 | /* -------------------------------------------------------------------- */ 6 | 7 | #ifndef GDAL_VERSION_MAJOR 8 | # define GDAL_VERSION_MAJOR 2 9 | # define GDAL_VERSION_MINOR 4 10 | # define GDAL_VERSION_REV 3 11 | # define GDAL_VERSION_BUILD 0 12 | #endif 13 | 14 | /* GDAL_COMPUTE_VERSION macro introduced in GDAL 1.10 */ 15 | /* Must be used ONLY to compare with version numbers for GDAL >= 1.10 */ 16 | #ifndef GDAL_COMPUTE_VERSION 17 | #define GDAL_COMPUTE_VERSION(maj,min,rev) ((maj)*1000000+(min)*10000+(rev)*100) 18 | #endif 19 | 20 | /* Note: the formula to compute GDAL_VERSION_NUM has changed in GDAL 1.10 */ 21 | #ifndef GDAL_VERSION_NUM 22 | # define GDAL_VERSION_NUM (GDAL_COMPUTE_VERSION(GDAL_VERSION_MAJOR,GDAL_VERSION_MINOR,GDAL_VERSION_REV)+GDAL_VERSION_BUILD) 23 | #endif 24 | 25 | #if !defined(DO_NOT_DEFINE_GDAL_RELEASE_DATE_AND_GDAL_RELEASE_NAME) 26 | #ifndef GDAL_RELEASE_DATE 27 | # define GDAL_RELEASE_DATE 20191028 28 | #endif 29 | #ifndef GDAL_RELEASE_NAME 30 | # define GDAL_RELEASE_NAME "2.4.3" 31 | #endif 32 | #endif 33 | -------------------------------------------------------------------------------- /iCGIS/include/glm/detail/_fixes.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | //! Workaround for compatibility with other libraries 4 | #ifdef max 5 | #undef max 6 | #endif 7 | 8 | //! Workaround for compatibility with other libraries 9 | #ifdef min 10 | #undef min 11 | #endif 12 | 13 | //! Workaround for Android 14 | #ifdef isnan 15 | #undef isnan 16 | #endif 17 | 18 | //! Workaround for Android 19 | #ifdef isinf 20 | #undef isinf 21 | #endif 22 | 23 | //! Workaround for Chrone Native Client 24 | #ifdef log2 25 | #undef log2 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /iCGIS/include/glm/detail/compute_common.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "setup.hpp" 4 | #include 5 | 6 | namespace glm{ 7 | namespace detail 8 | { 9 | template 10 | struct compute_abs 11 | {}; 12 | 13 | template 14 | struct compute_abs 15 | { 16 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genFIType call(genFIType x) 17 | { 18 | GLM_STATIC_ASSERT( 19 | std::numeric_limits::is_iec559 || std::numeric_limits::is_signed, 20 | "'abs' only accept floating-point and integer scalar or vector inputs"); 21 | 22 | return x >= genFIType(0) ? x : -x; 23 | // TODO, perf comp with: *(((int *) &x) + 1) &= 0x7fffffff; 24 | } 25 | }; 26 | 27 | #if GLM_COMPILER & GLM_COMPILER_CUDA 28 | template<> 29 | struct compute_abs 30 | { 31 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static float call(float x) 32 | { 33 | return fabsf(x); 34 | } 35 | }; 36 | #endif 37 | 38 | template 39 | struct compute_abs 40 | { 41 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genFIType call(genFIType x) 42 | { 43 | GLM_STATIC_ASSERT( 44 | (!std::numeric_limits::is_signed && std::numeric_limits::is_integer), 45 | "'abs' only accept floating-point and integer scalar or vector inputs"); 46 | return x; 47 | } 48 | }; 49 | }//namespace detail 50 | }//namespace glm 51 | -------------------------------------------------------------------------------- /iCGIS/include/glm/detail/compute_vector_relational.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //#include "compute_common.hpp" 4 | #include "setup.hpp" 5 | #include 6 | 7 | namespace glm{ 8 | namespace detail 9 | { 10 | template 11 | struct compute_equal 12 | { 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b) 14 | { 15 | return a == b; 16 | } 17 | }; 18 | /* 19 | template 20 | struct compute_equal 21 | { 22 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b) 23 | { 24 | return detail::compute_abs::is_signed>::call(b - a) <= static_cast(0); 25 | //return std::memcmp(&a, &b, sizeof(T)) == 0; 26 | } 27 | }; 28 | */ 29 | }//namespace detail 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /iCGIS/include/glm/detail/func_exponential_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_exponential_simd.inl 3 | 4 | #include "../simd/exponential.h" 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | namespace glm{ 9 | namespace detail 10 | { 11 | template 12 | struct compute_sqrt<4, float, Q, true> 13 | { 14 | GLM_FUNC_QUALIFIER static vec<4, float, Q> call(vec<4, float, Q> const& v) 15 | { 16 | vec<4, float, Q> Result; 17 | Result.data = _mm_sqrt_ps(v.data); 18 | return Result; 19 | } 20 | }; 21 | 22 | # if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE 23 | template<> 24 | struct compute_sqrt<4, float, aligned_lowp, true> 25 | { 26 | GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const& v) 27 | { 28 | vec<4, float, aligned_lowp> Result; 29 | Result.data = glm_vec4_sqrt_lowp(v.data); 30 | return Result; 31 | } 32 | }; 33 | # endif 34 | }//namespace detail 35 | }//namespace glm 36 | 37 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 38 | -------------------------------------------------------------------------------- /iCGIS/include/glm/detail/func_packing_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /iCGIS/include/glm/detail/func_trigonometric_simd.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/include/glm/detail/func_trigonometric_simd.inl -------------------------------------------------------------------------------- /iCGIS/include/glm/detail/func_vector_relational_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /iCGIS/include/glm/detail/type_half.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "setup.hpp" 4 | 5 | namespace glm{ 6 | namespace detail 7 | { 8 | typedef short hdata; 9 | 10 | GLM_FUNC_DECL float toFloat32(hdata value); 11 | GLM_FUNC_DECL hdata toFloat16(float const& value); 12 | 13 | }//namespace detail 14 | }//namespace glm 15 | 16 | #include "type_half.inl" 17 | -------------------------------------------------------------------------------- /iCGIS/include/glm/detail/type_mat4x4_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | 3 | namespace glm 4 | { 5 | 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_common.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_common 2 | /// @file glm/ext/matrix_common.hpp 3 | /// 4 | /// @defgroup ext_matrix_common GLM_EXT_matrix_common 5 | /// @ingroup ext 6 | /// 7 | /// Defines functions for common matrix operations. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_matrix_common 12 | 13 | #pragma once 14 | 15 | #include "../detail/qualifier.hpp" 16 | #include "../detail/_fixes.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_transform extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_common 25 | /// @{ 26 | 27 | template 28 | GLM_FUNC_DECL mat mix(mat const& x, mat const& y, mat const& a); 29 | 30 | template 31 | GLM_FUNC_DECL mat mix(mat const& x, mat const& y, U a); 32 | 33 | /// @} 34 | }//namespace glm 35 | 36 | #include "matrix_common.inl" 37 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_common.inl: -------------------------------------------------------------------------------- 1 | #include "../matrix.hpp" 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat mix(mat const& x, mat const& y, U a) 7 | { 8 | return mat(x) * (static_cast(1) - a) + mat(y) * a; 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER mat mix(mat const& x, mat const& y, mat const& a) 13 | { 14 | return matrixCompMult(mat(x), static_cast(1) - a) + matrixCompMult(mat(y), a); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_double2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, double, defaultp> dmat2x2; 16 | 17 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, double, defaultp> dmat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_double2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, double, defaultp> dmat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_double2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, double, defaultp> dmat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_double3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, double, defaultp> dmat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_double3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, double, defaultp> dmat3x3; 16 | 17 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, double, defaultp> dmat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_double3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, double, defaultp> dmat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_double4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, double, defaultp> dmat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_double4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, double, defaultp> dmat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_double4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, double, defaultp> dmat4x4; 16 | 17 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, double, defaultp> dmat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_float2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, float, defaultp> mat2x2; 16 | 17 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, float, defaultp> mat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_float2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, float, defaultp> mat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_float2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, float, defaultp> mat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_float3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, float, defaultp> mat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_float3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, float, defaultp> mat3x3; 16 | 17 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, float, defaultp> mat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_float3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, float, defaultp> mat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_float4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, float, defaultp> mat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_float4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, float, defaultp> mat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/matrix_float4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @ingroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, float, defaultp> mat4x4; 16 | 17 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, float, defaultp> mat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/quaternion_common_simd.inl: -------------------------------------------------------------------------------- 1 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 2 | 3 | namespace glm{ 4 | namespace detail 5 | { 6 | template 7 | struct compute_dot, float, true> 8 | { 9 | static GLM_FUNC_QUALIFIER float call(qua const& x, qua const& y) 10 | { 11 | return _mm_cvtss_f32(glm_vec1_dot(x.data, y.data)); 12 | } 13 | }; 14 | }//namespace detail 15 | }//namespace glm 16 | 17 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 18 | 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/quaternion_double.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_double 2 | /// @file glm/ext/quaternion_double.hpp 3 | /// 4 | /// @defgroup ext_quaternion_double GLM_EXT_quaternion_double 5 | /// @ingroup ext 6 | /// 7 | /// Exposes double-precision floating point quaternion type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_quaternion_float 12 | /// @see ext_quaternion_double_precision 13 | /// @see ext_quaternion_common 14 | /// @see ext_quaternion_exponential 15 | /// @see ext_quaternion_geometric 16 | /// @see ext_quaternion_relational 17 | /// @see ext_quaternion_transform 18 | /// @see ext_quaternion_trigonometric 19 | 20 | #pragma once 21 | 22 | // Dependency: 23 | #include "../detail/type_quat.hpp" 24 | 25 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 26 | # pragma message("GLM: GLM_EXT_quaternion_double extension included") 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup ext_quaternion_double 32 | /// @{ 33 | 34 | /// Quaternion of double-precision floating-point numbers. 35 | typedef qua dquat; 36 | 37 | /// @} 38 | } //namespace glm 39 | 40 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/quaternion_float.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_float 2 | /// @file glm/ext/quaternion_float.hpp 3 | /// 4 | /// @defgroup ext_quaternion_float GLM_EXT_quaternion_float 5 | /// @ingroup ext 6 | /// 7 | /// Exposes single-precision floating point quaternion type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_quaternion_double 12 | /// @see ext_quaternion_float_precision 13 | /// @see ext_quaternion_common 14 | /// @see ext_quaternion_exponential 15 | /// @see ext_quaternion_geometric 16 | /// @see ext_quaternion_relational 17 | /// @see ext_quaternion_transform 18 | /// @see ext_quaternion_trigonometric 19 | 20 | #pragma once 21 | 22 | // Dependency: 23 | #include "../detail/type_quat.hpp" 24 | 25 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 26 | # pragma message("GLM: GLM_EXT_quaternion_float extension included") 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup ext_quaternion_float 32 | /// @{ 33 | 34 | /// Quaternion of single-precision floating-point numbers. 35 | typedef qua quat; 36 | 37 | /// @} 38 | } //namespace glm 39 | 40 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/quaternion_float_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_float_precision 2 | /// @file glm/ext/quaternion_float_precision.hpp 3 | /// 4 | /// @defgroup ext_quaternion_float_precision GLM_EXT_quaternion_float_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes single-precision floating point quaternion type with various precision in term of ULPs. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | // Dependency: 14 | #include "../detail/type_quat.hpp" 15 | 16 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 17 | # pragma message("GLM: GLM_EXT_quaternion_float_precision extension included") 18 | #endif 19 | 20 | namespace glm 21 | { 22 | /// @addtogroup ext_quaternion_float_precision 23 | /// @{ 24 | 25 | /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 26 | typedef qua lowp_quat; 27 | 28 | /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 29 | typedef qua mediump_quat; 30 | 31 | /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 32 | typedef qua highp_quat; 33 | 34 | /// @} 35 | } //namespace glm 36 | 37 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/quaternion_geometric.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER T dot(qua const& x, qua const& y) 5 | { 6 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'dot' accepts only floating-point inputs"); 7 | return detail::compute_dot, T, detail::is_aligned::value>::call(x, y); 8 | } 9 | 10 | template 11 | GLM_FUNC_QUALIFIER T length(qua const& q) 12 | { 13 | return glm::sqrt(dot(q, q)); 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER qua normalize(qua const& q) 18 | { 19 | T len = length(q); 20 | if(len <= static_cast(0)) // Problem 21 | return qua(static_cast(1), static_cast(0), static_cast(0), static_cast(0)); 22 | T oneOverLen = static_cast(1) / len; 23 | return qua(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen); 24 | } 25 | 26 | template 27 | GLM_FUNC_QUALIFIER qua cross(qua const& q1, qua const& q2) 28 | { 29 | return qua( 30 | q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z, 31 | q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y, 32 | q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z, 33 | q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x); 34 | } 35 | }//namespace glm 36 | 37 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/quaternion_relational.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER vec<4, bool, Q> equal(qua const& x, qua const& y) 5 | { 6 | vec<4, bool, Q> Result; 7 | for(length_t i = 0; i < x.length(); ++i) 8 | Result[i] = x[i] == y[i]; 9 | return Result; 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER vec<4, bool, Q> equal(qua const& x, qua const& y, T epsilon) 14 | { 15 | vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); 16 | return lessThan(abs(v), vec<4, T, Q>(epsilon)); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER vec<4, bool, Q> notEqual(qua const& x, qua const& y) 21 | { 22 | vec<4, bool, Q> Result; 23 | for(length_t i = 0; i < x.length(); ++i) 24 | Result[i] = x[i] != y[i]; 25 | return Result; 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER vec<4, bool, Q> notEqual(qua const& x, qua const& y, T epsilon) 30 | { 31 | vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); 32 | return greaterThanEqual(abs(v), vec<4, T, Q>(epsilon)); 33 | } 34 | }//namespace glm 35 | 36 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/quaternion_transform.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER qua rotate(qua const& q, T const& angle, vec<3, T, Q> const& v) 5 | { 6 | vec<3, T, Q> Tmp = v; 7 | 8 | // Axis of rotation must be normalised 9 | T len = glm::length(Tmp); 10 | if(abs(len - static_cast(1)) > static_cast(0.001)) 11 | { 12 | T oneOverLen = static_cast(1) / len; 13 | Tmp.x *= oneOverLen; 14 | Tmp.y *= oneOverLen; 15 | Tmp.z *= oneOverLen; 16 | } 17 | 18 | T const AngleRad(angle); 19 | T const Sin = sin(AngleRad * static_cast(0.5)); 20 | 21 | return q * qua(cos(AngleRad * static_cast(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin); 22 | } 23 | }//namespace glm 24 | 25 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/quaternion_trigonometric.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER T angle(qua const& x) 5 | { 6 | return acos(x.w) * static_cast(2); 7 | } 8 | 9 | template 10 | GLM_FUNC_QUALIFIER vec<3, T, Q> axis(qua const& x) 11 | { 12 | T const tmp1 = static_cast(1) - x.w * x.w; 13 | if(tmp1 <= static_cast(0)) 14 | return vec<3, T, Q>(0, 0, 1); 15 | T const tmp2 = static_cast(1) / sqrt(tmp1); 16 | return vec<3, T, Q>(x.x * tmp2, x.y * tmp2, x.z * tmp2); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER qua angleAxis(T const& angle, vec<3, T, Q> const& v) 21 | { 22 | T const a(angle); 23 | T const s = glm::sin(a * static_cast(0.5)); 24 | 25 | return qua(glm::cos(a * static_cast(0.5)), v * s); 26 | } 27 | }//namespace glm 28 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/scalar_constants.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_scalar_constants 2 | /// @file glm/ext/scalar_constants.hpp 3 | /// 4 | /// @defgroup ext_scalar_constants GLM_EXT_scalar_constants 5 | /// @ingroup ext 6 | /// 7 | /// Provides a list of constants and precomputed useful values. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | // Dependencies 14 | #include "../detail/setup.hpp" 15 | 16 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 17 | # pragma message("GLM: GLM_EXT_scalar_constants extension included") 18 | #endif 19 | 20 | namespace glm 21 | { 22 | /// @addtogroup ext_scalar_constants 23 | /// @{ 24 | 25 | /// Return the epsilon constant for floating point types. 26 | template 27 | GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon(); 28 | 29 | /// Return the pi constant for floating point types. 30 | template 31 | GLM_FUNC_DECL GLM_CONSTEXPR genType pi(); 32 | 33 | /// @} 34 | } //namespace glm 35 | 36 | #include "scalar_constants.inl" 37 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/scalar_constants.inl: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon() 7 | { 8 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'epsilon' only accepts floating-point inputs"); 9 | return std::numeric_limits::epsilon(); 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi() 14 | { 15 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'pi' only accepts floating-point inputs"); 16 | return static_cast(3.14159265358979323846264338327950288); 17 | } 18 | } //namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/scalar_relational.inl: -------------------------------------------------------------------------------- 1 | #include "../common.hpp" 2 | #include "../ext/scalar_int_sized.hpp" 3 | #include "../ext/scalar_uint_sized.hpp" 4 | #include "../detail/type_float.hpp" 5 | 6 | namespace glm 7 | { 8 | template 9 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool equal(genType const& x, genType const& y, genType const& epsilon) 10 | { 11 | return abs(x - y) <= epsilon; 12 | } 13 | 14 | template 15 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, genType const& epsilon) 16 | { 17 | return abs(x - y) > epsilon; 18 | } 19 | 20 | template 21 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool equal(genType const& x, genType const& y, int MaxULPs) 22 | { 23 | detail::float_t const a(x); 24 | detail::float_t const b(y); 25 | 26 | // Different signs means they do not match. 27 | if(a.negative() != b.negative()) 28 | { 29 | // Check for equality to make sure +0==-0 30 | return a.mantissa() == b.mantissa() && a.exponent() == b.exponent(); 31 | } 32 | 33 | // Find the difference in ULPs. 34 | typename detail::float_t::int_type const DiffULPs = abs(a.i - b.i); 35 | return DiffULPs <= MaxULPs; 36 | } 37 | 38 | template 39 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, int ULPs) 40 | { 41 | return !equal(x, y, ULPs); 42 | } 43 | }//namespace glm 44 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_bool1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_bool1 2 | /// @file glm/ext/vector_bool1.hpp 3 | /// 4 | /// @defgroup ext_vector_bool1 GLM_EXT_vector_bool1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes bvec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_bool1_precision extension. 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_bool1 extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_bool1 24 | /// @{ 25 | 26 | /// 1 components vector of boolean. 27 | typedef vec<1, bool, defaultp> bvec1; 28 | 29 | /// @} 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_bool1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_bool1_precision 2 | /// @file glm/ext/vector_bool1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_bool1_precision GLM_EXT_vector_bool1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_bvec1, mediump_bvec1 and lowp_bvec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | #include "../detail/type_vec1.hpp" 14 | 15 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 16 | # pragma message("GLM: GLM_EXT_vector_bool1_precision extension included") 17 | #endif 18 | 19 | namespace glm 20 | { 21 | /// @addtogroup ext_vector_bool1_precision 22 | /// @{ 23 | 24 | /// 1 component vector of bool values. 25 | typedef vec<1, bool, highp> highp_bvec1; 26 | 27 | /// 1 component vector of bool values. 28 | typedef vec<1, bool, mediump> mediump_bvec1; 29 | 30 | /// 1 component vector of bool values. 31 | typedef vec<1, bool, lowp> lowp_bvec1; 32 | 33 | /// @} 34 | }//namespace glm 35 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_bool2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, bool, defaultp> bvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_bool2_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool2_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 2 components vector of high qualifier bool numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<2, bool, highp> highp_bvec2; 17 | 18 | /// 2 components vector of medium qualifier bool numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<2, bool, mediump> mediump_bvec2; 23 | 24 | /// 2 components vector of low qualifier bool numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<2, bool, lowp> lowp_bvec2; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_bool3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, bool, defaultp> bvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_bool3_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool3_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 3 components vector of high qualifier bool numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<3, bool, highp> highp_bvec3; 17 | 18 | /// 3 components vector of medium qualifier bool numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<3, bool, mediump> mediump_bvec3; 23 | 24 | /// 3 components vector of low qualifier bool numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<3, bool, lowp> lowp_bvec3; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_bool4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, bool, defaultp> bvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_bool4_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool4_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 4 components vector of high qualifier bool numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<4, bool, highp> highp_bvec4; 17 | 18 | /// 4 components vector of medium qualifier bool numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<4, bool, mediump> mediump_bvec4; 23 | 24 | /// 4 components vector of low qualifier bool numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<4, bool, lowp> lowp_bvec4; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_double1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_double1 2 | /// @file glm/ext/vector_double1.hpp 3 | /// 4 | /// @defgroup ext_vector_double1 GLM_EXT_vector_double1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes double-precision floating point vector type with one component. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_double1_precision extension. 12 | /// @see ext_vector_float1 extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_double1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_double1 25 | /// @{ 26 | 27 | /// 1 components vector of double-precision floating-point numbers. 28 | typedef vec<1, double, defaultp> dvec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_double1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_double1_precision 2 | /// @file glm/ext/vector_double1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_double1_precision GLM_EXT_vector_double1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_dvec1, mediump_dvec1 and lowp_dvec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_double1 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_double1_precision extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_double1_precision 24 | /// @{ 25 | 26 | /// 1 component vector of double-precision floating-point numbers using high precision arithmetic in term of ULPs. 27 | typedef vec<1, double, highp> highp_dvec1; 28 | 29 | /// 1 component vector of double-precision floating-point numbers using medium precision arithmetic in term of ULPs. 30 | typedef vec<1, double, mediump> mediump_dvec1; 31 | 32 | /// 1 component vector of double-precision floating-point numbers using low precision arithmetic in term of ULPs. 33 | typedef vec<1, double, lowp> lowp_dvec1; 34 | 35 | /// @} 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_double2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, double, defaultp> dvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_double3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, double, defaultp> dvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_double4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, double, defaultp> dvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_float1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_float1 2 | /// @file glm/ext/vector_float1.hpp 3 | /// 4 | /// @defgroup ext_vector_float1 GLM_EXT_vector_float1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes single-precision floating point vector type with one component. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_float1_precision extension. 12 | /// @see ext_vector_double1 extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_float1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_float1 25 | /// @{ 26 | 27 | /// 1 components vector of single-precision floating-point numbers. 28 | typedef vec<1, float, defaultp> vec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_float1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_float1_precision 2 | /// @file glm/ext/vector_float1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_float1_precision GLM_EXT_vector_float1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_vec1, mediump_vec1 and lowp_vec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_float1 extension. 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_float1_precision extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_float1_precision 24 | /// @{ 25 | 26 | /// 1 component vector of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 27 | typedef vec<1, float, highp> highp_vec1; 28 | 29 | /// 1 component vector of single-precision floating-point numbers using medium precision arithmetic in term of ULPs. 30 | typedef vec<1, float, mediump> mediump_vec1; 31 | 32 | /// 1 component vector of single-precision floating-point numbers using low precision arithmetic in term of ULPs. 33 | typedef vec<1, float, lowp> lowp_vec1; 34 | 35 | /// @} 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_float2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, float, defaultp> vec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_float3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, float, defaultp> vec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_float4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, float, defaultp> vec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_int1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_int1 2 | /// @file glm/ext/vector_int1.hpp 3 | /// 4 | /// @defgroup ext_vector_int1 GLM_EXT_vector_int1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes ivec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_uint1 extension. 12 | /// @see ext_vector_int1_precision extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_int1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_int1 25 | /// @{ 26 | 27 | /// 1 component vector of signed integer numbers. 28 | typedef vec<1, int, defaultp> ivec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | 33 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_int1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_int1_precision 2 | /// @file glm/ext/vector_int1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_int1_precision GLM_EXT_vector_int1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_ivec1, mediump_ivec1 and lowp_ivec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | #include "../detail/type_vec1.hpp" 14 | 15 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 16 | # pragma message("GLM: GLM_EXT_vector_int1_precision extension included") 17 | #endif 18 | 19 | namespace glm 20 | { 21 | /// @addtogroup ext_vector_int1_precision 22 | /// @{ 23 | 24 | /// 1 component vector of signed integer values. 25 | typedef vec<1, int, highp> highp_ivec1; 26 | 27 | /// 1 component vector of signed integer values. 28 | typedef vec<1, int, mediump> mediump_ivec1; 29 | 30 | /// 1 component vector of signed integer values. 31 | typedef vec<1, int, lowp> lowp_ivec1; 32 | 33 | /// @} 34 | }//namespace glm 35 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_int2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, int, defaultp> ivec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_int2_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int2_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 2 components vector of high qualifier signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<2, int, highp> highp_ivec2; 17 | 18 | /// 2 components vector of medium qualifier signed integer numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<2, int, mediump> mediump_ivec2; 23 | 24 | /// 2 components vector of low qualifier signed integer numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<2, int, lowp> lowp_ivec2; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_int3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, int, defaultp> ivec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_int3_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int3_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 3 components vector of high qualifier signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<3, int, highp> highp_ivec3; 17 | 18 | /// 3 components vector of medium qualifier signed integer numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<3, int, mediump> mediump_ivec3; 23 | 24 | /// 3 components vector of low qualifier signed integer numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<3, int, lowp> lowp_ivec3; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_int4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, int, defaultp> ivec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_uint1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_uint1 2 | /// @file glm/ext/vector_uint1.hpp 3 | /// 4 | /// @defgroup ext_vector_uint1 GLM_EXT_vector_uint1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes uvec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_int1 extension. 12 | /// @see ext_vector_uint1_precision extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_uint1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_uint1 25 | /// @{ 26 | 27 | /// 1 component vector of unsigned integer numbers. 28 | typedef vec<1, unsigned int, defaultp> uvec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | 33 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_uint1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_uint1_precision 2 | /// @file glm/ext/vector_uint1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_uint1_precision GLM_EXT_vector_uint1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_uvec1, mediump_uvec1 and lowp_uvec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | #include "../detail/type_vec1.hpp" 14 | 15 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 16 | # pragma message("GLM: GLM_EXT_vector_uint1_precision extension included") 17 | #endif 18 | 19 | namespace glm 20 | { 21 | /// @addtogroup ext_vector_uint1_precision 22 | /// @{ 23 | 24 | /// 1 component vector of unsigned integer values. 25 | /// 26 | /// @see ext_vector_uint1_precision 27 | typedef vec<1, unsigned int, highp> highp_uvec1; 28 | 29 | /// 1 component vector of unsigned integer values. 30 | /// 31 | /// @see ext_vector_uint1_precision 32 | typedef vec<1, unsigned int, mediump> mediump_uvec1; 33 | 34 | /// 1 component vector of unsigned integer values. 35 | /// 36 | /// @see ext_vector_uint1_precision 37 | typedef vec<1, unsigned int, lowp> lowp_uvec1; 38 | 39 | /// @} 40 | }//namespace glm 41 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_uint2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, unsigned int, defaultp> uvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_uint3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, unsigned int, defaultp> uvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/ext/vector_uint4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, unsigned int, defaultp> uvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtc/matrix_access.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_matrix_access 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType row 7 | ( 8 | genType const& m, 9 | length_t index, 10 | typename genType::row_type const& x 11 | ) 12 | { 13 | assert(index >= 0 && index < m[0].length()); 14 | 15 | genType Result = m; 16 | for(length_t i = 0; i < m.length(); ++i) 17 | Result[i][index] = x[i]; 18 | return Result; 19 | } 20 | 21 | template 22 | GLM_FUNC_QUALIFIER typename genType::row_type row 23 | ( 24 | genType const& m, 25 | length_t index 26 | ) 27 | { 28 | assert(index >= 0 && index < m[0].length()); 29 | 30 | typename genType::row_type Result(0); 31 | for(length_t i = 0; i < m.length(); ++i) 32 | Result[i] = m[i][index]; 33 | return Result; 34 | } 35 | 36 | template 37 | GLM_FUNC_QUALIFIER genType column 38 | ( 39 | genType const& m, 40 | length_t index, 41 | typename genType::col_type const& x 42 | ) 43 | { 44 | assert(index >= 0 && index < m.length()); 45 | 46 | genType Result = m; 47 | Result[index] = x; 48 | return Result; 49 | } 50 | 51 | template 52 | GLM_FUNC_QUALIFIER typename genType::col_type column 53 | ( 54 | genType const& m, 55 | length_t index 56 | ) 57 | { 58 | assert(index >= 0 && index < m.length()); 59 | 60 | return m[index]; 61 | } 62 | }//namespace glm 63 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtc/matrix_transform.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_matrix_transform 2 | /// @file glm/gtc/matrix_transform.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_transform 6 | /// @see gtx_transform2 7 | /// 8 | /// @defgroup gtc_matrix_transform GLM_GTC_matrix_transform 9 | /// @ingroup gtc 10 | /// 11 | /// Include to use the features of this extension. 12 | /// 13 | /// Defines functions that generate common transformation matrices. 14 | /// 15 | /// The matrices generated by this extension use standard OpenGL fixed-function 16 | /// conventions. For example, the lookAt function generates a transform from world 17 | /// space into the specific eye space that the projective matrix functions 18 | /// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility 19 | /// specifications defines the particular layout of this eye space. 20 | 21 | #pragma once 22 | 23 | // Dependencies 24 | #include "../mat4x4.hpp" 25 | #include "../vec2.hpp" 26 | #include "../vec3.hpp" 27 | #include "../vec4.hpp" 28 | #include "../ext/matrix_projection.hpp" 29 | #include "../ext/matrix_clip_space.hpp" 30 | #include "../ext/matrix_transform.hpp" 31 | 32 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 33 | # pragma message("GLM: GLM_GTC_matrix_transform extension included") 34 | #endif 35 | 36 | #include "matrix_transform.inl" 37 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtc/matrix_transform.inl: -------------------------------------------------------------------------------- 1 | #include "../geometric.hpp" 2 | #include "../trigonometric.hpp" 3 | #include "../matrix.hpp" 4 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtc/quaternion_simd.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/include/glm/gtc/quaternion_simd.inl -------------------------------------------------------------------------------- /iCGIS/include/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtc/vec1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_vec1 2 | /// @file glm/gtc/vec1.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtc_vec1 GLM_GTC_vec1 7 | /// @ingroup gtc 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Add vec1, ivec1, uvec1 and bvec1 types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../ext/vector_bool1.hpp" 17 | #include "../ext/vector_bool1_precision.hpp" 18 | #include "../ext/vector_float1.hpp" 19 | #include "../ext/vector_float1_precision.hpp" 20 | #include "../ext/vector_double1.hpp" 21 | #include "../ext/vector_double1_precision.hpp" 22 | #include "../ext/vector_int1.hpp" 23 | #include "../ext/vector_int1_precision.hpp" 24 | #include "../ext/vector_uint1.hpp" 25 | #include "../ext/vector_uint1_precision.hpp" 26 | 27 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 28 | # pragma message("GLM: GLM_GTC_vec1 extension included") 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/closest_point.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_closest_point 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> closestPointOnLine 7 | ( 8 | vec<3, T, Q> const& point, 9 | vec<3, T, Q> const& a, 10 | vec<3, T, Q> const& b 11 | ) 12 | { 13 | T LineLength = distance(a, b); 14 | vec<3, T, Q> Vector = point - a; 15 | vec<3, T, Q> LineDirection = (b - a) / LineLength; 16 | 17 | // Project Vector to LineDirection to get the distance of point from a 18 | T Distance = dot(Vector, LineDirection); 19 | 20 | if(Distance <= T(0)) return a; 21 | if(Distance >= LineLength) return b; 22 | return a + LineDirection * Distance; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER vec<2, T, Q> closestPointOnLine 27 | ( 28 | vec<2, T, Q> const& point, 29 | vec<2, T, Q> const& a, 30 | vec<2, T, Q> const& b 31 | ) 32 | { 33 | T LineLength = distance(a, b); 34 | vec<2, T, Q> Vector = point - a; 35 | vec<2, T, Q> LineDirection = (b - a) / LineLength; 36 | 37 | // Project Vector to LineDirection to get the distance of point from a 38 | T Distance = dot(Vector, LineDirection); 39 | 40 | if(Distance <= T(0)) return a; 41 | if(Distance >= LineLength) return b; 42 | return a + LineDirection * Distance; 43 | } 44 | 45 | }//namespace glm 46 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/extend.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_extend 2 | /// @file glm/gtx/extend.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_extend GLM_GTX_extend 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Extend a position from a source to a position at a defined length. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_extend extension included") 23 | # endif 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_extend 29 | /// @{ 30 | 31 | /// Extends of Length the Origin position using the (Source - Origin) direction. 32 | /// @see gtx_extend 33 | template 34 | GLM_FUNC_DECL genType extend( 35 | genType const& Origin, 36 | genType const& Source, 37 | typename genType::value_type const Length); 38 | 39 | /// @} 40 | }//namespace glm 41 | 42 | #include "extend.inl" 43 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/extend.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_extend 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType extend 7 | ( 8 | genType const& Origin, 9 | genType const& Source, 10 | genType const& Distance 11 | ) 12 | { 13 | return Origin + (Source - Origin) * Distance; 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER vec<2, T, Q> extend 18 | ( 19 | vec<2, T, Q> const& Origin, 20 | vec<2, T, Q> const& Source, 21 | T const& Distance 22 | ) 23 | { 24 | return Origin + (Source - Origin) * Distance; 25 | } 26 | 27 | template 28 | GLM_FUNC_QUALIFIER vec<3, T, Q> extend 29 | ( 30 | vec<3, T, Q> const& Origin, 31 | vec<3, T, Q> const& Source, 32 | T const& Distance 33 | ) 34 | { 35 | return Origin + (Source - Origin) * Distance; 36 | } 37 | 38 | template 39 | GLM_FUNC_QUALIFIER vec<4, T, Q> extend 40 | ( 41 | vec<4, T, Q> const& Origin, 42 | vec<4, T, Q> const& Source, 43 | T const& Distance 44 | ) 45 | { 46 | return Origin + (Source - Origin) * Distance; 47 | } 48 | }//namespace glm 49 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/exterior_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_exterior_product 2 | 3 | #include 4 | 5 | namespace glm { 6 | namespace detail 7 | { 8 | template 9 | struct compute_cross_vec2 10 | { 11 | GLM_FUNC_QUALIFIER static T call(vec<2, T, Q> const& v, vec<2, T, Q> const& u) 12 | { 13 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs"); 14 | 15 | return v.x * u.y - u.x * v.y; 16 | } 17 | }; 18 | }//namespace detail 19 | 20 | template 21 | GLM_FUNC_QUALIFIER T cross(vec<2, T, Q> const& x, vec<2, T, Q> const& y) 22 | { 23 | return detail::compute_cross_vec2::value>::call(x, y); 24 | } 25 | }//namespace glm 26 | 27 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/float_notmalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_float_normalize 2 | 3 | #include 4 | 5 | namespace glm 6 | { 7 | template 8 | GLM_FUNC_QUALIFIER vec floatNormalize(vec const& v) 9 | { 10 | return vec(v) / static_cast(std::numeric_limits::max()); 11 | } 12 | 13 | }//namespace glm 14 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/functions.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_functions 2 | 3 | #include "../exponential.hpp" 4 | 5 | namespace glm 6 | { 7 | template 8 | GLM_FUNC_QUALIFIER T gauss 9 | ( 10 | T x, 11 | T ExpectedValue, 12 | T StandardDeviation 13 | ) 14 | { 15 | return exp(-((x - ExpectedValue) * (x - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation)) / (StandardDeviation * sqrt(static_cast(6.28318530717958647692528676655900576))); 16 | } 17 | 18 | template 19 | GLM_FUNC_QUALIFIER T gauss 20 | ( 21 | vec<2, T, Q> const& Coord, 22 | vec<2, T, Q> const& ExpectedValue, 23 | vec<2, T, Q> const& StandardDeviation 24 | ) 25 | { 26 | vec<2, T, Q> const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation); 27 | return exp(-(Squared.x + Squared.y)); 28 | } 29 | }//namespace glm 30 | 31 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/gradient_paint.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_gradient_paint 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T radialGradient 7 | ( 8 | vec<2, T, Q> const& Center, 9 | T const& Radius, 10 | vec<2, T, Q> const& Focal, 11 | vec<2, T, Q> const& Position 12 | ) 13 | { 14 | vec<2, T, Q> F = Focal - Center; 15 | vec<2, T, Q> D = Position - Focal; 16 | T Radius2 = pow2(Radius); 17 | T Fx2 = pow2(F.x); 18 | T Fy2 = pow2(F.y); 19 | 20 | T Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x)); 21 | T Denominator = Radius2 - (Fx2 + Fy2); 22 | return Numerator / Denominator; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER T linearGradient 27 | ( 28 | vec<2, T, Q> const& Point0, 29 | vec<2, T, Q> const& Point1, 30 | vec<2, T, Q> const& Position 31 | ) 32 | { 33 | vec<2, T, Q> Dist = Point1 - Point0; 34 | return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); 35 | } 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_handed_coordinate_space 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER bool rightHanded 7 | ( 8 | vec<3, T, Q> const& tangent, 9 | vec<3, T, Q> const& binormal, 10 | vec<3, T, Q> const& normal 11 | ) 12 | { 13 | return dot(cross(normal, tangent), binormal) > T(0); 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER bool leftHanded 18 | ( 19 | vec<3, T, Q> const& tangent, 20 | vec<3, T, Q> const& binormal, 21 | vec<3, T, Q> const& normal 22 | ) 23 | { 24 | return dot(cross(normal, tangent), binormal) < T(0); 25 | } 26 | }//namespace glm 27 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/log_base.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | /// @file glm/gtx/log_base.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_log_base GLM_GTX_log_base 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Logarithm for any base. base can be a vector or a scalar. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("GLM: GLM_GTX_log_base is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_log_base extension included") 23 | # endif 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_log_base 29 | /// @{ 30 | 31 | /// Logarithm for any base. 32 | /// From GLM_GTX_log_base. 33 | template 34 | GLM_FUNC_DECL genType log( 35 | genType const& x, 36 | genType const& base); 37 | 38 | /// Logarithm for any base. 39 | /// From GLM_GTX_log_base. 40 | template 41 | GLM_FUNC_DECL vec sign( 42 | vec const& x, 43 | vec const& base); 44 | 45 | /// @} 46 | }//namespace glm 47 | 48 | #include "log_base.inl" 49 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType log(genType const& x, genType const& base) 7 | { 8 | return glm::log(x) / glm::log(base); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER vec log(vec const& x, vec const& base) 13 | { 14 | return glm::log(x) / glm::log(base); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/matrix_cross_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_cross_product 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> matrixCross3 7 | ( 8 | vec<3, T, Q> const& x 9 | ) 10 | { 11 | mat<3, 3, T, Q> Result(T(0)); 12 | Result[0][1] = x.z; 13 | Result[1][0] = -x.z; 14 | Result[0][2] = -x.y; 15 | Result[2][0] = x.y; 16 | Result[1][2] = x.x; 17 | Result[2][1] = -x.x; 18 | return Result; 19 | } 20 | 21 | template 22 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> matrixCross4 23 | ( 24 | vec<3, T, Q> const& x 25 | ) 26 | { 27 | mat<4, 4, T, Q> Result(T(0)); 28 | Result[0][1] = x.z; 29 | Result[1][0] = -x.z; 30 | Result[0][2] = -x.y; 31 | Result[2][0] = x.y; 32 | Result[1][2] = x.x; 33 | Result[2][1] = -x.x; 34 | return Result; 35 | } 36 | 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/matrix_factorisation.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/include/glm/gtx/matrix_factorisation.inl -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/mixed_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | /// @file glm/gtx/mixed_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_mixed_product GLM_GTX_mixed_producte 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Mixed product of 3 vectors. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("GLM: GLM_GTX_mixed_product is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_mixed_product extension included") 23 | # endif 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_mixed_product 29 | /// @{ 30 | 31 | /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) 32 | template 33 | GLM_FUNC_DECL T mixedProduct( 34 | vec<3, T, Q> const& v1, 35 | vec<3, T, Q> const& v2, 36 | vec<3, T, Q> const& v3); 37 | 38 | /// @} 39 | }// namespace glm 40 | 41 | #include "mixed_product.inl" 42 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T mixedProduct 7 | ( 8 | vec<3, T, Q> const& v1, 9 | vec<3, T, Q> const& v2, 10 | vec<3, T, Q> const& v3 11 | ) 12 | { 13 | return dot(cross(v1, v2), v3); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/normal.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | /// @file glm/gtx/normal.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_normal GLM_GTX_normal 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Compute the normal of a triangle. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # ifndef GLM_ENABLE_EXPERIMENTAL 21 | # pragma message("GLM: GLM_GTX_normal is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 22 | # else 23 | # pragma message("GLM: GLM_GTX_normal extension included") 24 | # endif 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_normal 30 | /// @{ 31 | 32 | /// Computes triangle normal from triangle points. 33 | /// 34 | /// @see gtx_normal 35 | template 36 | GLM_FUNC_DECL vec<3, T, Q> triangleNormal(vec<3, T, Q> const& p1, vec<3, T, Q> const& p2, vec<3, T, Q> const& p3); 37 | 38 | /// @} 39 | }//namespace glm 40 | 41 | #include "normal.inl" 42 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> triangleNormal 7 | ( 8 | vec<3, T, Q> const& p1, 9 | vec<3, T, Q> const& p2, 10 | vec<3, T, Q> const& p3 11 | ) 12 | { 13 | return normalize(cross(p1 - p2, p1 - p3)); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/normalize_dot.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normalize_dot 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T normalizeDot(vec const& x, vec const& y) 7 | { 8 | return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER T fastNormalizeDot(vec const& x, vec const& y) 13 | { 14 | return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_number_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType pow2(genType const& x) 7 | { 8 | return x * x; 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER genType pow3(genType const& x) 13 | { 14 | return x * x * x; 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER genType pow4(genType const& x) 19 | { 20 | return (x * x) * (x * x); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> orthonormalize(mat<3, 3, T, Q> const& m) 7 | { 8 | mat<3, 3, T, Q> r = m; 9 | 10 | r[0] = normalize(r[0]); 11 | 12 | T d0 = dot(r[0], r[1]); 13 | r[1] -= r[0] * d0; 14 | r[1] = normalize(r[1]); 15 | 16 | T d1 = dot(r[1], r[2]); 17 | d0 = dot(r[0], r[2]); 18 | r[2] -= r[0] * d0 + r[1] * d1; 19 | r[2] = normalize(r[2]); 20 | 21 | return r; 22 | } 23 | 24 | template 25 | GLM_FUNC_QUALIFIER vec<3, T, Q> orthonormalize(vec<3, T, Q> const& x, vec<3, T, Q> const& y) 26 | { 27 | return normalize(x - y * dot(y, x)); 28 | } 29 | }//namespace glm 30 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/perpendicular.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | /// @file glm/gtx/perpendicular.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_projection (dependence) 6 | /// 7 | /// @defgroup gtx_perpendicular GLM_GTX_perpendicular 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Perpendicular of a vector from other one 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | #include "../gtx/projection.hpp" 19 | 20 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 21 | # ifndef GLM_ENABLE_EXPERIMENTAL 22 | # pragma message("GLM: GLM_GTX_perpendicular is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 23 | # else 24 | # pragma message("GLM: GLM_GTX_perpendicular extension included") 25 | # endif 26 | #endif 27 | 28 | namespace glm 29 | { 30 | /// @addtogroup gtx_perpendicular 31 | /// @{ 32 | 33 | //! Projects x a perpendicular axis of Normal. 34 | //! From GLM_GTX_perpendicular extension. 35 | template 36 | GLM_FUNC_DECL genType perp(genType const& x, genType const& Normal); 37 | 38 | /// @} 39 | }//namespace glm 40 | 41 | #include "perpendicular.inl" 42 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType perp(genType const& x, genType const& Normal) 7 | { 8 | return x - proj(x, Normal); 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/polar_coordinates.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_polar_coordinates 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> polar 7 | ( 8 | vec<3, T, Q> const& euclidean 9 | ) 10 | { 11 | T const Length(length(euclidean)); 12 | vec<3, T, Q> const tmp(euclidean / Length); 13 | T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z)); 14 | 15 | return vec<3, T, Q>( 16 | asin(tmp.y), // latitude 17 | atan(tmp.x, tmp.z), // longitude 18 | xz_dist); // xz distance 19 | } 20 | 21 | template 22 | GLM_FUNC_QUALIFIER vec<3, T, Q> euclidean 23 | ( 24 | vec<2, T, Q> const& polar 25 | ) 26 | { 27 | T const latitude(polar.x); 28 | T const longitude(polar.y); 29 | 30 | return vec<3, T, Q>( 31 | cos(latitude) * sin(longitude), 32 | sin(latitude), 33 | cos(latitude) * cos(longitude)); 34 | } 35 | 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/projection.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | /// @file glm/gtx/projection.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_projection GLM_GTX_projection 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Projection of a vector to other one 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../geometric.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("GLM: GLM_GTX_projection is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_projection extension included") 23 | # endif 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_projection 29 | /// @{ 30 | 31 | /// Projects x on Normal. 32 | /// 33 | /// @param[in] x A vector to project 34 | /// @param[in] Normal A normal that doesn't need to be of unit length. 35 | /// 36 | /// @see gtx_projection 37 | template 38 | GLM_FUNC_DECL genType proj(genType const& x, genType const& Normal); 39 | 40 | /// @} 41 | }//namespace glm 42 | 43 | #include "projection.inl" 44 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType proj(genType const& x, genType const& Normal) 7 | { 8 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/raw_data.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | /// @file glm/gtx/raw_data.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_raw_data GLM_GTX_raw_data 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Projection of a vector to other one 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../ext/scalar_uint_sized.hpp" 17 | #include "../detail/setup.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # ifndef GLM_ENABLE_EXPERIMENTAL 21 | # pragma message("GLM: GLM_GTX_raw_data is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 22 | # else 23 | # pragma message("GLM: GLM_GTX_raw_data extension included") 24 | # endif 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_raw_data 30 | /// @{ 31 | 32 | //! Type for byte numbers. 33 | //! From GLM_GTX_raw_data extension. 34 | typedef detail::uint8 byte; 35 | 36 | //! Type for word numbers. 37 | //! From GLM_GTX_raw_data extension. 38 | typedef detail::uint16 word; 39 | 40 | //! Type for dword numbers. 41 | //! From GLM_GTX_raw_data extension. 42 | typedef detail::uint32 dword; 43 | 44 | //! Type for qword numbers. 45 | //! From GLM_GTX_raw_data extension. 46 | typedef detail::uint64 qword; 47 | 48 | /// @} 49 | }// namespace glm 50 | 51 | #include "raw_data.inl" 52 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | 3 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/scalar_relational.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_scalar_relational 2 | /// @file glm/gtx/scalar_relational.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_scalar_relational GLM_GTX_scalar_relational 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Extend a position from a source to a position at a defined length. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_extend extension included") 23 | # endif 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_scalar_relational 29 | /// @{ 30 | 31 | 32 | 33 | /// @} 34 | }//namespace glm 35 | 36 | #include "scalar_relational.inl" 37 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_std_based_type 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/texture.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_texture 2 | /// @file glm/gtx/texture.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_texture GLM_GTX_texture 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Wrapping mode of texture coordinates. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | #include "../gtc/integer.hpp" 18 | #include "../gtx/component_wise.hpp" 19 | 20 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 21 | # ifndef GLM_ENABLE_EXPERIMENTAL 22 | # pragma message("GLM: GLM_GTX_texture is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 23 | # else 24 | # pragma message("GLM: GLM_GTX_texture extension included") 25 | # endif 26 | #endif 27 | 28 | namespace glm 29 | { 30 | /// @addtogroup gtx_texture 31 | /// @{ 32 | 33 | /// Compute the number of mipmaps levels necessary to create a mipmap complete texture 34 | /// 35 | /// @param Extent Extent of the texture base level mipmap 36 | /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector 37 | /// @tparam T Floating-point or signed integer scalar types 38 | /// @tparam Q Value from qualifier enum 39 | template 40 | T levels(vec const& Extent); 41 | 42 | /// @} 43 | }// namespace glm 44 | 45 | #include "texture.inl" 46 | 47 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/texture.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_texture 2 | 3 | namespace glm 4 | { 5 | template 6 | inline T levels(vec const& Extent) 7 | { 8 | return glm::log2(compMax(Extent)) + static_cast(1); 9 | } 10 | 11 | template 12 | inline T levels(T Extent) 13 | { 14 | return vec<1, T, defaultp>(Extent).x; 15 | } 16 | }//namespace glm 17 | 18 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/transform.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_transform 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> translate(vec<3, T, Q> const& v) 7 | { 8 | return translate(mat<4, 4, T, Q>(static_cast(1)), v); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate(T angle, vec<3, T, Q> const& v) 13 | { 14 | return rotate(mat<4, 4, T, Q>(static_cast(1)), angle, v); 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> scale(vec<3, T, Q> const& v) 19 | { 20 | return scale(mat<4, 4, T, Q>(static_cast(1)), v); 21 | } 22 | 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /iCGIS/include/glm/gtx/type_aligned.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_type_aligned 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /iCGIS/include/glm/mat2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x2.hpp" 6 | #include "./ext/matrix_double2x2_precision.hpp" 7 | #include "./ext/matrix_float2x2.hpp" 8 | #include "./ext/matrix_float2x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /iCGIS/include/glm/mat2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x3.hpp" 6 | #include "./ext/matrix_double2x3_precision.hpp" 7 | #include "./ext/matrix_float2x3.hpp" 8 | #include "./ext/matrix_float2x3_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /iCGIS/include/glm/mat2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x4.hpp" 6 | #include "./ext/matrix_double2x4_precision.hpp" 7 | #include "./ext/matrix_float2x4.hpp" 8 | #include "./ext/matrix_float2x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /iCGIS/include/glm/mat3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x2.hpp" 6 | #include "./ext/matrix_double3x2_precision.hpp" 7 | #include "./ext/matrix_float3x2.hpp" 8 | #include "./ext/matrix_float3x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /iCGIS/include/glm/mat3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x3.hpp" 6 | #include "./ext/matrix_double3x3_precision.hpp" 7 | #include "./ext/matrix_float3x3.hpp" 8 | #include "./ext/matrix_float3x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /iCGIS/include/glm/mat3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x4.hpp" 6 | #include "./ext/matrix_double3x4_precision.hpp" 7 | #include "./ext/matrix_float3x4.hpp" 8 | #include "./ext/matrix_float3x4_precision.hpp" 9 | -------------------------------------------------------------------------------- /iCGIS/include/glm/mat4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x2.hpp" 6 | #include "./ext/matrix_double4x2_precision.hpp" 7 | #include "./ext/matrix_float4x2.hpp" 8 | #include "./ext/matrix_float4x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /iCGIS/include/glm/mat4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x3.hpp" 6 | #include "./ext/matrix_double4x3_precision.hpp" 7 | #include "./ext/matrix_float4x3.hpp" 8 | #include "./ext/matrix_float4x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /iCGIS/include/glm/mat4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x4.hpp" 6 | #include "./ext/matrix_double4x4_precision.hpp" 7 | #include "./ext/matrix_float4x4.hpp" 8 | #include "./ext/matrix_float4x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /iCGIS/include/glm/simd/exponential.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/experimental.h 3 | 4 | #pragma once 5 | 6 | #include "platform.h" 7 | 8 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec1_sqrt_lowp(glm_f32vec4 x) 11 | { 12 | return _mm_mul_ss(_mm_rsqrt_ss(x), x); 13 | } 14 | 15 | GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec4_sqrt_lowp(glm_f32vec4 x) 16 | { 17 | return _mm_mul_ps(_mm_rsqrt_ps(x), x); 18 | } 19 | 20 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 21 | -------------------------------------------------------------------------------- /iCGIS/include/glm/simd/packing.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/packing.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /iCGIS/include/glm/simd/trigonometric.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/trigonometric.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | -------------------------------------------------------------------------------- /iCGIS/include/glm/simd/vector_relational.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/vector_relational.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /iCGIS/include/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec2.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool2.hpp" 6 | #include "./ext/vector_bool2_precision.hpp" 7 | #include "./ext/vector_float2.hpp" 8 | #include "./ext/vector_float2_precision.hpp" 9 | #include "./ext/vector_double2.hpp" 10 | #include "./ext/vector_double2_precision.hpp" 11 | #include "./ext/vector_int2.hpp" 12 | #include "./ext/vector_int2_precision.hpp" 13 | #include "./ext/vector_uint2.hpp" 14 | #include "./ext/vector_uint2_precision.hpp" 15 | -------------------------------------------------------------------------------- /iCGIS/include/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec3.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool3.hpp" 6 | #include "./ext/vector_bool3_precision.hpp" 7 | #include "./ext/vector_float3.hpp" 8 | #include "./ext/vector_float3_precision.hpp" 9 | #include "./ext/vector_double3.hpp" 10 | #include "./ext/vector_double3_precision.hpp" 11 | #include "./ext/vector_int3.hpp" 12 | #include "./ext/vector_int3_precision.hpp" 13 | #include "./ext/vector_uint3.hpp" 14 | #include "./ext/vector_uint3_precision.hpp" 15 | -------------------------------------------------------------------------------- /iCGIS/include/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec4.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool4.hpp" 6 | #include "./ext/vector_bool4_precision.hpp" 7 | #include "./ext/vector_float4.hpp" 8 | #include "./ext/vector_float4_precision.hpp" 9 | #include "./ext/vector_double4.hpp" 10 | #include "./ext/vector_double4_precision.hpp" 11 | #include "./ext/vector_int4.hpp" 12 | #include "./ext/vector_int4_precision.hpp" 13 | #include "./ext/vector_uint4.hpp" 14 | #include "./ext/vector_uint4_precision.hpp" 15 | 16 | -------------------------------------------------------------------------------- /iCGIS/include/jsoncpp/json/autolink.h: -------------------------------------------------------------------------------- 1 | // Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors 2 | // Distributed under MIT license, or public domain if desired and 3 | // recognized in your jurisdiction. 4 | // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE 5 | 6 | #ifndef JSON_AUTOLINK_H_INCLUDED 7 | #define JSON_AUTOLINK_H_INCLUDED 8 | 9 | #include "config.h" 10 | 11 | #ifdef JSON_IN_CPPTL 12 | #include 13 | #endif 14 | 15 | #if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) && \ 16 | !defined(JSON_IN_CPPTL) 17 | #define CPPTL_AUTOLINK_NAME "json" 18 | #undef CPPTL_AUTOLINK_DLL 19 | #ifdef JSON_DLL 20 | #define CPPTL_AUTOLINK_DLL 21 | #endif 22 | #include "autolink.h" 23 | #endif 24 | 25 | #endif // JSON_AUTOLINK_H_INCLUDED 26 | -------------------------------------------------------------------------------- /iCGIS/include/jsoncpp/json/forwards.h: -------------------------------------------------------------------------------- 1 | // Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors 2 | // Distributed under MIT license, or public domain if desired and 3 | // recognized in your jurisdiction. 4 | // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE 5 | 6 | #ifndef JSON_FORWARDS_H_INCLUDED 7 | #define JSON_FORWARDS_H_INCLUDED 8 | 9 | #if !defined(JSON_IS_AMALGAMATION) 10 | #include "config.h" 11 | #endif // if !defined(JSON_IS_AMALGAMATION) 12 | 13 | namespace Json { 14 | 15 | // writer.h 16 | class StreamWriter; 17 | class StreamWriterBuilder; 18 | class Writer; 19 | class FastWriter; 20 | class StyledWriter; 21 | class StyledStreamWriter; 22 | 23 | // reader.h 24 | class Reader; 25 | class CharReader; 26 | class CharReaderBuilder; 27 | 28 | // json_features.h 29 | class Features; 30 | 31 | // value.h 32 | typedef unsigned int ArrayIndex; 33 | class StaticString; 34 | class Path; 35 | class PathArgument; 36 | class Value; 37 | class ValueIteratorBase; 38 | class ValueIterator; 39 | class ValueConstIterator; 40 | 41 | } // namespace Json 42 | 43 | #endif // JSON_FORWARDS_H_INCLUDED 44 | -------------------------------------------------------------------------------- /iCGIS/include/jsoncpp/json/json.h: -------------------------------------------------------------------------------- 1 | // Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors 2 | // Distributed under MIT license, or public domain if desired and 3 | // recognized in your jurisdiction. 4 | // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE 5 | 6 | #ifndef JSON_JSON_H_INCLUDED 7 | #define JSON_JSON_H_INCLUDED 8 | 9 | #include "autolink.h" 10 | #include "json_features.h" 11 | #include "reader.h" 12 | #include "value.h" 13 | #include "writer.h" 14 | 15 | #endif // JSON_JSON_H_INCLUDED 16 | -------------------------------------------------------------------------------- /iCGIS/include/jsoncpp/json/version.h: -------------------------------------------------------------------------------- 1 | #ifndef JSON_VERSION_H_INCLUDED 2 | #define JSON_VERSION_H_INCLUDED 3 | 4 | // Note: version must be updated in three places when doing a release. This 5 | // annoying process ensures that amalgamate, CMake, and meson all report the 6 | // correct version. 7 | // 1. /meson.build 8 | // 2. /include/json/version.h 9 | // 3. /CMakeLists.txt 10 | // IMPORTANT: also update the SOVERSION!! 11 | 12 | #define JSONCPP_VERSION_STRING "1.9.2" 13 | #define JSONCPP_VERSION_MAJOR 1 14 | #define JSONCPP_VERSION_MINOR 9 15 | #define JSONCPP_VERSION_PATCH 2 16 | #define JSONCPP_VERSION_QUALIFIER 17 | #define JSONCPP_VERSION_HEXA \ 18 | ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | \ 19 | (JSONCPP_VERSION_PATCH << 8)) 20 | 21 | #ifdef JSONCPP_USING_SECURE_MEMORY 22 | #undef JSONCPP_USING_SECURE_MEMORY 23 | #endif 24 | #define JSONCPP_USING_SECURE_MEMORY 0 25 | // If non-zero, the library zeroes any memory that it has allocated before 26 | // it frees its memory. 27 | 28 | #endif // JSON_VERSION_H_INCLUDED 29 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/details/backtracer.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | // Store log messages in circular buffer. 14 | // Useful for storing debug data in case of error/warning happens. 15 | 16 | namespace spdlog { 17 | namespace details { 18 | class backtracer 19 | { 20 | mutable std::mutex mutex_; 21 | std::atomic enabled_{false}; 22 | circular_q messages_; 23 | 24 | public: 25 | backtracer() = default; 26 | backtracer(const backtracer &other); 27 | 28 | backtracer(backtracer &&other) SPDLOG_NOEXCEPT; 29 | backtracer &operator=(backtracer other); 30 | 31 | void enable(size_t size); 32 | void disable(); 33 | bool enabled() const; 34 | void push_back(const log_msg &msg); 35 | 36 | // pop all items in the q and apply the given fun on each of them. 37 | void foreach_pop(std::function fun); 38 | }; 39 | 40 | } // namespace details 41 | } // namespace spdlog 42 | 43 | #ifdef SPDLOG_HEADER_ONLY 44 | #include "backtracer-inl.h" 45 | #endif -------------------------------------------------------------------------------- /iCGIS/include/spdlog/details/console_globals.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | 12 | struct console_mutex 13 | { 14 | using mutex_t = std::mutex; 15 | static mutex_t &mutex() 16 | { 17 | static mutex_t s_mutex; 18 | return s_mutex; 19 | } 20 | }; 21 | 22 | struct console_nullmutex 23 | { 24 | using mutex_t = null_mutex; 25 | static mutex_t &mutex() 26 | { 27 | static mutex_t s_mutex; 28 | return s_mutex; 29 | } 30 | }; 31 | } // namespace details 32 | } // namespace spdlog 33 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/details/log_msg-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | 12 | namespace spdlog { 13 | namespace details { 14 | 15 | SPDLOG_INLINE log_msg::log_msg(spdlog::source_loc loc, string_view_t logger_name, spdlog::level::level_enum lvl, spdlog::string_view_t msg) 16 | : logger_name(logger_name) 17 | , level(lvl) 18 | , time(os::now()) 19 | #ifndef SPDLOG_NO_THREAD_ID 20 | , thread_id(os::thread_id()) 21 | #endif 22 | , source(loc) 23 | , payload(msg) 24 | {} 25 | 26 | SPDLOG_INLINE log_msg::log_msg(string_view_t logger_name, spdlog::level::level_enum lvl, spdlog::string_view_t msg) 27 | : log_msg(source_loc{}, logger_name, lvl, msg) 28 | {} 29 | 30 | } // namespace details 31 | } // namespace spdlog 32 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/details/log_msg.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | struct log_msg 12 | { 13 | log_msg() = default; 14 | log_msg(source_loc loc, string_view_t logger_name, level::level_enum lvl, string_view_t msg); 15 | log_msg(string_view_t logger_name, level::level_enum lvl, string_view_t msg); 16 | log_msg(const log_msg &other) = default; 17 | 18 | string_view_t logger_name; 19 | level::level_enum level{level::off}; 20 | log_clock::time_point time; 21 | size_t thread_id{0}; 22 | 23 | // wrapping the formatted text with color (updated by pattern_formatter). 24 | mutable size_t color_range_start{0}; 25 | mutable size_t color_range_end{0}; 26 | 27 | source_loc source; 28 | string_view_t payload; 29 | }; 30 | } // namespace details 31 | } // namespace spdlog 32 | 33 | #ifdef SPDLOG_HEADER_ONLY 34 | #include "log_msg-inl.h" 35 | #endif 36 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/details/log_msg_buffer.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | namespace spdlog { 9 | namespace details { 10 | 11 | // Extend log_msg with internal buffer to store its payload. 12 | // THis is needed since log_msg holds string_views that points to stack data. 13 | 14 | class log_msg_buffer : public log_msg 15 | { 16 | memory_buf_t buffer; 17 | void update_string_views(); 18 | 19 | public: 20 | log_msg_buffer() = default; 21 | explicit log_msg_buffer(const log_msg &orig_msg); 22 | log_msg_buffer(const log_msg_buffer &other); 23 | log_msg_buffer(log_msg_buffer &&other) SPDLOG_NOEXCEPT; 24 | log_msg_buffer &operator=(const log_msg_buffer &other); 25 | log_msg_buffer &operator=(log_msg_buffer &&other) SPDLOG_NOEXCEPT; 26 | }; 27 | 28 | } // namespace details 29 | } // namespace spdlog 30 | 31 | #ifdef SPDLOG_HEADER_ONLY 32 | #include "log_msg_buffer-inl.h" 33 | #endif 34 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/details/null_mutex.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | // null, no cost dummy "mutex" and dummy "atomic" int 9 | 10 | namespace spdlog { 11 | namespace details { 12 | struct null_mutex 13 | { 14 | void lock() const {} 15 | void unlock() const {} 16 | bool try_lock() const 17 | { 18 | return true; 19 | } 20 | }; 21 | 22 | struct null_atomic_int 23 | { 24 | int value; 25 | null_atomic_int() = default; 26 | 27 | explicit null_atomic_int(int new_value) 28 | : value(new_value) 29 | {} 30 | 31 | int load(std::memory_order = std::memory_order_relaxed) const 32 | { 33 | return value; 34 | } 35 | 36 | void store(int new_value, std::memory_order = std::memory_order_relaxed) 37 | { 38 | value = new_value; 39 | } 40 | 41 | int exchange(int new_value, std::memory_order = std::memory_order_relaxed) 42 | { 43 | std::swap(new_value, value); 44 | return new_value; // return value before the call 45 | } 46 | }; 47 | 48 | } // namespace details 49 | } // namespace spdlog 50 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/details/periodic_worker-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | namespace spdlog { 11 | namespace details { 12 | 13 | SPDLOG_INLINE periodic_worker::periodic_worker(const std::function &callback_fun, std::chrono::seconds interval) 14 | { 15 | active_ = (interval > std::chrono::seconds::zero()); 16 | if (!active_) 17 | { 18 | return; 19 | } 20 | 21 | worker_thread_ = std::thread([this, callback_fun, interval]() { 22 | for (;;) 23 | { 24 | std::unique_lock lock(this->mutex_); 25 | if (this->cv_.wait_for(lock, interval, [this] { return !this->active_; })) 26 | { 27 | return; // active_ == false, so exit this thread 28 | } 29 | callback_fun(); 30 | } 31 | }); 32 | } 33 | 34 | // stop the worker thread and join it 35 | SPDLOG_INLINE periodic_worker::~periodic_worker() 36 | { 37 | if (worker_thread_.joinable()) 38 | { 39 | { 40 | std::lock_guard lock(mutex_); 41 | active_ = false; 42 | } 43 | cv_.notify_one(); 44 | worker_thread_.join(); 45 | } 46 | } 47 | 48 | } // namespace details 49 | } // namespace spdlog 50 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/details/periodic_worker.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | // periodic worker thread - periodically executes the given callback function. 7 | // 8 | // RAII over the owned thread: 9 | // creates the thread on construction. 10 | // stops and joins the thread on destruction (if the thread is executing a callback, wait for it to finish first). 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | namespace spdlog { 18 | namespace details { 19 | 20 | class periodic_worker 21 | { 22 | public: 23 | periodic_worker(const std::function &callback_fun, std::chrono::seconds interval); 24 | periodic_worker(const periodic_worker &) = delete; 25 | periodic_worker &operator=(const periodic_worker &) = delete; 26 | // stop the worker thread and join it 27 | ~periodic_worker(); 28 | 29 | private: 30 | bool active_; 31 | std::thread worker_thread_; 32 | std::mutex mutex_; 33 | std::condition_variable cv_; 34 | }; 35 | } // namespace details 36 | } // namespace spdlog 37 | 38 | #ifdef SPDLOG_HEADER_ONLY 39 | #include "periodic_worker-inl.h" 40 | #endif 41 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/details/synchronous_factory.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "registry.h" 7 | 8 | namespace spdlog { 9 | 10 | // Default logger factory- creates synchronous loggers 11 | class logger; 12 | 13 | struct synchronous_factory 14 | { 15 | template 16 | static std::shared_ptr create(std::string logger_name, SinkArgs &&... args) 17 | { 18 | auto sink = std::make_shared(std::forward(args)...); 19 | auto new_logger = std::make_shared(std::move(logger_name), std::move(sink)); 20 | details::registry::instance().initialize_logger(new_logger); 21 | return new_logger; 22 | } 23 | }; 24 | } // namespace spdlog -------------------------------------------------------------------------------- /iCGIS/include/spdlog/fmt/fmt.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2018 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | // 9 | // Include a bundled header-only copy of fmtlib or an external one. 10 | // By default spdlog include its own copy. 11 | // 12 | 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #ifndef FMT_USE_WINDOWS_H 20 | #define FMT_USE_WINDOWS_H 0 21 | #endif 22 | #include "bundled/core.h" 23 | #include "bundled/format.h" 24 | #else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib 25 | #include 26 | #include 27 | #endif 28 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/fmt/ostr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ostream support 9 | // 10 | #if !defined(SPDLOG_FMT_EXTERNAL) 11 | #ifndef FMT_HEADER_ONLY 12 | #define FMT_HEADER_ONLY 13 | #endif 14 | #include "bundled/ostream.h" 15 | #include "fmt.h" 16 | #else 17 | #include 18 | #endif 19 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/formatter.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | 11 | class formatter 12 | { 13 | public: 14 | virtual ~formatter() = default; 15 | virtual void format(const details::log_msg &msg, memory_buf_t &dest) = 0; 16 | virtual std::unique_ptr clone() const = 0; 17 | }; 18 | } // namespace spdlog 19 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/sinks/basic_file_sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | namespace spdlog { 14 | namespace sinks { 15 | 16 | template 17 | SPDLOG_INLINE basic_file_sink::basic_file_sink(const filename_t &filename, bool truncate) 18 | { 19 | file_helper_.open(filename, truncate); 20 | } 21 | 22 | template 23 | SPDLOG_INLINE const filename_t &basic_file_sink::filename() const 24 | { 25 | return file_helper_.filename(); 26 | } 27 | 28 | template 29 | SPDLOG_INLINE void basic_file_sink::sink_it_(const details::log_msg &msg) 30 | { 31 | memory_buf_t formatted; 32 | base_sink::formatter_->format(msg, formatted); 33 | file_helper_.write(formatted); 34 | } 35 | 36 | template 37 | SPDLOG_INLINE void basic_file_sink::flush_() 38 | { 39 | file_helper_.flush(); 40 | } 41 | 42 | } // namespace sinks 43 | } // namespace spdlog 44 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/sinks/msvc_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2016 Alexander Dalshov. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #if defined(_WIN32) 7 | 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | namespace spdlog { 17 | namespace sinks { 18 | /* 19 | * MSVC sink (logging using OutputDebugStringA) 20 | */ 21 | template 22 | class msvc_sink : public base_sink 23 | { 24 | public: 25 | explicit msvc_sink() {} 26 | 27 | protected: 28 | void sink_it_(const details::log_msg &msg) override 29 | { 30 | 31 | memory_buf_t formatted; 32 | base_sink::formatter_->format(msg, formatted); 33 | OutputDebugStringA(fmt::to_string(formatted).c_str()); 34 | } 35 | 36 | void flush_() override {} 37 | }; 38 | 39 | using msvc_sink_mt = msvc_sink; 40 | using msvc_sink_st = msvc_sink; 41 | 42 | using windebug_sink_mt = msvc_sink_mt; 43 | using windebug_sink_st = msvc_sink_st; 44 | 45 | } // namespace sinks 46 | } // namespace spdlog 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/sinks/null_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | namespace spdlog { 13 | namespace sinks { 14 | 15 | template 16 | class null_sink : public base_sink 17 | { 18 | protected: 19 | void sink_it_(const details::log_msg &) override {} 20 | void flush_() override {} 21 | }; 22 | 23 | using null_sink_mt = null_sink; 24 | using null_sink_st = null_sink; 25 | 26 | } // namespace sinks 27 | 28 | template 29 | inline std::shared_ptr null_logger_mt(const std::string &logger_name) 30 | { 31 | auto null_logger = Factory::template create(logger_name); 32 | null_logger->set_level(level::off); 33 | return null_logger; 34 | } 35 | 36 | template 37 | inline std::shared_ptr null_logger_st(const std::string &logger_name) 38 | { 39 | auto null_logger = Factory::template create(logger_name); 40 | null_logger->set_level(level::off); 41 | return null_logger; 42 | } 43 | 44 | } // namespace spdlog 45 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/sinks/ostream_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | namespace spdlog { 13 | namespace sinks { 14 | template 15 | class ostream_sink final : public base_sink 16 | { 17 | public: 18 | explicit ostream_sink(std::ostream &os, bool force_flush = false) 19 | : ostream_(os) 20 | , force_flush_(force_flush) 21 | {} 22 | ostream_sink(const ostream_sink &) = delete; 23 | ostream_sink &operator=(const ostream_sink &) = delete; 24 | 25 | protected: 26 | void sink_it_(const details::log_msg &msg) override 27 | { 28 | memory_buf_t formatted; 29 | base_sink::formatter_->format(msg, formatted); 30 | ostream_.write(formatted.data(), static_cast(formatted.size())); 31 | if (force_flush_) 32 | { 33 | ostream_.flush(); 34 | } 35 | } 36 | 37 | void flush_() override 38 | { 39 | ostream_.flush(); 40 | } 41 | 42 | std::ostream &ostream_; 43 | bool force_flush_; 44 | }; 45 | 46 | using ostream_sink_mt = ostream_sink; 47 | using ostream_sink_st = ostream_sink; 48 | 49 | } // namespace sinks 50 | } // namespace spdlog 51 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/sinks/sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | 12 | SPDLOG_INLINE bool spdlog::sinks::sink::should_log(spdlog::level::level_enum msg_level) const 13 | { 14 | return msg_level >= level_.load(std::memory_order_relaxed); 15 | } 16 | 17 | SPDLOG_INLINE void spdlog::sinks::sink::set_level(level::level_enum log_level) 18 | { 19 | level_.store(log_level, std::memory_order_relaxed); 20 | } 21 | 22 | SPDLOG_INLINE spdlog::level::level_enum spdlog::sinks::sink::level() const 23 | { 24 | return static_cast(level_.load(std::memory_order_relaxed)); 25 | } 26 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/sinks/sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | 11 | namespace sinks { 12 | class sink 13 | { 14 | public: 15 | virtual ~sink() = default; 16 | virtual void log(const details::log_msg &msg) = 0; 17 | virtual void flush() = 0; 18 | virtual void set_pattern(const std::string &pattern) = 0; 19 | virtual void set_formatter(std::unique_ptr sink_formatter) = 0; 20 | 21 | void set_level(level::level_enum log_level); 22 | level::level_enum level() const; 23 | bool should_log(level::level_enum msg_level) const; 24 | 25 | protected: 26 | // sink log level - default is all 27 | level_t level_{level::trace}; 28 | }; 29 | 30 | } // namespace sinks 31 | } // namespace spdlog 32 | 33 | #ifdef SPDLOG_HEADER_ONLY 34 | #include "sink-inl.h" 35 | #endif 36 | -------------------------------------------------------------------------------- /iCGIS/include/spdlog/sinks/stdout_color_sinks-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | namespace spdlog { 14 | 15 | template 16 | SPDLOG_INLINE std::shared_ptr stdout_color_mt(const std::string &logger_name, color_mode mode) 17 | { 18 | return Factory::template create(logger_name, mode); 19 | } 20 | 21 | template 22 | SPDLOG_INLINE std::shared_ptr stdout_color_st(const std::string &logger_name, color_mode mode) 23 | { 24 | return Factory::template create(logger_name, mode); 25 | } 26 | 27 | template 28 | SPDLOG_INLINE std::shared_ptr stderr_color_mt(const std::string &logger_name, color_mode mode) 29 | { 30 | return Factory::template create(logger_name, mode); 31 | } 32 | 33 | template 34 | SPDLOG_INLINE std::shared_ptr stderr_color_st(const std::string &logger_name, color_mode mode) 35 | { 36 | return Factory::template create(logger_name, mode); 37 | } 38 | } // namespace spdlog -------------------------------------------------------------------------------- /iCGIS/include/spdlog/version.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #define SPDLOG_VER_MAJOR 1 7 | #define SPDLOG_VER_MINOR 4 8 | #define SPDLOG_VER_PATCH 3 9 | 10 | #define SPDLOG_VERSION (SPDLOG_VER_MAJOR * 10000 + SPDLOG_VER_MINOR * 100 + SPDLOG_VER_PATCH) 11 | -------------------------------------------------------------------------------- /iCGIS/lib/gdal_i.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/lib/gdal_i.lib -------------------------------------------------------------------------------- /iCGIS/lib/glew32s.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/lib/glew32s.lib -------------------------------------------------------------------------------- /iCGIS/lib/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/lib/glfw3.lib -------------------------------------------------------------------------------- /iCGIS/lib/jsoncpp.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/lib/jsoncpp.lib -------------------------------------------------------------------------------- /iCGIS/lib/jsoncppd.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/lib/jsoncppd.lib -------------------------------------------------------------------------------- /iCGIS/lib/spdlog.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/lib/spdlog.lib -------------------------------------------------------------------------------- /iCGIS/res/icons/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/Thumbs.db -------------------------------------------------------------------------------- /iCGIS/res/icons/Thumbs.db:encryptable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/Thumbs.db:encryptable -------------------------------------------------------------------------------- /iCGIS/res/icons/app_32x32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/app_32x32.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/app_64x64.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/app_64x64.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/check-hov.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/check-hov.png -------------------------------------------------------------------------------- /iCGIS/res/icons/check-nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/check-nor.png -------------------------------------------------------------------------------- /iCGIS/res/icons/check-part.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/check-part.png -------------------------------------------------------------------------------- /iCGIS/res/icons/check-sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/check-sel.png -------------------------------------------------------------------------------- /iCGIS/res/icons/clear-text-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/clear-text-hover.png -------------------------------------------------------------------------------- /iCGIS/res/icons/clear-text.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/clear-text.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/clear-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/clear-text.png -------------------------------------------------------------------------------- /iCGIS/res/icons/clear.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/clear.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/color-palette.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/color-palette.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/connect-db.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/connect-db.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/developer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/developer.png -------------------------------------------------------------------------------- /iCGIS/res/icons/developer_64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/developer_64x64.png -------------------------------------------------------------------------------- /iCGIS/res/icons/editing-arrow.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/editing-arrow.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/geojson.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/geojson.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/layer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/layer.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/log.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/log.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/map-2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/map-2.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/map.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/map.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/new.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/new.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/normal-arrow.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/normal-arrow.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/open.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/open.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/palm.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/palm.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/postgresql.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/postgresql.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/remove.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/remove.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/rename.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/rename.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/rotate.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/rotate.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/search-focus-in.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/search-focus-in.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/search-focus-out.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/search-focus-out.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/search-hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/search-hover.png -------------------------------------------------------------------------------- /iCGIS/res/icons/search-press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/search-press.png -------------------------------------------------------------------------------- /iCGIS/res/icons/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/search.png -------------------------------------------------------------------------------- /iCGIS/res/icons/shapefile.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/shapefile.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/shapefilex.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/shapefilex.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/show-less.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/show-less.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/show-more.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/show-more.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/start-editing.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/start-editing.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/stop-editing.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/stop-editing.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/table.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/table.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/tiff.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/tiff.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/tool.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/tool.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/toolbox.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/toolbox.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/what-is-this.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/what-is-this.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/what-is-this.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/what-is-this.png -------------------------------------------------------------------------------- /iCGIS/res/icons/zoom-to-layer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/zoom-to-layer.ico -------------------------------------------------------------------------------- /iCGIS/res/icons/zoom-to-map.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/res/icons/zoom-to-map.ico -------------------------------------------------------------------------------- /iCGIS/res/shaders/border_frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | uniform vec3 u_borderColor; 4 | 5 | void main() 6 | { 7 | gl_FragColor = vec4(u_borderColor, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /iCGIS/res/shaders/border_vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | layout (location = 0) in vec2 position; 4 | layout (location = 1) in vec3 color; 5 | 6 | uniform mat4 u_MVP; 7 | 8 | void main() 9 | { 10 | gl_Position = u_MVP * vec4(position, 0.0, 1.0); 11 | } 12 | -------------------------------------------------------------------------------- /iCGIS/res/shaders/highlight_frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | uniform vec3 u_highlightColor; 4 | 5 | void main() 6 | { 7 | gl_FragColor = vec4(u_highlightColor, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /iCGIS/res/shaders/highlight_vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | layout (location = 0) in vec2 position; 4 | 5 | uniform mat4 u_MVP; 6 | 7 | void main() 8 | { 9 | gl_Position = u_MVP * vec4(position, 0.0, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /iCGIS/res/shaders/line_frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | in vec3 fragcolor; 4 | 5 | void main() 6 | { 7 | gl_FragColor = vec4(fragcolor, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /iCGIS/res/shaders/line_vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | layout (location = 0) in vec2 position; 4 | layout (location = 1) in vec3 vertexcolor; 5 | 6 | out vec3 fragcolor; 7 | 8 | uniform mat4 u_MVP; 9 | 10 | void main() 11 | { 12 | gl_Position = u_MVP * vec4(position, 0.0, 1.0); 13 | fragcolor = vertexcolor; 14 | } 15 | -------------------------------------------------------------------------------- /iCGIS/res/shaders/point_frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | in vec3 fragcolor; 4 | 5 | void main() 6 | { 7 | gl_FragColor = vec4(fragcolor, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /iCGIS/res/shaders/point_vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | layout (location = 0) in vec2 position; 4 | layout (location = 1) in vec3 vertexcolor; 5 | 6 | out vec3 fragcolor; 7 | 8 | uniform mat4 u_MVP; 9 | 10 | void main() 11 | { 12 | gl_Position = u_MVP * vec4(position, 0.0, 1.0); 13 | fragcolor = vertexcolor; 14 | } 15 | -------------------------------------------------------------------------------- /iCGIS/res/shaders/polygon_frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | in vec3 fragcolor; 4 | 5 | void main() 6 | { 7 | gl_FragColor = vec4(fragcolor, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /iCGIS/res/shaders/polygon_vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | layout (location = 0) in vec2 position; 4 | layout (location = 1) in vec3 vertexcolor; 5 | 6 | out vec3 fragcolor; 7 | 8 | uniform mat4 u_MVP; 9 | 10 | void main() 11 | { 12 | gl_Position = u_MVP * vec4(position, 0.0, 1.0); 13 | fragcolor = vertexcolor; 14 | } 15 | -------------------------------------------------------------------------------- /iCGIS/res/shaders/texture_frag.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | out vec4 FragColor; 3 | 4 | in vec2 texCoord; 5 | 6 | uniform sampler2D ourTexture; 7 | 8 | void main() 9 | { 10 | FragColor = texture(ourTexture, texCoord); 11 | } 12 | -------------------------------------------------------------------------------- /iCGIS/res/shaders/texture_vert.glsl: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | layout (location = 0) in vec2 aPosition; 3 | layout (location = 1) in vec2 aTexCoord; 4 | 5 | out vec2 texCoord; 6 | 7 | uniform mat4 u_MVP; 8 | 9 | void main() 10 | { 11 | gl_Position = u_MVP * vec4(aPosition, 0.0, 1.0); 12 | //texCoord = (u_MVP * vec4(aTexCoord, 0.0, 1.0)).xy; 13 | texCoord = aTexCoord; 14 | } 15 | 16 | -------------------------------------------------------------------------------- /iCGIS/src/dialog/aboutdialog.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** Dialog: AboutDialog 3 | ** 4 | ** description: About the program and the author 5 | ** 6 | ** last change: 2020-03-26 7 | *******************************************************/ 8 | #ifndef ABOUTDIALOG_H 9 | #define ABOUTDIALOG_H 10 | 11 | #include 12 | 13 | class AboutDialog : public QDialog 14 | { 15 | Q_OBJECT 16 | public: 17 | AboutDialog(QWidget* parent = nullptr); 18 | 19 | public: 20 | void setupLayout(); 21 | }; 22 | 23 | #endif // ABOUTDIALOG_H 24 | -------------------------------------------------------------------------------- /iCGIS/src/dialog/headerviewwithcheckbox.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | ** class name: HeaderViewWidthCheckbox 3 | ** 4 | ** description: Inherited from QHeaderView, add checkbox to first column 5 | ** Used in filel: dialog/postgresqltableselect.h 6 | ** 7 | ** last change: 2020-01-02 8 | ********************************************************************************/ 9 | #pragma once 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | 17 | class HeaderViewWithCheckbox : public QHeaderView 18 | { 19 | Q_OBJECT 20 | public: 21 | explicit HeaderViewWithCheckbox(int checkColIndex, Qt::Orientation orientation, 22 | QWidget* parent = nullptr); 23 | 24 | signals: 25 | void headCheckboxToggled(Qt::CheckState checkState); 26 | 27 | public slots: 28 | void updateCheckState(Qt::CheckState checkState); 29 | 30 | protected: 31 | void paintSection(QPainter* painter, const QRect& rect, int logicalIndex) const override; 32 | void mousePressEvent(QMouseEvent *event) override; 33 | void mouseMoveEvent(QMouseEvent *event) override; 34 | 35 | private: 36 | Qt::CheckState checkState; 37 | QPoint mousePoint; 38 | int checkColIndex; 39 | mutable QRect rectHeaderCheckBox; 40 | }; 41 | -------------------------------------------------------------------------------- /iCGIS/src/dialog/layerattributetabledialog.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: LayerAttributeTableDialog 3 | ** 4 | ** description: Layer's attribute table 5 | ** 6 | ** last change: 2020-03-28 7 | *******************************************************/ 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | class GeoFeatureLayer; 17 | 18 | 19 | class LayerAttributeTableDialog : public QDialog 20 | { 21 | Q_OBJECT 22 | public: 23 | LayerAttributeTableDialog(GeoFeatureLayer* layerIn, QWidget *parent); 24 | ~LayerAttributeTableDialog(); 25 | 26 | signals: 27 | void sigUpdateOpengl(); 28 | 29 | public slots: 30 | void onUpdate(); 31 | void onSelectRows(); 32 | void onRemoveSelected(); 33 | void onClearSelected(); 34 | 35 | public: 36 | void createWidgets(); 37 | void createActions(); 38 | void createToolBar(); 39 | void setupLayout(); 40 | 41 | private: 42 | void readAttributeTable(); 43 | 44 | private: 45 | GeoFeatureLayer* layer; 46 | 47 | // widgets 48 | QTableWidget* tableWidget; 49 | 50 | // toolBar 51 | QToolBar* toolBar; 52 | 53 | // actions 54 | QAction* clearSelectedAction; 55 | QAction* removeRecorsdAction; 56 | }; 57 | -------------------------------------------------------------------------------- /iCGIS/src/dialog/newmapdialog.h: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | ** class name: NewMapDialog 3 | ** 4 | ** description: Dialog: Create new map 5 | ** 6 | ** last change: 2020-03-29 7 | ***************************************************************/ 8 | #ifndef NEWMAPDIALOG_H 9 | #define NEWMAPDIALOG_H 10 | 11 | #include 12 | #include 13 | 14 | 15 | class NewMapDialog : public QDialog 16 | { 17 | Q_OBJECT 18 | public: 19 | NewMapDialog(QWidget* parent = nullptr); 20 | 21 | signals: 22 | void sigNewMap(const QString& name, const QString& path); 23 | 24 | public: 25 | void setupLayout(); 26 | 27 | public slots: 28 | void onChooseFolder(); 29 | void onBtnOk(); 30 | 31 | private: 32 | QLineEdit* editMapName; 33 | QLineEdit* editPath; 34 | }; 35 | 36 | #endif // NEWMAPDIALOG_H 37 | -------------------------------------------------------------------------------- /iCGIS/src/dialog/viewlog.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: ViewLog 3 | ** 4 | ** description: Show logs 5 | ** 6 | ** last change: 2020-01-02 7 | *******************************************************/ 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include 21 | 22 | struct LogLevelColor { 23 | void set(const char* levelStr, const QColor& colorIn) { 24 | snprintf(level, 12, levelStr, strlen(levelStr)); 25 | color = colorIn; 26 | } 27 | char level[12] = { 0 }; 28 | QColor color; 29 | }; 30 | 31 | 32 | class ViewLog : public QDialog 33 | { 34 | Q_OBJECT 35 | public: 36 | ViewLog(QWidget *parent); 37 | ~ViewLog(); 38 | 39 | // layout 40 | void setupLayout(); 41 | 42 | // Highlight log leve: Error, warning, trace, info, debug 43 | void highlightText(); 44 | 45 | void readLogFile(); 46 | 47 | public slots: 48 | // check log file every 500ms 49 | void handleTimeout(); 50 | 51 | public: 52 | QTextEdit* logText; 53 | 54 | private: 55 | QTimer* timer; 56 | QFileInfo logFileInfo; 57 | LogLevelColor levelColor[6]; 58 | QDateTime lastModifiedTime; 59 | const char* logFilePath = "logs/basic-logger.txt"; 60 | }; 61 | -------------------------------------------------------------------------------- /iCGIS/src/dialog/whatisthisdialog.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: WhatIsThisDialog 3 | ** 4 | ** description: show current selected feature's info 5 | ** 6 | ** last change: 2020-03-26 7 | *******************************************************/ 8 | #ifndef WHATISTHISDIALOG_H 9 | #define WHATISTHISDIALOG_H 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | class GeoFeatureLayer; 18 | class GeoFeature; 19 | 20 | 21 | class WhatIsThisDialog : public QDialog 22 | { 23 | Q_OBJECT 24 | public: 25 | WhatIsThisDialog(QWidget* parent = nullptr); 26 | 27 | public: 28 | void setupLayout(); 29 | void setFeature(GeoFeatureLayer* layer, GeoFeature* feature); 30 | 31 | signals: 32 | void closed(); 33 | 34 | protected: 35 | virtual void closeEvent(QCloseEvent *) override; 36 | 37 | private: 38 | // feature 39 | QLabel* labelFID; 40 | QLabel* labelExtentMinX; 41 | QLabel* labelExtentMaxX; 42 | QLabel* labelExtentMinY; 43 | QLabel* labelExtentMaxY; 44 | QLabel* labelGeomType; 45 | 46 | // parent 47 | // belong to layer 48 | QLabel* labelLayerName; 49 | 50 | // Button 51 | // Show more info 52 | QPushButton* btnShowMore; 53 | 54 | // attribute 55 | QTableWidget* attributeTable; 56 | QHBoxLayout* attributeTableLayout; 57 | }; 58 | 59 | #endif // WHATISTHISDIALOG_H 60 | -------------------------------------------------------------------------------- /iCGIS/src/geo/geometry/geogeometry.cpp: -------------------------------------------------------------------------------- 1 | #include "geo/geometry/geogeometry.h" 2 | 3 | GeoGeometry::~GeoGeometry() { 4 | 5 | } 6 | 7 | void GeoGeometry::rotate(double centerX, double centerY, double angle) { 8 | rotate(centerX, centerY, sin(angle * PI / 180.0), cos(angle * PI / 180.0)); 9 | } 10 | 11 | void GeoGeometry::rotate(double sinAngle, double cosAngle) { 12 | GeoExtent extent = getExtent(); 13 | rotate(extent.centerX(), extent.centerY(), sinAngle, cosAngle); 14 | } 15 | 16 | void GeoGeometry::rotate(double angle) { 17 | GeoExtent extent = getExtent(); 18 | rotate(extent.centerX(), extent.centerY(), angle); 19 | } 20 | -------------------------------------------------------------------------------- /iCGIS/src/geo/geometry/geolinearring.cpp: -------------------------------------------------------------------------------- 1 | #include "geogeometry.h" 2 | 3 | 4 | GeoLinearRing::GeoLinearRing(const GeoLinearRing& rhs) 5 | : GeoLineString(rhs) 6 | { 7 | } 8 | 9 | GeoGeometry* GeoLinearRing::copy() { 10 | return new GeoLinearRing(*this); 11 | } 12 | 13 | 14 | bool GeoLinearRing::isClockwise() const 15 | { 16 | // TODO... 17 | return true; 18 | } 19 | 20 | // force to close the ring 21 | void GeoLinearRing::closeRings() 22 | { 23 | int nPoints = points.size(); 24 | if (nPoints < 2) 25 | return; 26 | 27 | if (!utils::isEqual(getX(0), getX(nPoints - 1)) 28 | || !utils::isEqual(getY(0), getY(nPoints - 1))) 29 | { 30 | addPoint(getX(0), getY(0)); 31 | } 32 | } 33 | 34 | 35 | /* Override */ 36 | 37 | GeometryType GeoLinearRing::getGeometryType() const 38 | { 39 | return kLinearRing; 40 | } 41 | 42 | const char* GeoLinearRing::getGeometryName() const 43 | { 44 | return "LINEARRING"; 45 | } 46 | -------------------------------------------------------------------------------- /iCGIS/src/geo/geometry/geomultilinestring.cpp: -------------------------------------------------------------------------------- 1 | #include "geogeometry.h" 2 | 3 | GeoMultiLineString::GeoMultiLineString(const GeoMultiLineString& rhs) 4 | : GeoGeometryCollection(rhs) 5 | { 6 | } 7 | 8 | GeoGeometry* GeoMultiLineString::copy() { 9 | return new GeoMultiLineString(*this); 10 | } 11 | 12 | GeometryType GeoMultiLineString::getGeometryType() const 13 | { 14 | return kMultiLineString; 15 | } 16 | 17 | const char* GeoMultiLineString::getGeometryName() const 18 | { 19 | return "MULTILINESTRING"; 20 | } 21 | -------------------------------------------------------------------------------- /iCGIS/src/geo/geometry/geomultipoint.cpp: -------------------------------------------------------------------------------- 1 | #include "geogeometry.h" 2 | 3 | GeoMultiPoint::GeoMultiPoint(const GeoMultiPoint& rhs) 4 | : GeoGeometryCollection(rhs) 5 | { 6 | } 7 | 8 | GeoGeometry* GeoMultiPoint::copy() { 9 | return new GeoMultiPoint(*this); 10 | } 11 | 12 | GeometryType GeoMultiPoint::getGeometryType() const 13 | { 14 | return kMultiPoint; 15 | } 16 | 17 | const char* GeoMultiPoint::getGeometryName() const 18 | { 19 | return "MULTIPOINT"; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /iCGIS/src/geo/geometry/geomultipolygon.cpp: -------------------------------------------------------------------------------- 1 | #include "geogeometry.h" 2 | 3 | 4 | GeoMultiPolygon::GeoMultiPolygon(const GeoMultiPolygon& rhs) 5 | : GeoGeometryCollection(rhs) 6 | { 7 | } 8 | 9 | GeoGeometry* GeoMultiPolygon::copy() { 10 | return new GeoMultiPolygon(*this); 11 | } 12 | 13 | 14 | GeometryType GeoMultiPolygon::getGeometryType() const 15 | { 16 | return kMultiPolygon; 17 | } 18 | 19 | const char* GeoMultiPolygon::getGeometryName() const 20 | { 21 | return "MULTIPOLYGON"; 22 | } 23 | 24 | int GeoMultiPolygon::getNumLinearRings() const 25 | { 26 | int polygonsCount = getNumGeometries(); 27 | int linearRingsCount = 0; 28 | for (int i = 0; i < polygonsCount; ++i) { 29 | linearRingsCount += (getPolygon(i)->getInteriorRingsCount() + 1); 30 | } 31 | return linearRingsCount; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /iCGIS/src/geo/geometry/geopoint.cpp: -------------------------------------------------------------------------------- 1 | #include "geogeometry.h" 2 | 3 | #include 4 | 5 | 6 | GeoPoint::GeoPoint() : 7 | x(0.0f), y(0.0f) 8 | { 9 | } 10 | 11 | GeoPoint::GeoPoint(double xx, double yy) : 12 | x(xx), y(yy) 13 | { 14 | } 15 | 16 | GeoGeometry* GeoPoint::copy() { 17 | return (new GeoPoint(this->x, this->y)); 18 | } 19 | 20 | GeometryType GeoPoint::getGeometryType() const 21 | { 22 | return kPoint; 23 | } 24 | 25 | const char* GeoPoint::getGeometryName() const 26 | { 27 | return "POINT"; 28 | } 29 | 30 | int GeoPoint::getNumPoints() const 31 | { 32 | return 1; 33 | } 34 | 35 | GeoExtent GeoPoint::getExtent() const 36 | { 37 | return { x, x, y, y }; 38 | } 39 | 40 | bool GeoPoint::isEmpty() const 41 | { 42 | return false; 43 | } 44 | 45 | void GeoPoint::swapXY() 46 | { 47 | std::swap(x, y); 48 | } 49 | 50 | void GeoPoint::offset(double xOffset, double yOffset) { 51 | x += xOffset; 52 | y += yOffset; 53 | } 54 | -------------------------------------------------------------------------------- /iCGIS/src/geo/index/grid.cpp: -------------------------------------------------------------------------------- 1 | #include "grid.h" -------------------------------------------------------------------------------- /iCGIS/src/geo/index/grid.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: Grid 3 | ** 4 | ** description: Used in grid index 5 | ** 6 | ** last change: 2020-01-02 7 | *******************************************************/ 8 | #pragma once 9 | 10 | #include "geo/geo_base.hpp" 11 | #include "geo/map/geofeature.h" 12 | 13 | #include 14 | 15 | class Grid { 16 | public: 17 | Grid(int id) : id(id) {} 18 | Grid(int id, const GeoExtent& extent) 19 | : id(id), extent(extent) {} 20 | 21 | int getId() const { return id; } 22 | const GeoExtent& getExtent() const { return extent; } 23 | GeoFeature* getFeature(int idx) const { return featuresList[idx]; } 24 | int getFeatureCount() const { return featuresList.size(); } 25 | 26 | void setExtent(const GeoExtent& extentIn) { extent = extentIn; } 27 | void addFeature(GeoFeature* feature) { featuresList.push_back(feature); } 28 | 29 | void adjustToFit() { featuresList.shrink_to_fit(); } 30 | 31 | private: 32 | int id; 33 | GeoExtent extent; 34 | std::vector featuresList; 35 | }; 36 | -------------------------------------------------------------------------------- /iCGIS/src/geo/index/spatialindex.cpp: -------------------------------------------------------------------------------- 1 | #include "geo/index/spatialindex.h" 2 | 3 | SpatialIndex::~SpatialIndex() { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /iCGIS/src/geo/index/spatialindex.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | ** class name: SpatialIndex 3 | ** 4 | ** last change: 2020-01-02 5 | ************************************************************************/ 6 | #pragma once 7 | 8 | #include "util/memoryleakdetect.h" 9 | #include "geo/geo_base.hpp" 10 | #include "geo/map/geofeature.h" 11 | 12 | #include 13 | 14 | class SpatialIndex { 15 | public: 16 | SpatialIndex() {} 17 | virtual ~SpatialIndex(); 18 | 19 | // Point query 20 | // construct a square 21 | // x, y: square's central point 22 | // halfEdge: a half of rectangle's length of side 23 | virtual void queryFeature(double x, double y, double halfEdge, GeoFeature*& featureResult) = 0; 24 | 25 | // box query 26 | virtual void queryFeatures(const GeoExtent& extent, std::vector& featuresResult) = 0; 27 | }; 28 | -------------------------------------------------------------------------------- /iCGIS/src/geo/map/geofeaturelayerproperty.cpp: -------------------------------------------------------------------------------- 1 | #include "geo/map/geofeaturelayerproperty.h" 2 | 3 | 4 | void GeoFeatureLayerProperty::setGeometryType(GeometryType geometryTypeIn) 5 | { 6 | if (geometryTypeIn == kMultiLineString) 7 | geometryType = kLineString; 8 | else if (geometryTypeIn == kMultiPolygon) 9 | geometryType = kPolygon; 10 | else if (geometryTypeIn == kMultiPoint) 11 | geometryType = kPoint; 12 | else 13 | geometryType = geometryTypeIn; 14 | } 15 | -------------------------------------------------------------------------------- /iCGIS/src/geo/map/geofeaturelayerproperty.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: GeoFeatureLayerProperty 3 | ** 4 | ** description: Property of feature layer 5 | ** 6 | ** last change: 2020-01-02 7 | *******************************************************/ 8 | #pragma once 9 | 10 | #include "geo/map/geofielddefn.h" 11 | #include "geo/geometry/geogeometry.h" 12 | 13 | #include 14 | 15 | 16 | enum LayerStyleMode { 17 | kSingleStyle = 0, 18 | kCategorized = 1, 19 | kRuleBased = 2 20 | }; 21 | 22 | 23 | class GeoFeatureLayerProperty { 24 | public: 25 | GeoFeatureLayerProperty() = default; 26 | ~GeoFeatureLayerProperty() = default; 27 | 28 | void setName(const QString& nameIn) { name = nameIn; } 29 | 30 | GeometryType getGeometryType() const { return geometryType; } 31 | void setGeometryType(GeometryType geometryTypeIn); 32 | 33 | public: 34 | bool visible = true; 35 | int id = 0; 36 | QString name; 37 | GeoExtent extent; 38 | QString spatialRef; 39 | LayerStyleMode styleMode = kSingleStyle; 40 | private: 41 | GeometryType geometryType = kGeometryTypeUnknown; 42 | }; 43 | -------------------------------------------------------------------------------- /iCGIS/src/geo/map/geofielddefn.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: GeoFieldDefn 3 | ** 4 | ** description: Field defination 5 | ** 6 | ** last change: 2020-01-02 7 | *******************************************************/ 8 | #pragma once 9 | 10 | #include 11 | 12 | enum GeoFieldType { 13 | kFieldInt = 0, 14 | kFieldDouble, 15 | kFieldText, 16 | kFieldUnknown 17 | }; 18 | 19 | 20 | class GeoFieldDefn { 21 | public: 22 | GeoFieldDefn() = default; 23 | GeoFieldDefn(QString nameIn, int widthIn, GeoFieldType typeIn) 24 | : width(widthIn), type(typeIn), name(nameIn) {} 25 | GeoFieldDefn(const GeoFieldDefn& rhs) 26 | : width(rhs.width), type(rhs.type), name(rhs.name) {} 27 | ~GeoFieldDefn() = default; 28 | 29 | bool isSame(const GeoFieldDefn& rhs) 30 | { return name == rhs.name; } 31 | bool operator==(const GeoFieldDefn& rhs) 32 | { return name == rhs.name; } 33 | 34 | GeoFieldType getType() const { return type; } 35 | QString getName() const { return name; } 36 | int getWidth() const { return width; } 37 | 38 | void setType(GeoFieldType typeIn) { this->type = typeIn; } 39 | void setWidth(int widthIn) { this->width = widthIn; } 40 | void setName(QString nameIn) { name = nameIn; } 41 | 42 | private: 43 | int width = 0; // Max width, only for text field 44 | GeoFieldType type = kFieldUnknown; // Field's type, int, double, text, ... 45 | QString name; 46 | }; 47 | -------------------------------------------------------------------------------- /iCGIS/src/geo/map/geomapproperty.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: GeoMapProperty 3 | ** 4 | ** description: Properties of map 5 | ** 6 | ** last change: 2020-01-02 7 | *******************************************************/ 8 | #pragma once 9 | 10 | #include "geo/geo_base.hpp" 11 | 12 | #include 13 | 14 | 15 | class GeoMapProperty { 16 | public: 17 | GeoMapProperty() = default; 18 | ~GeoMapProperty() = default; 19 | 20 | public: 21 | QString name = "untitled"; 22 | GeoExtent extent; 23 | }; 24 | -------------------------------------------------------------------------------- /iCGIS/src/geo/map/georasterlayer.cpp: -------------------------------------------------------------------------------- 1 | #include "geo/map/geolayer.h" 2 | 3 | GeoRasterLayer::GeoRasterLayer(const GeoRasterLayer& rhs) 4 | : properties(rhs.properties) 5 | { 6 | pData = new GeoRasterData(*(rhs.pData)); 7 | } 8 | 9 | GeoLayer* GeoRasterLayer::copy() { 10 | return (new GeoRasterLayer(*this)); 11 | } 12 | 13 | GeoRasterLayer::~GeoRasterLayer() { 14 | if (pData) 15 | delete pData; 16 | } 17 | 18 | void GeoRasterLayer::setData(GeoRasterData* pDataIn) 19 | { 20 | if (pData) 21 | delete pData; 22 | 23 | pData = pDataIn; 24 | properties.extent = pDataIn->getExtent(); 25 | } 26 | 27 | void GeoRasterLayer::Draw() const { 28 | if (pData) 29 | pData->Draw(); 30 | } 31 | -------------------------------------------------------------------------------- /iCGIS/src/geo/map/georasterlayerproperty.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leopard-C/iCGIS/c8e83c3ee0ec9680f80a2f7a944124a65760071b/iCGIS/src/geo/map/georasterlayerproperty.cpp -------------------------------------------------------------------------------- /iCGIS/src/geo/map/georasterlayerproperty.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: GeoRasterLayerProperty 3 | ** 4 | ** description: Properties of Raster layer 5 | ** 6 | ** last change: 2020-01-02 7 | *******************************************************/ 8 | #pragma once 9 | 10 | #include 11 | 12 | #include "geo/geo_base.hpp" 13 | 14 | 15 | class GeoRasterLayerProperty { 16 | public: 17 | GeoRasterLayerProperty() {} 18 | ~GeoRasterLayerProperty() {} 19 | 20 | bool visible = true; 21 | int id = 0; 22 | QString name; 23 | GeoExtent extent; 24 | }; 25 | -------------------------------------------------------------------------------- /iCGIS/src/geo/raster/georasterdata.cpp: -------------------------------------------------------------------------------- 1 | #include "geo/raster/georasterdata.h" 2 | 3 | GeoRasterData::GeoRasterData(const GeoRasterData& rhs) { 4 | int count = rhs.bands.size(); 5 | bands.reserve(count); 6 | for (int i = 0; i < count; ++i) { 7 | bands.push_back(new GeoRasterBand(*(rhs.bands[i]))); 8 | } 9 | } 10 | 11 | GeoRasterData::~GeoRasterData() 12 | { 13 | for (auto& band : bands) 14 | delete band; 15 | } 16 | 17 | GeoExtent GeoRasterData::getExtent() const 18 | { 19 | if (bands.empty()) 20 | return GeoExtent(); 21 | 22 | // All bands have the same extent 23 | return bands[0]->getExtent(); 24 | } 25 | 26 | void GeoRasterData::addBand(GeoRasterBand* band) 27 | { 28 | bands.emplace_back(band); 29 | } 30 | 31 | void GeoRasterData::Draw() const { 32 | for (auto& band : bands) { 33 | band->Draw(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /iCGIS/src/geo/raster/georasterdata.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | ** class name: GeoRasterData 3 | ** 4 | ** description: Raster data 5 | ** 6 | ** last change: 2020-03-25 7 | *************************************************************************/ 8 | #pragma once 9 | 10 | #include "geo/raster/georasterband.h" 11 | #include 12 | 13 | 14 | class GeoRasterData { 15 | public: 16 | GeoRasterData() {} 17 | GeoRasterData(const GeoRasterData& rhs); 18 | virtual ~GeoRasterData(); 19 | 20 | int getBandsCount() const { return bands.size(); } 21 | GeoRasterBand* getBand(int idx) const { return bands[idx]; } 22 | GeoExtent getExtent() const; 23 | 24 | void addBand(GeoRasterBand* band); 25 | 26 | void Draw() const; 27 | 28 | std::vector::iterator begin() { return bands.begin(); } 29 | std::vector::iterator end() { return bands.end(); } 30 | 31 | private: 32 | std::vector bands; 33 | }; 34 | 35 | 36 | -------------------------------------------------------------------------------- /iCGIS/src/geo/raster/geotiff.cpp: -------------------------------------------------------------------------------- 1 | #include "geo/raster/geotiff.h" 2 | 3 | 4 | GeoTiff::GeoTiff() 5 | { 6 | 7 | } 8 | 9 | GeoTiff::~GeoTiff() 10 | { 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /iCGIS/src/geo/raster/geotiff.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: GeoTiff 3 | ** 4 | ** last change: 2020-01-04 5 | *******************************************************/ 6 | #pragma once 7 | 8 | #include "geo/raster/georasterdata.h" 9 | 10 | #include 11 | 12 | 13 | class GeoTiff : public GeoRasterData { 14 | public: 15 | GeoTiff(); 16 | ~GeoTiff(); 17 | }; 18 | -------------------------------------------------------------------------------- /iCGIS/src/geo/tool/geotool.cpp: -------------------------------------------------------------------------------- 1 | #include "geo/tool/geotool.h" 2 | #include "util/env.h" 3 | 4 | GeoTool::GeoTool(QWidget* parent) 5 | : QDialog(parent), map(Env::map) { 6 | 7 | } 8 | 9 | GeoTool::~GeoTool() { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /iCGIS/src/geo/tool/geotool.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: GeoTool 3 | ** 4 | ** description: Tool class (base class of all tools) 5 | ** 6 | ** last change: 2020-01-02 7 | *******************************************************/ 8 | #pragma once 9 | 10 | #include 11 | #include "geo/map/geomap.h" 12 | #include "util/memoryleakdetect.h" 13 | 14 | 15 | class GeoTool : public QDialog 16 | { 17 | Q_OBJECT 18 | public: 19 | GeoTool(QWidget* parent = nullptr); 20 | virtual ~GeoTool(); 21 | 22 | protected: 23 | GeoMap*& map; 24 | }; 25 | -------------------------------------------------------------------------------- /iCGIS/src/geo/tool/kernel_density.h: -------------------------------------------------------------------------------- 1 | /************************************************************** 2 | ** class name: KernelDensityTool 3 | ** 4 | ** description: KDE 5 | ** 6 | ** last change: 2020-01-02 7 | **************************************************************/ 8 | #pragma once 9 | 10 | #include "geo/tool/geotool.h" 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | 18 | class KernelDensityTool : public GeoTool 19 | { 20 | Q_OBJECT 21 | public: 22 | KernelDensityTool(QWidget* parent = nullptr); 23 | ~KernelDensityTool(); 24 | 25 | signals: 26 | void sigSendLayerToGPU(GeoLayer* layer, bool bUpdate = true); 27 | void sigAddNewLayerToLayersTree(GeoLayer* layer, bool bUpdate = true); 28 | 29 | private: 30 | void setupLayout(); 31 | void initializeFill(); 32 | double getDefaultSearchRadius(GeoFeatureLayer* layer); 33 | double getDefaultCellSize(GeoFeatureLayer* layer); 34 | 35 | public slots: 36 | void onChangeInputFeatures(const QString& name); 37 | void onSetOutputRaster(); 38 | void onBtnOKClicked(); 39 | 40 | private: 41 | QComboBox* comboInputFeatures; 42 | QComboBox* comboPopiField; 43 | QLineEdit* lineEditOutputRaster; 44 | QLineEdit* lineEditOutputCellSize; 45 | QLineEdit* lineEditSearchRadius; 46 | QComboBox* comboAreaUnits; 47 | QComboBox* comboOutputValuesType; 48 | QComboBox* comboMethod; 49 | }; 50 | -------------------------------------------------------------------------------- /iCGIS/src/geo/utility/filereader.h: -------------------------------------------------------------------------------- 1 | /********************************************************************* 2 | ** class name: FileReader 3 | ** 4 | ** last change: 2020-01-02 5 | *********************************************************************/ 6 | #pragma once 7 | 8 | #include "geo/map/geomap.h" 9 | #include "geo/utility/sld.h" 10 | 11 | 12 | class FileReader { 13 | public: 14 | /********************* 15 | * Vector Layer 16 | *********************/ 17 | static GeoFeatureLayer* readGeoJsonUsingGDAL(QString filepath, GeoMap* map); 18 | 19 | static GeoFeatureLayer* readGeoJsonMine(QString filepath, GeoMap* map); 20 | 21 | static GeoFeatureLayer* readShapefile(QString filepath, GeoMap* map); 22 | 23 | 24 | /********************* 25 | * Raster Layer 26 | *********************/ 27 | static GeoRasterLayer* readTiff(QString filepath, GeoMap* map); 28 | 29 | 30 | /********************* 31 | * SLD 32 | *********************/ 33 | static SLDInfo* readSLD(QString filepath, GeoFeatureLayer* layer); 34 | }; 35 | -------------------------------------------------------------------------------- /iCGIS/src/geo/utility/geo_utility.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** description: Utilities 3 | ** 4 | ** last change: 2020-01-02 5 | *******************************************************/ 6 | #pragma once 7 | 8 | #include "geo/geometry/geogeometry.h" 9 | 10 | const char* wkbTypeToString(int enumValue); 11 | const char* GeometryTypeToName(GeometryType type); 12 | -------------------------------------------------------------------------------- /iCGIS/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "icgis.h" 2 | #include 3 | 4 | #include 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | QApplication a(argc, argv); 9 | 10 | srand(time(nullptr)); 11 | 12 | ICGis w(nullptr); 13 | w.setGeometry(100, 100, 1200, 700); 14 | w.show(); 15 | return a.exec(); 16 | } 17 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/glcall.cpp: -------------------------------------------------------------------------------- 1 | #include "opengl/glcall.h" 2 | #include "util/logger.h" 3 | 4 | #include 5 | #include 6 | 7 | void GLClearError() 8 | { 9 | while (glGetError() != GL_NO_ERROR); 10 | } 11 | 12 | bool GLLogCall(const char* function, const char* file, int line) 13 | { 14 | while (GLenum error = glGetError()) { 15 | char errorMsg[512] = { 0 }; 16 | sprintf(errorMsg, "[OpenGL Error] (0x%04x) %s %s %d", error, function, file, line); 17 | printf("%s\n", errorMsg); 18 | LError(errorMsg); 19 | return false; 20 | } 21 | return true; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/glcall.h: -------------------------------------------------------------------------------- 1 | /*************************************************************** 2 | ** MacroName: GLCall 3 | ** 4 | ** description: Call functions of OpenGL like this: 5 | ** GLCall(glClearColor(1.0f, 1.0f, 1.0f, 1.0f)); 6 | ** GLCall(glClear(GL_COLOR_BUFFER_BIT)); 7 | ** 8 | ** last change: 2019-12-07 9 | ****************************************************************/ 10 | #pragma once 11 | 12 | #ifndef GLEW_STATIC 13 | #define GLEW_STATIC 14 | #endif 15 | 16 | #include 17 | 18 | #ifdef _WIN32 19 | #define ASSERT(x) if (!(x)) __debugbreak() 20 | #else 21 | #define ASSERT(x) if (!(x)) __builtin_trap() 22 | #endif 23 | 24 | #define GLCall(x) GLClearError();\ 25 | x;\ 26 | ASSERT(GLLogCall(#x, __FILE__, __LINE__)) 27 | 28 | void GLClearError(); 29 | bool GLLogCall(const char* function, const char* file, int line); 30 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/indexbuffer.cpp: -------------------------------------------------------------------------------- 1 | #include "indexbuffer.h" 2 | #include "glcall.h" 3 | 4 | IndexBuffer::IndexBuffer(const unsigned int* data, unsigned int count, int mode) : 5 | count(count), mode(mode) 6 | { 7 | ASSERT(sizeof(unsigned int) == sizeof(GLuint)); 8 | GLCall(glGenBuffers(1, &rendererID)); 9 | GLCall(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, rendererID)); 10 | GLCall(glBufferData(GL_ELEMENT_ARRAY_BUFFER, count * sizeof(unsigned int), 11 | data, GL_STATIC_DRAW)); 12 | } 13 | 14 | IndexBuffer::~IndexBuffer() 15 | { 16 | GLCall(glDeleteBuffers(1, &rendererID)); 17 | } 18 | 19 | void IndexBuffer::Bind() const 20 | { 21 | GLCall(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, rendererID)); 22 | } 23 | 24 | void IndexBuffer::Unbind() const 25 | { 26 | GLCall(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0)); 27 | } 28 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/indexbuffer.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | ** class name: IndexBuffer 3 | ** 4 | ** description: IBO (or EBO in OpenGL) 5 | ** 6 | ** last change: 2020-01-02 7 | ********************************************************************/ 8 | #pragma once 9 | 10 | class IndexBuffer { 11 | public: 12 | IndexBuffer(const unsigned int* data, unsigned int count, int mode); 13 | ~IndexBuffer(); 14 | void Bind() const; 15 | void Unbind() const; 16 | 17 | inline unsigned int getCount() const { return count; } 18 | inline int getMode() const { return mode; } 19 | private: 20 | unsigned int rendererID; 21 | unsigned int count; 22 | int mode; 23 | }; 24 | 25 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/openglfeaturedescriptor.cpp: -------------------------------------------------------------------------------- 1 | #include "openglfeaturedescriptor.h" 2 | #include "opengl/glcall.h" 3 | 4 | OpenglFeatureDescriptor::~OpenglFeatureDescriptor() 5 | { 6 | if (vao) 7 | delete vao; 8 | if (vbo) 9 | delete vbo; 10 | for (auto& ibo : ibos) 11 | delete ibo; 12 | } 13 | 14 | void OpenglFeatureDescriptor::offset(double xOffset, double yOffset) { 15 | unsigned int count = this->vbo->getSize() / sizeof(float); 16 | 17 | float* data; 18 | this->vbo->Bind(); 19 | GLCall(data = (float*)glMapBuffer(GL_ARRAY_BUFFER, GL_READ_WRITE)); 20 | 21 | /* Data layout (x, y, r, g, b) */ 22 | for (int i = 0; i < count; i += stride) { 23 | data[i] = data[i] + xOffset; // x 24 | data[i + 1] = data[i + 1] + yOffset; // y 25 | } 26 | 27 | GLCall(glUnmapBuffer(GL_ARRAY_BUFFER)); 28 | } 29 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/openglfeaturedescriptor.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | ** class name: OpenglFeatureDescriptor 3 | ** 4 | ** description: A collection of VAO, VBO, IBO(s) 5 | ** 6 | ** last change: 2020-03-25 7 | ********************************************************************/ 8 | #ifndef OPENGLFEATUREDESCRIPTOR_H 9 | #define OPENGLFEATUREDESCRIPTOR_H 10 | 11 | #include "opengl/vertexarray.h" 12 | #include "opengl/vertexbuffer.h" 13 | #include "opengl/indexbuffer.h" 14 | #include "geo/geometry/geogeometry.h" 15 | 16 | class OpenglFeatureDescriptor 17 | { 18 | public: 19 | OpenglFeatureDescriptor(int stride) : stride(stride) {} 20 | ~OpenglFeatureDescriptor(); 21 | 22 | void offset(double xOffset, double yOffset); 23 | 24 | //void rotate(); // Just resend data to GPU 25 | 26 | public: 27 | int stride; 28 | VertexBuffer* vbo = nullptr; 29 | VertexArray* vao = nullptr; 30 | std::vector ibos; 31 | }; 32 | 33 | #endif // OPENGLFEATUREDESCRIPTOR_H 34 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/openglrasterdescriptor.cpp: -------------------------------------------------------------------------------- 1 | #include "openglrasterdescriptor.h" 2 | 3 | OpenglRasterDescriptor::~OpenglRasterDescriptor() 4 | { 5 | if (vao) 6 | delete vao; 7 | if (vbo) 8 | delete vbo; 9 | if (ibo) 10 | delete ibo; 11 | for (auto& tex : texs) 12 | delete tex; 13 | } 14 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/openglrasterdescriptor.h: -------------------------------------------------------------------------------- 1 | /******************************************************************* 2 | ** class name: OpenglRasterDescriptor 3 | ** 4 | ** description: A collection of VAO, VBO, IBO(s) for raster data 5 | ** 6 | ** last change: 2020-03-25 7 | ********************************************************************/ 8 | #ifndef OPENGLRASTERDESCRIPTOR_H 9 | #define OPENGLRASTERDESCRIPTOR_H 10 | 11 | #include "opengl/vertexarray.h" 12 | #include "opengl/vertexbuffer.h" 13 | #include "opengl/indexbuffer.h" 14 | #include "opengl/texture.h" 15 | #include 16 | 17 | 18 | class OpenglRasterDescriptor 19 | { 20 | public: 21 | ~OpenglRasterDescriptor(); 22 | 23 | VertexBuffer* vbo = nullptr; 24 | VertexArray* vao = nullptr; 25 | IndexBuffer* ibo = nullptr; 26 | std::vector texs; 27 | }; 28 | 29 | #endif // OPENGLRASTERDESCRIPTOR_H 30 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/renderer.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: Renderer 3 | ** 4 | ** last change: 2020-01-02 5 | *******************************************************/ 6 | #pragma once 7 | 8 | #include "opengl/vertexarray.h" 9 | #include "opengl/indexbuffer.h" 10 | #include "opengl/shader.h" 11 | #include "opengl/texture.h" 12 | 13 | #include 14 | 15 | class Renderer { 16 | public: 17 | void Clear() const; 18 | void DrawPoint(const VertexArray* vao, const IndexBuffer* ibo, Shader& pointShader); 19 | void DrawLine(const VertexArray* vao, const IndexBuffer* ibo, Shader& lineShader); 20 | void DrawPolygon(const VertexArray* vao, const IndexBuffer* ibo, Shader& polygonShader); 21 | void DrawPolygonBorder(const VertexArray* vao, Shader& borderShader); 22 | void DrawTexture(const VertexArray* vao, const IndexBuffer* ibo, 23 | const std::vector& texs, Shader& textureShader); 24 | private: 25 | }; 26 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/shader.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | ** class name: Shader 3 | ** 4 | ** last change: 2020-01-02 5 | *****************************************************************************/ 6 | #pragma once 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | class Shader { 13 | public: 14 | ~Shader(); 15 | void Bind() const; 16 | void Unbind() const; 17 | 18 | void create(const std::string vsPath, const std::string fsPath); 19 | 20 | //Set uniforms 21 | void SetUniform1i(const std::string& name, int value); 22 | void SetUniform1f(const std::string& name, float value); 23 | void SetUniform3f(const std::string& name, float v0, float v1, float v2); 24 | void SetUniform4f(const std::string& name, float v0, float v1, float v2, float v3 ); 25 | void SetUniformMat4f(const std::string& name, const glm::mat4& matrix); 26 | 27 | private: 28 | std::string parseShader (const std::string& filepath); 29 | unsigned int compileShader (unsigned int type, const std::string& source); 30 | unsigned int createShader(const std::string& vertexShader, const std::string& fragmentShader); 31 | int GetUniformLocation (const std::string& name); 32 | private: 33 | unsigned int rendererID; 34 | 35 | // Cache uniform variable's location 36 | // Get the location from GPU is comparatively time-consuming 37 | std::unordered_map uniformLocationCache; 38 | }; 39 | 40 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/texture.cpp: -------------------------------------------------------------------------------- 1 | #include "opengl/texture.h" 2 | #include "glcall.h" 3 | 4 | 5 | Texture::Texture(void* data, int width, int height, unsigned int dataTypeIn, unsigned int internalFormatIn, unsigned int formatIn) 6 | { 7 | ASSERT(sizeof(unsigned int) == sizeof(GLuint)); 8 | GLCall(glGenTextures(1, &textureID)); 9 | GLCall(glBindTexture(GL_TEXTURE_2D, textureID)); 10 | // wrapping parameters 11 | GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT)); 12 | GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT)); 13 | // filtering parameters 14 | GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)); 15 | GLCall(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)); 16 | // generate texture 17 | GLCall(glTexImage2D(GL_TEXTURE_2D, 0, internalFormatIn, width, height, 0, formatIn, dataTypeIn, data)); 18 | GLCall(glGenerateMipmap(GL_TEXTURE_2D)); 19 | 20 | GLCall(glBindTexture(GL_TEXTURE_2D, 0)); 21 | } 22 | 23 | Texture::~Texture() 24 | { 25 | GLCall(glDeleteTextures(1, &textureID)); 26 | } 27 | 28 | void Texture::Bind() const 29 | { 30 | GLCall(glBindTexture(GL_TEXTURE_2D, textureID)); 31 | } 32 | 33 | void Texture::UnBind() const 34 | { 35 | GLCall(glBindTexture(GL_TEXTURE_2D, 0)); 36 | } 37 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/texture.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: Texture 3 | ** 4 | ** last change: 2020-01-05 5 | *******************************************************/ 6 | #pragma once 7 | 8 | 9 | class Texture { 10 | public: 11 | Texture(void* data, int width, int height, unsigned int dataTypeIn, 12 | unsigned int internalFormatIn, unsigned int formatIn); 13 | ~Texture(); 14 | 15 | void Bind() const; 16 | void UnBind() const; 17 | 18 | unsigned int getID() const { return textureID; } 19 | 20 | private: 21 | unsigned int textureID; 22 | }; 23 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/vertexarray.cpp: -------------------------------------------------------------------------------- 1 | #include "vertexarray.h" 2 | #include "vertexbufferlayout.h" 3 | 4 | #include "glcall.h" 5 | 6 | VertexArray::VertexArray() 7 | { 8 | GLCall(glGenVertexArrays(1, &rendererID)); 9 | } 10 | 11 | VertexArray::~VertexArray() 12 | { 13 | GLCall(glDeleteVertexArrays(1, &rendererID)); 14 | if (stride) 15 | delete[] stride; 16 | } 17 | 18 | void VertexArray::addBuffer(const VertexBuffer& vb, const VertexBufferLayout& layout) 19 | { 20 | Bind(); 21 | vb.Bind(); 22 | const auto& elements = layout.GetElements(); 23 | unsigned int offset = 0; 24 | for (unsigned int i = 0; i < elements.size(); ++i) { 25 | const auto& element = elements[i]; 26 | GLCall(glEnableVertexAttribArray(i)); 27 | GLCall(glVertexAttribPointer(i, element.count, element.type, 28 | element.normalized, layout.GetStride(), (const char*)offset)); 29 | offset += element.count * VertexBufferElement::GetSizeOfType(element.type); 30 | } 31 | } 32 | 33 | void VertexArray::Bind() const 34 | { 35 | GLCall(glBindVertexArray(rendererID)); 36 | } 37 | 38 | void VertexArray::Unbind() const 39 | { 40 | GLCall(glBindVertexArray(0)); 41 | } 42 | 43 | void VertexArray::reserve(int count) 44 | { 45 | if (stride) 46 | delete[] stride; 47 | stride = new int[count]; 48 | nStrides = count; 49 | } 50 | 51 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/vertexarray.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: VertexArray 3 | ** 4 | ** description: VAO 5 | ** 6 | ** last change: 2020-01-02 7 | *******************************************************/ 8 | #pragma once 9 | 10 | #include "vertexbuffer.h" 11 | 12 | class VertexBufferLayout; 13 | 14 | 15 | class VertexArray { 16 | public: 17 | VertexArray(); 18 | ~VertexArray(); 19 | 20 | void addBuffer(const VertexBuffer& vb, const VertexBufferLayout& layout); 21 | void Bind() const; 22 | void Unbind() const; 23 | void reserve(int count); 24 | void setStride(int i, int iStride) { stride[i] = iStride; } 25 | int getStride(int i) const { return stride[i]; } 26 | int getStridesCount() const { return nStrides; } 27 | 28 | private: 29 | unsigned int rendererID; 30 | int* stride = nullptr; 31 | int nStrides; 32 | }; 33 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/vertexbuffer.cpp: -------------------------------------------------------------------------------- 1 | #include "vertexbuffer.h" 2 | #include "glcall.h" 3 | 4 | VertexBuffer::VertexBuffer(const void* data, unsigned int size, int usage/* = GL_STATIC_DRAW */) 5 | : size(size) 6 | { 7 | GLCall(glGenBuffers(1, &rendererID)); 8 | GLCall(glBindBuffer(GL_ARRAY_BUFFER, rendererID)); 9 | GLCall(glBufferData(GL_ARRAY_BUFFER, size, data, usage)); 10 | } 11 | 12 | 13 | VertexBuffer::~VertexBuffer() 14 | { 15 | GLCall(glDeleteBuffers(1, &rendererID)); 16 | } 17 | 18 | void VertexBuffer::addSubData(const void* data, unsigned int offset, unsigned int size /*GL_STATIC_DRAW*/) 19 | { 20 | GLCall(glBindBuffer(GL_ARRAY_BUFFER, rendererID)); 21 | GLCall(glBufferSubData(GL_ARRAY_BUFFER, offset, size, data)); 22 | } 23 | 24 | void VertexBuffer::Bind() const 25 | { 26 | GLCall(glBindBuffer(GL_ARRAY_BUFFER, rendererID)); 27 | } 28 | 29 | void VertexBuffer::Unbind() const 30 | { 31 | GLCall(glBindBuffer(GL_ARRAY_BUFFER, 0)); 32 | } 33 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/vertexbuffer.h: -------------------------------------------------------------------------------- 1 | /****************************************************** 2 | ** class name: VertexBuffer 3 | ** 4 | ** description: VBO 5 | ** 6 | ** last change: 2020-01-02 7 | *******************************************************/ 8 | 9 | #pragma once 10 | 11 | class VertexBuffer { 12 | public: 13 | // if data is nullptr 14 | // you should call addSubData(...) to add data 15 | // but size should be given now 16 | VertexBuffer(const void* data, unsigned int size, int usage = 0x88E4 /*GL_STATIC_DRAW*/); 17 | ~VertexBuffer(); 18 | 19 | unsigned int getRendererID() const { return rendererID; } 20 | unsigned int getSize() const { return size; } 21 | 22 | void addSubData(const void* data, unsigned int offset, unsigned int size /*GL_STATIC_DRAW*/); 23 | 24 | void Bind() const; 25 | void Unbind() const; 26 | private: 27 | unsigned int size; 28 | unsigned int rendererID; 29 | }; 30 | -------------------------------------------------------------------------------- /iCGIS/src/opengl/vertexbufferlayout.cpp: -------------------------------------------------------------------------------- 1 | #include "vertexbufferlayout.h" -------------------------------------------------------------------------------- /iCGIS/src/operation/operationlist.h: -------------------------------------------------------------------------------- 1 | /************************************************************* 2 | ** class name: OperationList 3 | ** 4 | ** description: Record operations(Move, Delete, rotate features) 5 | ** Support undo and redo. 6 | ** 7 | ** last change: 2020-03-26 8 | **************************************************************/ 9 | #ifndef OPERATIONLIST_H 10 | #define OPERATIONLIST_H 11 | 12 | #include "operation/operation.h" 13 | 14 | class OperationList 15 | { 16 | public: 17 | OperationList(); 18 | ~OperationList(); 19 | 20 | public: 21 | void setOpenglWidget() {} 22 | 23 | void setMaxOperations(int maxSize); 24 | void clear(); 25 | 26 | bool isAtBeginning() const { return (!isOverrided) && (curr - 1 == first); } 27 | 28 | void addOperation(Operation* operation); 29 | Operation* undo(); 30 | Operation* redo(); 31 | 32 | Operation* addDeleteOperation(const FeaturesList& features); 33 | Operation* addMoveOperation(const FeaturesList& features, double xOffset, double yOffset); 34 | Operation* addRotateOperation(const FeaturesList& features, double angle); 35 | 36 | private: 37 | /* Record 20 steps at most, change by call setMaxOperations(int) */ 38 | Operation** list = nullptr; 39 | int MAX_SIZE = 20; 40 | 41 | int curr = 1; 42 | int first = 0; 43 | 44 | bool isOverrided = false; 45 | }; 46 | 47 | #endif // OPERATIONLIST_H 48 | -------------------------------------------------------------------------------- /iCGIS/src/util/env.cpp: -------------------------------------------------------------------------------- 1 | #include "util/env.h" 2 | #include "geo/map/geomap.h" 3 | 4 | namespace Env { 5 | 6 | Shader pointShader; 7 | Shader lineShader; 8 | Shader polygonShader; 9 | Shader borderShader; 10 | Shader highlightShader; 11 | Shader textureShader; 12 | Renderer renderer; 13 | 14 | void createShaders() { 15 | printf("point"); 16 | pointShader.create("res/shaders/point_vert.glsl", "res/shaders/point_frag.glsl"); 17 | printf("line"); 18 | lineShader.create("res/shaders/line_vert.glsl", "res/shaders/line_frag.glsl"); 19 | printf("polygon"); 20 | polygonShader.create("res/shaders/polygon_vert.glsl", "res/shaders/polygon_frag.glsl"); 21 | printf("border"); 22 | borderShader.create("res/shaders/border_vert.glsl", "res/shaders/border_frag.glsl"); 23 | printf("hightlight"); 24 | highlightShader.create("res/shaders/highlight_vert.glsl", "res/shaders/highlight_frag.glsl"); 25 | printf("texture"); 26 | textureShader.create("res/shaders/texture_vert.glsl", "res/shaders/texture_frag.glsl"); 27 | } 28 | 29 | bool isEditing = false; 30 | CursorType cursorType = CursorType::Normal; 31 | GeoMap* map = new GeoMap(); 32 | OperationList opList; 33 | QString HOME = "."; 34 | 35 | 36 | } // namespace Env 37 | -------------------------------------------------------------------------------- /iCGIS/src/util/env.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** namespace: Env 3 | ** 4 | ** description: Global variables 5 | ** 6 | ** last change: 2020-03-29 7 | *******************************************************/ 8 | #ifndef ENV_H 9 | #define ENV_H 10 | 11 | #include "opengl/shader.h" 12 | #include "opengl/renderer.h" 13 | #include "operation/operationlist.h" 14 | 15 | class GeoMap; 16 | 17 | namespace Env { 18 | 19 | /* Shaders */ 20 | extern Shader pointShader; 21 | extern Shader lineShader; 22 | extern Shader polygonShader; 23 | extern Shader borderShader; 24 | extern Shader highlightShader; 25 | extern Shader textureShader; 26 | extern Renderer renderer; 27 | void createShaders(); 28 | 29 | /* Mouse Cursor */ 30 | enum class CursorType { 31 | Normal = 0, 32 | Palm = 1, 33 | Editing = 2, 34 | WhatIsThis = 3, 35 | }; 36 | 37 | // Whether is editing map 38 | extern bool isEditing; 39 | 40 | // Mouse cursor type 41 | // Normal, palm, etc. 42 | extern CursorType cursorType; 43 | 44 | // map 45 | // There is only one map in one project 46 | extern GeoMap* map; 47 | 48 | // Project home path 49 | extern QString HOME; 50 | 51 | // Record the operations: move features, delete features, etc. 52 | extern OperationList opList; 53 | 54 | } // namespace Env 55 | 56 | #endif // ENV_H 57 | -------------------------------------------------------------------------------- /iCGIS/src/util/memoryleakdetect.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /************* Detect memory leak ******************/ 4 | /******* Seriously slowing down the program ********/ 5 | #ifdef _WIN32 6 | 7 | #define USING_VLD 0 8 | 9 | #if USING_VLD == 1 10 | #include "vld.h" 11 | #endif 12 | 13 | #endif // _WIN32 14 | /****************************************************/ 15 | -------------------------------------------------------------------------------- /iCGIS/src/widget/colorblockwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "widget/colorblockwidget.h" 2 | 3 | #include 4 | #include 5 | 6 | ColorBlockWidget::ColorBlockWidget(QWidget *parent) 7 | : QWidget(parent) 8 | { 9 | this->setAttribute(Qt::WA_StyledBackground, true); 10 | } 11 | 12 | ColorBlockWidget::~ColorBlockWidget() 13 | { 14 | } 15 | 16 | void ColorBlockWidget::mouseDoubleClickEvent(QMouseEvent *event) 17 | { 18 | QColor color = QColorDialog::getColor(Qt::white, nullptr); 19 | if (color.isValid()) 20 | setColor(color); 21 | } 22 | 23 | 24 | void ColorBlockWidget::setColor(int r, int g, int b) 25 | { 26 | QString bgColor = QString("background-color:rgb(%1,%2,%3);"). 27 | arg(r).arg(g).arg(b); 28 | this->setStyleSheet(bgColor); 29 | } 30 | 31 | void ColorBlockWidget::setColor(const QColor& colorIn) 32 | { 33 | setColor(colorIn.red(), colorIn.green(), colorIn.blue()); 34 | } 35 | 36 | const QColor& ColorBlockWidget::getColor() const 37 | { 38 | return this->palette().background().color(); 39 | } 40 | -------------------------------------------------------------------------------- /iCGIS/src/widget/colorblockwidget.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: ColorBlockWidget 3 | ** 4 | ** last change: 2020-01-02 5 | *******************************************************/ 6 | 7 | #pragma once 8 | 9 | #include 10 | #include 11 | 12 | class ColorBlockWidget : public QWidget 13 | { 14 | Q_OBJECT 15 | public: 16 | ColorBlockWidget(QWidget *parent); 17 | ~ColorBlockWidget(); 18 | 19 | protected: 20 | void mouseDoubleClickEvent(QMouseEvent *event) override; 21 | 22 | public: 23 | void setColor(int r, int g, int b); 24 | void setColor(const QColor& colorIn); 25 | const QColor& getColor() const; 26 | 27 | int getFID() const { return FID; } 28 | void setFID(int nFID) { FID = nFID; } 29 | 30 | private: 31 | int FID; 32 | }; 33 | -------------------------------------------------------------------------------- /iCGIS/src/widget/globalsearchwidget.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: GlobalSearchWidget 3 | ** 4 | ** last change: 2020-01-02 5 | *******************************************************/ 6 | #pragma once 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include "dialog/globalsearchresult.h" 14 | 15 | class GeoMap; 16 | class GeoFeatureLayer; 17 | 18 | 19 | class GlobalSearchWidget : public QLineEdit 20 | { 21 | Q_OBJECT 22 | 23 | public: 24 | GlobalSearchWidget(QWidget *parent); 25 | ~GlobalSearchWidget(); 26 | 27 | public: 28 | void updateCompleterList(); 29 | 30 | public slots: 31 | void onClearText(); 32 | void onSearch(); 33 | void onTextChanged(); 34 | void onSearchResultDialogClose(); 35 | 36 | /* Override Event */ 37 | protected: 38 | virtual void focusInEvent(QFocusEvent* event) override; 39 | virtual void focusOutEvent(QFocusEvent* event) override; 40 | 41 | private: 42 | void setupLayout(); 43 | bool searchInLayer(const QString& value, GeoFeatureLayer* layerIn, std::vector& featuresOut); 44 | 45 | GeoMap*& map; 46 | 47 | QStringList stringList; 48 | QCompleter* completer; 49 | QPushButton* btnSearch; 50 | QPushButton* btnClearText; 51 | 52 | GlobalSearchResult* searchResultDialog = nullptr; 53 | }; 54 | -------------------------------------------------------------------------------- /iCGIS/src/widget/layerstreewidgetitem.cpp: -------------------------------------------------------------------------------- 1 | #include "layerstreewidgetitem.h" 2 | 3 | 4 | LayersTreeWidgetItem::LayersTreeWidgetItem(int type /*= 0*/) 5 | : QTreeWidgetItem(type) 6 | { 7 | 8 | } 9 | 10 | LayersTreeWidgetItem::LayersTreeWidgetItem(QTreeWidget *parent, int type /*= 0*/) 11 | : QTreeWidgetItem(parent, type) 12 | { 13 | 14 | } 15 | 16 | LayersTreeWidgetItem::LayersTreeWidgetItem(QTreeWidgetItem *parent, int type /*= 0*/) 17 | : QTreeWidgetItem(parent, type) 18 | { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /iCGIS/src/widget/layerstreewidgetitem.h: -------------------------------------------------------------------------------- 1 | /***************************************************************** 2 | ** class name: LayersTreeWidgetItem 3 | ** 4 | ** last change: 2020-01-02 5 | ******************************************************************/ 6 | 7 | #pragma once 8 | 9 | #include 10 | #include 11 | 12 | 13 | class LayersTreeWidgetItem : public QTreeWidgetItem 14 | { 15 | public: 16 | LayersTreeWidgetItem(int type = 0); 17 | LayersTreeWidgetItem(QTreeWidget *parent, int type = 0); 18 | LayersTreeWidgetItem(QTreeWidgetItem *parent, int type = 0); 19 | ~LayersTreeWidgetItem() = default; 20 | 21 | public: 22 | int getLID() const { return LID; } 23 | void setLID(int nLID) { LID = nLID; } 24 | 25 | private: 26 | // Layer's unique ID 27 | int LID = 0; 28 | }; 29 | 30 | -------------------------------------------------------------------------------- /iCGIS/src/widget/searchcompleter.cpp: -------------------------------------------------------------------------------- 1 | #include "searchcompleter.h" 2 | 3 | SearchCompleter::SearchCompleter(QObject *parent) 4 | : QCompleter(parent) 5 | { 6 | } 7 | 8 | SearchCompleter::~SearchCompleter() 9 | { 10 | } 11 | 12 | QStringList SearchCompleter::splitPath(const QString& path) const 13 | { 14 | 15 | return QStringList(); 16 | } 17 | 18 | QString SearchCompleter::pathFromIndex(const QModelIndex& index) const 19 | { 20 | return QString(""); 21 | } 22 | -------------------------------------------------------------------------------- /iCGIS/src/widget/searchcompleter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | class SearchCompleter : public QCompleter 9 | { 10 | Q_OBJECT 11 | public: 12 | SearchCompleter(QObject *parent); 13 | ~SearchCompleter(); 14 | 15 | protected: 16 | virtual QStringList splitPath(const QString& path) const override; 17 | virtual QString pathFromIndex(const QModelIndex& index) const override; 18 | }; 19 | -------------------------------------------------------------------------------- /iCGIS/src/widget/statusbar.h: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | ** class name: StatusBar 3 | ** 4 | ** last change: 2020-02-06 5 | *******************************************************/ 6 | #pragma once 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | enum CoordUint { 13 | kDegree = 0, 14 | kMeter = 1, 15 | kKiloMeter = 2 16 | }; 17 | 18 | class StatusBar : public QObject 19 | { 20 | Q_OBJECT 21 | public: 22 | StatusBar(QStatusBar* statusBarIn); 23 | ~StatusBar(); 24 | 25 | public slots: 26 | void onUpdateCoord(double x, double y); 27 | 28 | public: 29 | void setUnit(CoordUint unit); 30 | void showMsg(const QString& msg, int timeMs = 0); 31 | 32 | private: 33 | void createWidgets(); 34 | void setupLayout(); 35 | 36 | private: 37 | QStatusBar* statusBar; 38 | QLabel* labelCoord; 39 | QLabel* labelUnit; 40 | CoordUint unit = kDegree; 41 | }; 42 | -------------------------------------------------------------------------------- /iCGIS/src/widget/toolbar.h: -------------------------------------------------------------------------------- 1 | #ifndef TOOLBAR_H 2 | #define TOOLBAR_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class GeoMap; 9 | 10 | class ToolBar : public QToolBar 11 | { 12 | Q_OBJECT 13 | public: 14 | ToolBar(QWidget* parent = nullptr); 15 | 16 | signals: 17 | void sigUpdateOpengl(); 18 | 19 | public slots: 20 | void onStartEditing(bool on); 21 | 22 | public slots: 23 | void onRotate(); 24 | void onCursorNormal(); 25 | void onCursorEditing(); 26 | void onCursorPalm(); 27 | void onCursorWhatIsThis(); 28 | 29 | private: 30 | void createWidgets(); 31 | void createActions(); 32 | void setupLayout(); 33 | 34 | private: 35 | GeoMap*& map; 36 | 37 | /* Widget */ 38 | QLineEdit* editRotate; 39 | 40 | /* Action */ 41 | QAction* cursorNormalAction; 42 | QAction* cursorEditingAction; 43 | QAction* cursorPalmAction; 44 | QAction* cursorWhatIsThisAction; 45 | QAction* rotateAction; 46 | }; 47 | 48 | #endif // TOOLBAR_H 49 | -------------------------------------------------------------------------------- /iCGIS/src/widget/toolboxtreewidget.cpp: -------------------------------------------------------------------------------- 1 | #include "widget/toolboxtreewidget.h" 2 | #include "util/env.h" 3 | #include "util/appevent.h" 4 | 5 | #include 6 | #include 7 | 8 | 9 | ToolBoxTreeWidget::ToolBoxTreeWidget(QWidget* parent /*= nullptr*/) 10 | : QTreeWidget(parent), map(Env::map) 11 | { 12 | this->setHeaderHidden(true); 13 | this->setStyleSheet("QTreeWidget::item{height:25px}"); 14 | 15 | toolboxRootItem = new QTreeWidgetItem(this); 16 | toolboxRootItem->setIcon(0, QIcon("res/icons/toolbox.ico")); 17 | toolboxRootItem->setText(0, tr("ToolBox")); 18 | 19 | createToolItems(); 20 | this->expandAll(); 21 | 22 | connect(this, &QTreeWidget::itemDoubleClicked, 23 | this, &ToolBoxTreeWidget::onDoubleClicked); 24 | } 25 | 26 | ToolBoxTreeWidget::~ToolBoxTreeWidget() 27 | { 28 | } 29 | 30 | 31 | void ToolBoxTreeWidget::createToolItems() 32 | { 33 | QTreeWidgetItem* kernelDensityItem = new QTreeWidgetItem(toolboxRootItem); 34 | kernelDensityItem->setIcon(0, QIcon("res/icons/tool.ico")); 35 | kernelDensityItem->setText(0, tr("Kernel Density")); 36 | } 37 | 38 | void ToolBoxTreeWidget::onDoubleClicked(QTreeWidgetItem* item, int col) 39 | { 40 | qDebug() << item->text(col); 41 | QString toolName = item->text(0); 42 | if (toolName == "Kernel Density") { 43 | KernelDensityTool* kernelDensityTool = new KernelDensityTool(this); 44 | kernelDensityTool->show(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /iCGIS/src/widget/toolboxtreewidget.h: -------------------------------------------------------------------------------- 1 | /***************************************************************** 2 | ** class name: ToolBoxTreeWidget 3 | ** 4 | ** last change: 2020-01-06 5 | *****************************************************************/ 6 | 7 | #pragma once 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | #include "geo/map/geomap.h" 14 | #include "geo/tool/kernel_density.h" 15 | 16 | 17 | class ToolBoxTreeWidget : public QTreeWidget 18 | { 19 | Q_OBJECT 20 | public: 21 | ToolBoxTreeWidget(QWidget* parent = nullptr); 22 | ~ToolBoxTreeWidget(); 23 | 24 | void createToolItems(); 25 | 26 | public slots: 27 | void onDoubleClicked(QTreeWidgetItem* item, int col); 28 | 29 | private: 30 | GeoMap*& map; 31 | 32 | // root item: tool box 33 | QTreeWidgetItem* toolboxRootItem; 34 | }; 35 | --------------------------------------------------------------------------------