text stringlengths 7 35.3M | id stringlengths 11 185 | metadata dict | __index_level_0__ int64 0 2.14k |
|---|---|---|---|
/*
** Buffer handling.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_BUF_H
#define _LJ_BUF_H
#include "lj_obj.h"
#include "lj_gc.h"
#include "lj_str.h"
/* Resizable string buffers. */
/* The SBuf struct definition is in lj_obj.h:
** char *w; Write pointer.
** char *e; End... | xLua/build/luajit-2.1.0b3/src/lj_buf.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_buf.h",
"repo_id": "xLua",
"token_count": 2907
} | 2,030 |
/*
** C declaration parser.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_CPARSE_H
#define _LJ_CPARSE_H
#include "lj_obj.h"
#include "lj_ctype.h"
#if LJ_HASFFI
/* C parser limits. */
#define CPARSE_MAX_BUF 32768 /* Max. token buffer size. */
#define CPARSE_MAX_DECLSTACK 100 ... | xLua/build/luajit-2.1.0b3/src/lj_cparse.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_cparse.h",
"repo_id": "xLua",
"token_count": 833
} | 2,031 |
/*
** Error handling.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_ERR_H
#define _LJ_ERR_H
#include <stdarg.h>
#include "lj_obj.h"
typedef enum {
#define ERRDEF(name, msg) \
LJ_ERR_##name, LJ_ERR_##name##_ = LJ_ERR_##name + sizeof(msg)-1,
#include "lj_errmsg.h"
LJ_ERR__M... | xLua/build/luajit-2.1.0b3/src/lj_err.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_err.h",
"repo_id": "xLua",
"token_count": 1007
} | 2,032 |
/*
** Common definitions for the JIT compiler.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_JIT_H
#define _LJ_JIT_H
#include "lj_obj.h"
#include "lj_ir.h"
/* -- JIT engine flags ---------------------------------------------------- */
/* General JIT engine flags. 4 bits. */
#... | xLua/build/luajit-2.1.0b3/src/lj_jit.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_jit.h",
"repo_id": "xLua",
"token_count": 7265
} | 2,033 |
/*
** NARROW: Narrowing of numbers to integers (double to int32_t).
** STRIPOV: Stripping of overflow checks.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#define lj_opt_narrow_c
#define LUA_CORE
#include "lj_obj.h"
#if LJ_HASJIT
#include "lj_bc.h"
#include "lj_ir.h"
#include "lj_jit.h"... | xLua/build/luajit-2.1.0b3/src/lj_opt_narrow.c/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_opt_narrow.c",
"repo_id": "xLua",
"token_count": 9811
} | 2,034 |
/*
** State and stack handling.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_STATE_H
#define _LJ_STATE_H
#include "lj_obj.h"
#define incr_top(L) \
(++L->top >= tvref(L->maxstack) && (lj_state_growstack1(L), 0))
#define savestack(L, p) ((char *)(p) - mref(L->stack, char))
... | xLua/build/luajit-2.1.0b3/src/lj_state.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_state.h",
"repo_id": "xLua",
"token_count": 556
} | 2,035 |
/*
** Definitions for x86 and x64 CPUs.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LJ_TARGET_X86_H
#define _LJ_TARGET_X86_H
/* -- Registers IDs ------------------------------------------------------- */
#if LJ_64
#define GPRDEF(_) \
_(EAX) _(ECX) _(EDX) _(EBX) _(ESP) _(EBP) ... | xLua/build/luajit-2.1.0b3/src/lj_target_x86.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lj_target_x86.h",
"repo_id": "xLua",
"token_count": 5752
} | 2,036 |
/*
** Standard library header.
** Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
*/
#ifndef _LUALIB_H
#define _LUALIB_H
#include "lua.h"
#define LUA_FILEHANDLE "FILE*"
#define LUA_COLIBNAME "coroutine"
#define LUA_MATHLIBNAME "math"
#define LUA_STRLIBNAME "string"
#define LUA_TABLIBNAME "table"... | xLua/build/luajit-2.1.0b3/src/lualib.h/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/lualib.h",
"repo_id": "xLua",
"token_count": 519
} | 2,037 |
#include <sys/time.h> // for gettimeofday()
extern "C" {
#include "lj_str_hash_x64.h"
}
#include <string>
#include <vector>
#include <utility>
#include <algorithm>
#include "test_util.hpp"
#include <stdio.h>
#include <math.h>
using namespace std;
#define lj_rol(x, n) (((x)<<(n)) | ((x)>>(-(int)(n)&(8*sizeof(x)-1))))
... | xLua/build/luajit-2.1.0b3/src/x64/test/benchmark.cxx/0 | {
"file_path": "xLua/build/luajit-2.1.0b3/src/x64/test/benchmark.cxx",
"repo_id": "xLua",
"token_count": 3492
} | 2,038 |
/*=========================================================================*\
* Simple exception support
* LuaSocket toolkit
\*=========================================================================*/
#include <stdio.h>
#include "lua.h"
#include "lauxlib.h"
#include "except.h"
/*===================================... | xLua/build/luasocket/except.c/0 | {
"file_path": "xLua/build/luasocket/except.c",
"repo_id": "xLua",
"token_count": 1032
} | 2,039 |
/*=========================================================================*\
* Serial stream
* LuaSocket toolkit
\*=========================================================================*/
#include <string.h>
#include "lua.h"
#include "lauxlib.h"
#include "auxiliar.h"
#include "socket.h"
#include "options.h"
#inc... | xLua/build/luasocket/serial.c/0 | {
"file_path": "xLua/build/luasocket/serial.c",
"repo_id": "xLua",
"token_count": 2098
} | 2,040 |
if [ -n "$ANDROID_NDK" ]; then
export NDK=${ANDROID_NDK}
elif [ -n "$ANDROID_NDK_HOME" ]; then
export NDK=${ANDROID_NDK_HOME}
elif [ -n "$ANDROID_NDK_HOME" ]; then
export NDK=${ANDROID_NDK_HOME}
else
export NDK=~/android-ndk-r15c
fi
if [ ! -d "$NDK" ]; then
echo "Please set ANDROID_NDK environment ... | xLua/build/make_android_lua54.sh/0 | {
"file_path": "xLua/build/make_android_lua54.sh",
"repo_id": "xLua",
"token_count": 496
} | 2,041 |
mkdir -p build_osx_silicon && cd build_osx_silicon
cmake -DBUILD_SILICON=ON -GXcode ../
cd ..
cmake --build build_osx_silicon --config Release
mkdir -p plugin_lua53/Plugins/arm64/
cp build_osx_silicon/Release/libxlua.dylib plugin_lua53/Plugins/arm64/
| xLua/build/make_osx_silicon_lua53.sh/0 | {
"file_path": "xLua/build/make_osx_silicon_lua53.sh",
"repo_id": "xLua",
"token_count": 103
} | 2,042 |
mkdir build64 & pushd build64
cmake -G "Visual Studio 14 2015 Win64" ..
IF %ERRORLEVEL% NEQ 0 cmake -G "Visual Studio 15 2017 Win64" ..
popd
cmake --build build64 --config Release
md plugin_lua53\Plugins\x86_64
copy /Y build64\Release\xlua.dll plugin_lua53\Plugins\x86_64\xlua.dll
pause | xLua/build/vs2015/make_win64_lua53.bat/0 | {
"file_path": "xLua/build/vs2015/make_win64_lua53.bat",
"repo_id": "xLua",
"token_count": 105
} | 2,043 |
<!DOCTYPE html>
<html lang="en">
<head>
<title>XLua — XLua</title>
<meta charset="utf-8">
<meta name="description" content="XLua">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="/xLua/public/css/index.css">
... | xLua/docs/public/index.html/0 | {
"file_path": "xLua/docs/public/index.html",
"repo_id": "xLua",
"token_count": 249
} | 2,044 |
---
title: 热标识
type: guide
order: 1000
---
## 热标识
### 使用方式
1、添加HOTFIX_ENABLE宏打开该特性(在Unity3D的File->Build Setting->Scripting Define Symbols下添加)。编辑器、各手机平台这个宏要分别设置!如果是自动化打包,要注意在代码里头用API设置的宏是不生效的,需要在编辑器设置。
(建议平时开发业务代码不打开HOTFIX_ENABLE,只在build手机版本或者要在编译器下开发补丁时打开HOTFIX_ENABLE)
2、执行XLua/Generate Code菜单。
3、注入,构建手机包这个步骤会在构建... | xLua/docs/source/src/v1/guide/hotfix.md/0 | {
"file_path": "xLua/docs/source/src/v1/guide/hotfix.md",
"repo_id": "xLua",
"token_count": 8184
} | 2,045 |
.sidebar
ul
padding-bottom 0.9375rem
h3
color #525252
font-size 1.125rem
padding-bottom 0.625rem
margin-bottom 0.625rem
padding-top 1.25rem
font-weight normal
li
font-size 0.875rem
padding-bo... | xLua/docs/source/themes/catlib/source/css/_sidebar.styl/0 | {
"file_path": "xLua/docs/source/themes/catlib/source/css/_sidebar.styl",
"repo_id": "xLua",
"token_count": 500
} | 2,046 |
/*
(C) 2019 David Lettier
lettier.com
*/
#version 150
uniform vec2 pi;
uniform vec2 gamma;
uniform vec4 backgroundColor0;
uniform vec4 backgroundColor1;
uniform sampler2D positionTexture0;
uniform sampler2D positionTexture1;
uniform sampler2D smokeMaskTexture;
uniform vec3 origin;
uniform vec2 nearFar;
uniform... | 3d-game-shaders-for-beginners/demonstration/shaders/fragment/fog.frag/0 | {
"file_path": "3d-game-shaders-for-beginners/demonstration/shaders/fragment/fog.frag",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 946
} | 0 |
/*
(C) 2019 David Lettier
lettier.com
*/
#version 150
uniform sampler2D uvTexture;
uniform sampler2D colorTexture;
out vec4 fragColor;
void main() {
int size = 6;
float separation = 2.0;
vec2 texSize = textureSize(uvTexture, 0).xy;
vec2 texCoord = gl_FragCoord.xy / texSize;
vec4 uv = textur... | 3d-game-shaders-for-beginners/demonstration/shaders/fragment/reflection-color.frag/0 | {
"file_path": "3d-game-shaders-for-beginners/demonstration/shaders/fragment/reflection-color.frag",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 528
} | 1 |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="description" content="Interested in adding texture... | 3d-game-shaders-for-beginners/docs/_template.html5/0 | {
"file_path": "3d-game-shaders-for-beginners/docs/_template.html5",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 1232
} | 2 |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="description" content="Interested in adding textures, lighting, shadows, normal maps, glowi... | 3d-game-shaders-for-beginners/docs/gamma-correction.html/0 | {
"file_path": "3d-game-shaders-for-beginners/docs/gamma-correction.html",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 5160
} | 3 |
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="description" content="Interested in adding textures, lighting, shadows, normal maps, glowi... | 3d-game-shaders-for-beginners/docs/setup.html/0 | {
"file_path": "3d-game-shaders-for-beginners/docs/setup.html",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 4540
} | 4 |
[:arrow_backward:](screen-space-refraction.md)
[:arrow_double_up:](../README.md)
[:arrow_up_small:](#)
[:arrow_down_small:](#copyright)
[:arrow_forward:](flow-mapping.md)
# 3D Game Shaders For Beginners
## Foam
<p align="center">
<img src="https://i.imgur.com/SVLPYKn.gif" alt="Foam" title="Foam">
</p>
Foam is typic... | 3d-game-shaders-for-beginners/sections/foam.md/0 | {
"file_path": "3d-game-shaders-for-beginners/sections/foam.md",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 1585
} | 5 |
[:arrow_backward:](chromatic-aberration.md)
[:arrow_double_up:](../README.md)
[:arrow_up_small:](#)
[:arrow_down_small:](#copyright)
[:arrow_forward:](screen-space-refraction.md)
# 3D Game Shaders For Beginners
## Screen Space Reflection (SSR)
<p align="center">
<img src="https://i.imgur.com/AYG4tvg.gif" alt="Screen... | 3d-game-shaders-for-beginners/sections/screen-space-reflection.md/0 | {
"file_path": "3d-game-shaders-for-beginners/sections/screen-space-reflection.md",
"repo_id": "3d-game-shaders-for-beginners",
"token_count": 9433
} | 6 |
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), AirSim.props))\AirSim.props" />
<PropertyGroup>
<ShowAllFiles>true</Show... | AirSim/AirLib/AirLib.vcxproj/0 | {
"file_path": "AirSim/AirLib/AirLib.vcxproj",
"repo_id": "AirSim",
"token_count": 10605
} | 7 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef common_utils_DelayLine_hpp
#define common_utils_DelayLine_hpp
#include "common/Common.hpp"
#include "UpdatableObject.hpp"
#include <list>
namespace msr
{
namespace airlib
{
template <typename T>
class Del... | AirSim/AirLib/include/common/DelayLine.hpp/0 | {
"file_path": "AirSim/AirLib/include/common/DelayLine.hpp",
"repo_id": "AirSim",
"token_count": 1050
} | 8 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef airsim_core_UpdatableObject_hpp
#define airsim_core_UpdatableObject_hpp
#include "common/Common.hpp"
#include "StateReporter.hpp"
#include "ClockFactory.hpp"
namespace msr
{
namespace airlib
{
/*
UpdatableObj... | AirSim/AirLib/include/common/UpdatableObject.hpp/0 | {
"file_path": "AirSim/AirLib/include/common/UpdatableObject.hpp",
"repo_id": "AirSim",
"token_count": 1250
} | 9 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef common_utils_SmoothingFilter_hpp
#define common_utils_SmoothingFilter_hpp
#include <vector>
#include <algorithm>
#include <tuple>
namespace common_utils
{
// SmoothingFilter is a filter that removes the outliers ... | AirSim/AirLib/include/common/common_utils/SmoothingFilter.hpp/0 | {
"file_path": "AirSim/AirLib/include/common/common_utils/SmoothingFilter.hpp",
"repo_id": "AirSim",
"token_count": 1363
} | 10 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef airsim_core_ExternalPhysicsEngine_hpp
#define airsim_core_ExternalPhysicsEngine_hpp
#include "common/Common.hpp"
#include "physics/PhysicsEngineBase.hpp"
#include <iostream>
#include <sstream>
#include <fstream>
#i... | AirSim/AirLib/include/physics/ExternalPhysicsEngine.hpp/0 | {
"file_path": "AirSim/AirLib/include/physics/ExternalPhysicsEngine.hpp",
"repo_id": "AirSim",
"token_count": 616
} | 11 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef msr_airlib_BarometerBase_hpp
#define msr_airlib_BarometerBase_hpp
#include "sensors/SensorBase.hpp"
namespace msr
{
namespace airlib
{
class BarometerBase : public SensorBase
{
public:
Baromet... | AirSim/AirLib/include/sensors/barometer/BarometerBase.hpp/0 | {
"file_path": "AirSim/AirLib/include/sensors/barometer/BarometerBase.hpp",
"repo_id": "AirSim",
"token_count": 566
} | 12 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef msr_airlib_MagnetometerSimple_hpp
#define msr_airlib_MagnetometerSimple_hpp
#include <random>
#include "common/Common.hpp"
#include "common/EarthUtils.hpp"
#include "MagnetometerSimpleParams.hpp"
#include "Magnetom... | AirSim/AirLib/include/sensors/magnetometer/MagnetometerSimple.hpp/0 | {
"file_path": "AirSim/AirLib/include/sensors/magnetometer/MagnetometerSimple.hpp",
"repo_id": "AirSim",
"token_count": 1836
} | 13 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef air_MultirotorRpcLibAdaptors_hpp
#define air_MultirotorRpcLibAdaptors_hpp
#include "common/Common.hpp"
#include "common/CommonStructs.hpp"
#include "api/RpcLibAdaptorsBase.hpp"
#include "vehicles/multirotor/api/Mul... | AirSim/AirLib/include/vehicles/multirotor/api/MultirotorRpcLibAdaptors.hpp/0 | {
"file_path": "AirSim/AirLib/include/vehicles/multirotor/api/MultirotorRpcLibAdaptors.hpp",
"repo_id": "AirSim",
"token_count": 2301
} | 14 |
#pragma once
#include "interfaces/IUpdatable.hpp"
#include "interfaces/IGoal.hpp"
#include "interfaces/IBoardClock.hpp"
#include "interfaces/CommonStructs.hpp"
#include "interfaces/IAxisController.hpp"
#include "AngleRateController.hpp"
#include "Params.hpp"
#include "PidController.hpp"
#include "common/common_utils/... | AirSim/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/AngleLevelController.hpp/0 | {
"file_path": "AirSim/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/AngleLevelController.hpp",
"repo_id": "AirSim",
"token_count": 1706
} | 15 |
#pragma once
#include <cstdint>
#include "IUpdatable.hpp"
#include "IGoal.hpp"
#include "IStateEstimator.hpp"
#include "IBoardClock.hpp"
namespace simple_flight
{
class IAxisController : public IUpdatable
{
public:
virtual void initialize(unsigned int axis, const IGoal* goal, const IStateEstimator* state_estimat... | AirSim/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/interfaces/IAxisController.hpp/0 | {
"file_path": "AirSim/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/interfaces/IAxisController.hpp",
"repo_id": "AirSim",
"token_count": 227
} | 16 |
// in header only mode, control library is not available
#ifndef AIRLIB_HEADER_ONLY
#include "common/common_utils/FileSystem.hpp"
#include "common/common_utils/Utils.hpp"
#include <codecvt>
#include <fstream>
#include <cstdio>
#include <string>
#if defined _WIN32 || defined _WIN64
#include "common/common_utils/Wind... | AirSim/AirLib/src/common/common_utils/FileSystem.cpp/0 | {
"file_path": "AirSim/AirLib/src/common/common_utils/FileSystem.cpp",
"repo_id": "AirSim",
"token_count": 1715
} | 17 |
#ifndef msr_AirLibUnitTests_SimpleFlightTest_hpp
#define msr_AirLibUnitTests_SimpleFlightTest_hpp
#include "vehicles/multirotor/MultiRotorParamsFactory.hpp"
#include "TestBase.hpp"
#include "physics/PhysicsWorld.hpp"
#include "physics/FastPhysicsEngine.hpp"
#include "vehicles/multirotor/api/MultirotorApiBase.hpp"
#in... | AirSim/AirLibUnitTests/SimpleFlightTest.hpp/0 | {
"file_path": "AirSim/AirLibUnitTests/SimpleFlightTest.hpp",
"repo_id": "AirSim",
"token_count": 1341
} | 18 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include <iostream>
#include <string>
#include <unordered_map>
#include <stdexcept>
#include <cmath>
#include <utility>
#include "SimpleShell.hpp"
#include "common/Common.hpp"
#include "common/common_utils/Utils.hpp"
#inclu... | AirSim/DroneShell/src/main.cpp/0 | {
"file_path": "AirSim/DroneShell/src/main.cpp",
"repo_id": "AirSim",
"token_count": 29247
} | 19 |
#pragma once
#include "common/GaussianMarkov.hpp"
#include "common/SteppableClock.hpp"
namespace msr
{
namespace airlib
{
class GaussianMarkovTest
{
public:
GaussianMarkovTest()
: pressure_factor_(0.1f, 5.0f)
{
clock_ = std::make_shared<SteppableClock>(0.02f);
... | AirSim/Examples/GaussianMarkovTest.hpp/0 | {
"file_path": "AirSim/Examples/GaussianMarkovTest.hpp",
"repo_id": "AirSim",
"token_count": 398
} | 20 |
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogViewer", "LogViewer\LogViewer.csproj", "{EF15F348-8E2A-44FE-BA67-B7642562FDE7}"
EndProject
Project("{FAE04... | AirSim/LogViewer/LogViewer.sln/0 | {
"file_path": "AirSim/LogViewer/LogViewer.sln",
"repo_id": "AirSim",
"token_count": 1295
} | 21 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;... | AirSim/LogViewer/LogViewer/Controls/ConnectorControl.xaml.cs/0 | {
"file_path": "AirSim/LogViewer/LogViewer/Controls/ConnectorControl.xaml.cs",
"repo_id": "AirSim",
"token_count": 828
} | 22 |
<Window x:Class="LogViewer.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2... | AirSim/LogViewer/LogViewer/MainWindow.xaml/0 | {
"file_path": "AirSim/LogViewer/LogViewer/MainWindow.xaml",
"repo_id": "AirSim",
"token_count": 4426
} | 23 |
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:LogViewer.Controls"
xmlns:clr="clr-namespace:System;assembly=mscorlib"... | AirSim/LogViewer/LogViewer/Themes/generic.xaml/0 | {
"file_path": "AirSim/LogViewer/LogViewer/Themes/generic.xaml",
"repo_id": "AirSim",
"token_count": 19048
} | 24 |
@echo off
cd %~dp0
echo Uploading ClickOnce installer for Px4LogViewer
AzurePublishClickOnce %~dp0publish downloads/Px4LogViewer "%LOVETTSOFTWARE_STORAGE_CONNECTION_STRING%"
if ERRORLEVEL 1 goto :eof
| AirSim/LogViewer/LogViewer/publish.cmd/0 | {
"file_path": "AirSim/LogViewer/LogViewer/publish.cmd",
"repo_id": "AirSim",
"token_count": 75
} | 25 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Serialization;
namespace MavLinkComGenerator
{
[XmlRoot(ElementName... | AirSim/MavLinkCom/MavLinkComGenerator/MavLinkMessage.cs/0 | {
"file_path": "AirSim/MavLinkCom/MavLinkComGenerator/MavLinkMessage.cs",
"repo_id": "AirSim",
"token_count": 1081
} | 26 |
#pragma once
#include <string>
#include "Commands.h"
class ConsoleBase
{
public:
virtual Command* getCommand(const std::string& line) = 0;
virtual int run() = 0;
}; | AirSim/MavLinkCom/MavLinkTest/ConsoleBase.h/0 | {
"file_path": "AirSim/MavLinkCom/MavLinkTest/ConsoleBase.h",
"repo_id": "AirSim",
"token_count": 64
} | 27 |
#include "ThreadUtils.hpp"
#include "StrictMode.hpp"
#include <codecvt>
#ifdef _WIN32
#include <windows.h> // SetThreadPriority and GetCurrentThread
#else
#include <pthread.h>
#endif
using namespace mavlink_utils;
// make the current thread run with maximum priority.
bool CurrentThread::setMaximumPriority()
{
#ifdef... | AirSim/MavLinkCom/common_utils/ThreadUtils.cpp/0 | {
"file_path": "AirSim/MavLinkCom/common_utils/ThreadUtils.cpp",
"repo_id": "AirSim",
"token_count": 861
} | 28 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MavLinkCom_MavLinkNode_hpp
#define MavLinkCom_MavLinkNode_hpp
#include <memory>
#include <vector>
#include "AsyncResult.hpp"
#include "MavLinkConnection.hpp"
#include "MavLinkMessages.hpp"
namespace mavlinkcom_imp... | AirSim/MavLinkCom/include/MavLinkNode.hpp/0 | {
"file_path": "AirSim/MavLinkCom/include/MavLinkNode.hpp",
"repo_id": "AirSim",
"token_count": 1075
} | 29 |
<?xml version="1.0"?>
<mavlink>
<version>3</version>
<dialect>0</dialect>
<enums>
<enum name="MAV_AUTOPILOT">
<description>Micro air vehicle / autopilot classes. This identifies the individual model.</description>
<entry value="0" name="MAV_AUTOPILOT_GENERIC">
<description>Generic autopilo... | AirSim/MavLinkCom/mavlink/message_definitions/common.xml/0 | {
"file_path": "AirSim/MavLinkCom/mavlink/message_definitions/common.xml",
"repo_id": "AirSim",
"token_count": 203656
} | 30 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef MavLinkCom_AdHocConnectionImpl_hpp
#define MavLinkCom_AdHocConnectionImpl_hpp
#include <memory>
#include <vector>
#include <queue>
#include <thread>
#include <mutex>
#include <unordered_set>
#include "AdHocConnecti... | AirSim/MavLinkCom/src/impl/AdHocConnectionImpl.hpp/0 | {
"file_path": "AirSim/MavLinkCom/src/impl/AdHocConnectionImpl.hpp",
"repo_id": "AirSim",
"token_count": 1105
} | 31 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "MavLinkConnection.hpp"
#ifdef ONECORE
#include <Windows.h>
#include <cfgmgr32.h>
#include <propkey.h>
#include <string>
using namespace mavlinkcom;
using namespace mavlinkcom_impl;
// {4d36e978-e325-11ce-bfc1-0... | AirSim/MavLinkCom/src/impl/onecore/OneCoreFindSerialPorts.cpp/0 | {
"file_path": "AirSim/MavLinkCom/src/impl/onecore/OneCoreFindSerialPorts.cpp",
"repo_id": "AirSim",
"token_count": 1891
} | 32 |
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>e2049e20-b6dd-... | AirSim/PythonClient/PythonClient.pyproj/0 | {
"file_path": "AirSim/PythonClient/PythonClient.pyproj",
"repo_id": "AirSim",
"token_count": 2026
} | 33 |
import setup_path
import airsim
import cv2
import numpy as np
import os
import time
import tempfile
# connect to the AirSim simulator
client = airsim.CarClient()
client.confirmConnection()
client.enableApiControl(True)
print("API Control enabled: %s" % client.isApiControlEnabled())
car_controls = airsim.CarControls()
... | AirSim/PythonClient/car/hello_car.py/0 | {
"file_path": "AirSim/PythonClient/car/hello_car.py",
"repo_id": "AirSim",
"token_count": 1292
} | 34 |
import setup_path
import airsim
from argparse import ArgumentParser
import time
import threading
import numpy as np
import cv2
import tempfile
import os
cameraTypeMap = {
"depth": airsim.ImageType.DepthVis,
"segmentation": airsim.ImageType.Segmentation,
"seg": airsim.ImageType.Segmentation,
"scene": a... | AirSim/PythonClient/computer_vision/image_benchmarker.py/0 | {
"file_path": "AirSim/PythonClient/computer_vision/image_benchmarker.py",
"repo_id": "AirSim",
"token_count": 2815
} | 35 |
import setup_path
import airsim
import time
# Run this script with clock speed in settings.json
# "ClockSpeed": 1 then change it to 0.5
# connect to the AirSim simulator
client = airsim.MultirotorClient()
client.confirmConnection()
client.enableApiControl(True)
client.armDisarm(True)
vx = vy = 0
z = -20
duration = ... | AirSim/PythonClient/multirotor/clock_speed.py/0 | {
"file_path": "AirSim/PythonClient/multirotor/clock_speed.py",
"repo_id": "AirSim",
"token_count": 294
} | 36 |
# Python client example to get Lidar data from a drone, although this script works for any AirSim-supported vehicle
# This script is for Lidar sensors using 'VehicleInertialFrame' as DataFrame under settings.json
# Sample settings.json used for this script:
'''
{
"SeeDocsAt": "https://github.com/Microsoft/AirSim/bl... | AirSim/PythonClient/multirotor/vehicleframe_lidar_pointcloud.py/0 | {
"file_path": "AirSim/PythonClient/multirotor/vehicleframe_lidar_pointcloud.py",
"repo_id": "AirSim",
"token_count": 1948
} | 37 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// by Sudipta Sinha
// adapted for AirSim by Matthias Mueller
#include "dsimage.h"
void getDispMap2(DSI& dv1, DSI& dv2, int confThreshold, float* dispMap, unsigned char* confMap)
{
int cols = (int)dv1.m_cols;
int r... | AirSim/SGM/src/sgmstereo/dsimage.cpp/0 | {
"file_path": "AirSim/SGM/src/sgmstereo/dsimage.cpp",
"repo_id": "AirSim",
"token_count": 2031
} | 38 |
#ifndef LOGGER_FILE
#define LOGGER_FILE
#include <fstream>
#if defined(__linux__) || defined(__APPLE__)
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
namespace bfs = boost::filesystem;
#endif
#define LOGGER Logger::GetLogger()
class Logger
{
public:
enum LogLevel
{
Informati... | AirSim/Unity/AirLibWrapper/AirsimWrapper/Source/Logger.h/0 | {
"file_path": "AirSim/Unity/AirLibWrapper/AirsimWrapper/Source/Logger.h",
"repo_id": "AirSim",
"token_count": 380
} | 39 |
#include "UnityDistanceSensor.h"
#include "../AirSimStructs.hpp"
#include "../PInvokeWrapper.h"
#include "../UnityUtilities.hpp"
UnityDistanceSensor::UnityDistanceSensor(std::string vehicle_name, const NedTransform* ned_transform)
: vehicle_name_(vehicle_name), ned_transform_(ned_transform)
{
}
msr::airlib::real_... | AirSim/Unity/AirLibWrapper/AirsimWrapper/Source/UnitySensors/UnityDistanceSensor.cpp/0 | {
"file_path": "AirSim/Unity/AirLibWrapper/AirsimWrapper/Source/UnitySensors/UnityDistanceSensor.cpp",
"repo_id": "AirSim",
"token_count": 407
} | 40 |
#pragma once
#include "MultirotorPawnEvents.h"
#include "../../UnityPawn.h"
class FlyingPawn : public UnityPawn
{
public:
float RotatorFactor = 1.0f;
public:
FlyingPawn(std::string multirotor_name);
MultirotorPawnEvents* getPawnEvents()
{
return &pawn_events_;
}
//called by API to set... | AirSim/Unity/AirLibWrapper/AirsimWrapper/Source/Vehicles/Multirotor/FlyingPawn.h/0 | {
"file_path": "AirSim/Unity/AirLibWrapper/AirsimWrapper/Source/Vehicles/Multirotor/FlyingPawn.h",
"repo_id": "AirSim",
"token_count": 222
} | 41 |
fileFormatVersion: 2
guid: f63bf11bc2a9a7146a4375d511e1425c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
| AirSim/Unity/UnityDemo/Assets/AirSimAssets/Prefabs/QuadCopter.prefab.meta/0 | {
"file_path": "AirSim/Unity/UnityDemo/Assets/AirSimAssets/Prefabs/QuadCopter.prefab.meta",
"repo_id": "AirSim",
"token_count": 76
} | 42 |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace AirSimUnity
{
public class AirSimTick : MonoBehaviour
{
void FixedUpdate()
{
PInvokeWrapper.CallTick(Time.fixedDeltaTime);
}
}
} | AirSim/Unity/UnityDemo/Assets/AirSimAssets/Scripts/Utilities/AirSimTick.cs/0 | {
"file_path": "AirSim/Unity/UnityDemo/Assets/AirSimAssets/Scripts/Utilities/AirSimTick.cs",
"repo_id": "AirSim",
"token_count": 116
} | 43 |
namespace AirSimUnity
{
/**
* An interface to Unity client into AirLib wrapper.
*/
public interface IAirSimInterface
{
KinemticState GetKinematicState();
void InvokeTickInAirSim(float deltaSecond);
void InvokeCollisionDetectionInAirSim(string vehicleName, CollisionInfo ... | AirSim/Unity/UnityDemo/Assets/AirSimAssets/Scripts/Vehicles/IAirSimInterface.cs/0 | {
"file_path": "AirSim/Unity/UnityDemo/Assets/AirSimAssets/Scripts/Vehicles/IAirSimInterface.cs",
"repo_id": "AirSim",
"token_count": 129
} | 44 |
namespace AirSimUnity
{
/// <summary>
/// Stores a set of float weather settings and applies them to instances of weather effects in the scene.
/// </summary>
public class WeatherParamScalarCollection
{
public enum WeatherParamScalar
{
Snow,
Count
}
... | AirSim/Unity/UnityDemo/Assets/AirSimAssets/Scripts/Weather/WeatherParamScalarCollection.cs/0 | {
"file_path": "AirSim/Unity/UnityDemo/Assets/AirSimAssets/Scripts/Weather/WeatherParamScalarCollection.cs",
"repo_id": "AirSim",
"token_count": 244
} | 45 |
fileFormatVersion: 2
guid: 56587ec32694e684a97ecabef25d589d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
| AirSim/Unity/UnityDemo/Assets/AirSimAssets/Weather/WeatherFX/Prefabs/Particles/P_Weather_SnowFX.prefab.meta/0 | {
"file_path": "AirSim/Unity/UnityDemo/Assets/AirSimAssets/Weather/WeatherFX/Prefabs/Particles/P_Weather_SnowFX.prefab.meta",
"repo_id": "AirSim",
"token_count": 63
} | 46 |
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!... | AirSim/Unity/UnityDemo/Assets/Scenes/WeatherTest.unity/0 | {
"file_path": "AirSim/Unity/UnityDemo/Assets/Scenes/WeatherTest.unity",
"repo_id": "AirSim",
"token_count": 14865
} | 47 |
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: SkyCarWheelGrey
m_Shader: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _EMISSION _LIGHT... | AirSim/Unity/UnityDemo/Assets/Standard Assets/Vehicles/Car/Materials/SkyCarWheelGrey.mat/0 | {
"file_path": "AirSim/Unity/UnityDemo/Assets/Standard Assets/Vehicles/Car/Materials/SkyCarWheelGrey.mat",
"repo_id": "AirSim",
"token_count": 1596
} | 48 |
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!47 &1
QualitySettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_CurrentQuality: 3
m_QualitySettings:
- serializedVersion: 2
name: Very Low
pixelLightCount: 0
shadows: 0
shadowResolution: 0
shadowProjection: 1
shadowCascades: 1
shad... | AirSim/Unity/UnityDemo/ProjectSettings/QualitySettings.asset/0 | {
"file_path": "AirSim/Unity/UnityDemo/ProjectSettings/QualitySettings.asset",
"repo_id": "AirSim",
"token_count": 2452
} | 49 |
[/Script/Engine.GameUserSettings]
FullscreenMode=1 | AirSim/Unreal/Environments/Blocks/Config/DefaultGameUserSettings.ini/0 | {
"file_path": "AirSim/Unreal/Environments/Blocks/Config/DefaultGameUserSettings.ini",
"repo_id": "AirSim",
"token_count": 15
} | 50 |
rd /s/q Build
rd /s/q Binaries
rd /s/q Intermediate
rd /s/q Saved
mkdir Saved\logs
rd /s/q Plugins\AirSim\Binaries
rd /s/q Plugins\AirSim\Intermediate
rd /s/q Plugins\AirSim\Saved
del *.sln
| AirSim/Unreal/Environments/Blocks/clean.bat/0 | {
"file_path": "AirSim/Unreal/Environments/Blocks/clean.bat",
"repo_id": "AirSim",
"token_count": 86
} | 51 |
#include "AirSimGameMode.h"
#include "Misc/FileHelper.h"
#include "IImageWrapperModule.h"
#include "SimHUD/SimHUD.h"
#include "common/Common.hpp"
#include "AirBlueprintLib.h"
class AUnrealLog : public msr::airlib::Utils::Logger
{
public:
virtual void log(int level, const std::string& message) override
{
... | AirSim/Unreal/Plugins/AirSim/Source/AirSimGameMode.cpp/0 | {
"file_path": "AirSim/Unreal/Plugins/AirSim/Source/AirSimGameMode.cpp",
"repo_id": "AirSim",
"token_count": 1023
} | 52 |
#include "PawnSimApi.h"
#include "Engine/World.h"
#include "Kismet/KismetSystemLibrary.h"
#include "Kismet/GameplayStatics.h"
#include "Camera/CameraComponent.h"
#include "Components/LineBatchComponent.h"
#include "AirBlueprintLib.h"
#include "common/ClockFactory.hpp"
#include "PIPCamera.h"
#include "NedTransform.h"
#... | AirSim/Unreal/Plugins/AirSim/Source/PawnSimApi.cpp/0 | {
"file_path": "AirSim/Unreal/Plugins/AirSim/Source/PawnSimApi.cpp",
"repo_id": "AirSim",
"token_count": 9106
} | 53 |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "Runtime/UMG/Public/Components/Image.h"
#include "LoadingScreenWidget.generated.h"
UCLASS()
class AIRSIM_API ULoadingScreenWidget : public UUserWidget
{
... | AirSim/Unreal/Plugins/AirSim/Source/SimMode/LoadingScreenWidget.h/0 | {
"file_path": "AirSim/Unreal/Plugins/AirSim/Source/SimMode/LoadingScreenWidget.h",
"repo_id": "AirSim",
"token_count": 110
} | 54 |
#pragma once
#include "CoreMinimal.h"
#include "WheeledVehicle.h"
#include "Components/SkeletalMeshComponent.h"
#include "PhysicalMaterials/PhysicalMaterial.h"
#include "UObject/ConstructorHelpers.h"
#include "physics/Kinematics.hpp"
#include "vehicles/car/api/CarApiBase.hpp"
#include "common/AirSimSettings.hpp"
#inc... | AirSim/Unreal/Plugins/AirSim/Source/Vehicles/Car/CarPawn.h/0 | {
"file_path": "AirSim/Unreal/Plugins/AirSim/Source/Vehicles/Car/CarPawn.h",
"repo_id": "AirSim",
"token_count": 1205
} | 55 |
#pragma once
#include "GameFramework/RotatingMovementComponent.h"
#include <memory>
#include "PIPCamera.h"
#include "common/common_utils/Signal.hpp"
#include "common/common_utils/UniqueValueMap.hpp"
#include "MultirotorPawnEvents.h"
#include "FlyingPawn.generated.h"
UCLASS()
class AIRSIM_API AFlyingPawn : public AP... | AirSim/Unreal/Plugins/AirSim/Source/Vehicles/Multirotor/FlyingPawn.h/0 | {
"file_path": "AirSim/Unreal/Plugins/AirSim/Source/Vehicles/Multirotor/FlyingPawn.h",
"repo_id": "AirSim",
"token_count": 681
} | 56 |
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Start AirSim",
"type": "shell",
"options": {"shell": {"executable": "powershell.exe"}},
"command... | AirSim/azure/.vscode/tasks.json/0 | {
"file_path": "AirSim/azure/.vscode/tasks.json",
"repo_id": "AirSim",
"token_count": 190
} | 57 |
@echo off
REM //---------- set up variable ----------
setlocal
set ROOT_DIR=%~dp0
rd /s/q external
git clean -ffdx
git pull
REM // Redirect command line arguments
build.cmd %*
| AirSim/clean_rebuild.bat/0 | {
"file_path": "AirSim/clean_rebuild.bat",
"repo_id": "AirSim",
"token_count": 58
} | 58 |
import argparse
import subprocess
def main():
parser = argparse.ArgumentParser(description='AirSim docker image builder')
parser.add_argument('--source', action='store_true', help='compile unreal and airsim from source') # default is false
parser.add_argument('--base_image', type=str, help='base image name... | AirSim/docker/build_airsim_image.py/0 | {
"file_path": "AirSim/docker/build_airsim_image.py",
"repo_id": "AirSim",
"token_count": 685
} | 59 |
# AirSim Development Environment on Azure
This document explains how to automate the creation of a development environment on Azure and code and debug a Python application connected to AirSim using Visual Studio Code
## Automatically Deploy Your Azure VM
Click the blue button to start the Azure deployment (The templa... | AirSim/docs/azure.md/0 | {
"file_path": "AirSim/docs/azure.md",
"repo_id": "AirSim",
"token_count": 1729
} | 60 |
# Implementing a Drone Survey script
Moved here from [https://github.com/microsoft/AirSim/wiki/Implementing-a-Drone-Survey-script](https://github.com/microsoft/AirSim/wiki/Implementing-a-Drone-Survey-script)
Ever wanted to capture a bunch of top-down pictures of a certain location? Well, the Python API makes this rea... | AirSim/docs/drone_survey.md/0 | {
"file_path": "AirSim/docs/drone_survey.md",
"repo_id": "AirSim",
"token_count": 905
} | 61 |
headings_flag 1
heading_prefix "{\\bf "
heading_suffix "}\\nopagebreak%\n \\indexspace\\nopagebreak%"
delim_0 "\\idxquad "
delim_1 "\\idxquad "
delim_2 "\\idxquad "
delim_n ",\\,"
| AirSim/docs/paper/svind.ist/0 | {
"file_path": "AirSim/docs/paper/svind.ist",
"repo_id": "AirSim",
"token_count": 79
} | 62 |
# PX4 Setup for AirSim
The [PX4 software stack](http://github.com/px4/firmware) is an open source very popular flight controller with support for wide variety of boards and sensors as well as built-in capability for higher level tasks such as mission planning. Please visit [px4.io](http://px4.io) for more information.... | AirSim/docs/px4_setup.md/0 | {
"file_path": "AirSim/docs/px4_setup.md",
"repo_id": "AirSim",
"token_count": 2881
} | 63 |
# Upgrading API Client Code
There have been several API changes in AirSim v1.2 that we hope removes inconsistency, adds future extensibility and presents cleaner interface. Many of these changes are however *breaking changes* which means you will need to modify your client code that talks to AirSim.
## Quicker Way
Whi... | AirSim/docs/upgrade_apis.md/0 | {
"file_path": "AirSim/docs/upgrade_apis.md",
"repo_id": "AirSim",
"token_count": 1304
} | 64 |
{
"ClockSpeed": 1,
"SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/main/docs/settings.md",
"SettingsVersion": 1.2,
"SimMode": "Multirotor",
"Vehicles": {
"Drone_1": {
"VehicleType": "SimpleFlight",
"Sensors": {
"imu_1": {
"SensorType": 2,
"Enabled": true
... | AirSim/ros/src/airsim_tutorial_pkgs/settings/two_drones_camera_lidar_imu.json/0 | {
"file_path": "AirSim/ros/src/airsim_tutorial_pkgs/settings/two_drones_camera_lidar_imu.json",
"repo_id": "AirSim",
"token_count": 1623
} | 65 |
#Request : expects position setpoint via x, y, z
#Request : expects yaw setpoint via yaw (send yaw_valid=true)
float64 x
float64 y
float64 z
float64 yaw
string vehicle_name
---
#Response : success=true - (if async=false && if setpoint reached before timeout = 30sec) || (if async=true)
bool success
string message | AirSim/ros2/src/airsim_interfaces/srv/SetLocalPosition.srv/0 | {
"file_path": "AirSim/ros2/src/airsim_interfaces/srv/SetLocalPosition.srv",
"repo_id": "AirSim",
"token_count": 95
} | 66 |
import launch
import launch_ros.actions
def generate_launch_description():
ld = launch.LaunchDescription([
launch_ros.actions.Node(
package='tf2_ros',
executable='static_transform_publisher',
name='ned_to_enu_pub',
arguments=['0', '0', '0', '1.57', '0', '3.... | AirSim/ros2/src/airsim_ros_pkgs/launch/static_transforms.launch.py/0 | {
"file_path": "AirSim/ros2/src/airsim_ros_pkgs/launch/static_transforms.launch.py",
"repo_id": "AirSim",
"token_count": 184
} | 67 |
#!/usr/bin/env bash
# This script is meant to be run for CI, otherwise it can break exisitng setups
set -x
DISTRO="$(lsb_release -sc)"
if [[ "$DISTRO" == "focal" ]]; then
ROS_DISTRO="noetic"
elif [[ "$DISTRO" == "bionic" ]]; then
ROS_DISTRO="melodic"
elif [[ "$DISTRO" == "xenial" ]]; then
ROS_DISTRO="kin... | AirSim/tools/install_ros_deps.sh/0 | {
"file_path": "AirSim/tools/install_ros_deps.sh",
"repo_id": "AirSim",
"token_count": 636
} | 68 |
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;netstandard2.0;net5.0;net6.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Version>0.16.0.0</Version>
<AssemblyVersion>0.16.0.0</AssemblyVersion>
<FileVersion>0.16.0.0</FileVersion>
<Copyright>Copyrig... | AssetStudio/AssetStudio.PInvoke/AssetStudio.PInvoke.csproj/0 | {
"file_path": "AssetStudio/AssetStudio.PInvoke/AssetStudio.PInvoke.csproj",
"repo_id": "AssetStudio",
"token_count": 171
} | 69 |
using System;
namespace SevenZip.Compression.RangeCoder
{
struct BitEncoder
{
public const int kNumBitModelTotalBits = 11;
public const uint kBitModelTotal = (1 << kNumBitModelTotalBits);
const int kNumMoveBits = 5;
const int kNumMoveReducingBits = 2;
public const int kNumBitPriceShiftBits = 6;
uint Pro... | AssetStudio/AssetStudio/7zip/Compress/RangeCoder/RangeCoderBit.cs/0 | {
"file_path": "AssetStudio/AssetStudio/7zip/Compress/RangeCoder/RangeCoderBit.cs",
"repo_id": "AssetStudio",
"token_count": 1360
} | 70 |
/* Copyright 2015 Google Inc. All Rights Reserved.
Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
namespace Org.Brotli.Dec
{
/// <summary>Enumeration of decoding state-machine.</summary>
internal sealed class RunningState
{
internal const int Uninitial... | AssetStudio/AssetStudio/Brotli/RunningState.cs/0 | {
"file_path": "AssetStudio/AssetStudio/Brotli/RunningState.cs",
"repo_id": "AssetStudio",
"token_count": 233
} | 71 |
using System.Collections.Generic;
using System.Linq;
namespace AssetStudio
{
public class Node
{
public int m_ParentId;
public int m_AxesId;
public Node(ObjectReader reader)
{
m_ParentId = reader.ReadInt32();
m_AxesId = reader.ReadInt32();
}
... | AssetStudio/AssetStudio/Classes/Avatar.cs/0 | {
"file_path": "AssetStudio/AssetStudio/Classes/Avatar.cs",
"repo_id": "AssetStudio",
"token_count": 4795
} | 72 |
using System;
namespace AssetStudio
{
public sealed class PPtr<T> where T : Object
{
public int m_FileID;
public long m_PathID;
private SerializedFile assetsFile;
private int index = -2; //-2 - Prepare, -1 - Missing
public PPtr(ObjectReader reader)
{
... | AssetStudio/AssetStudio/Classes/PPtr.cs/0 | {
"file_path": "AssetStudio/AssetStudio/Classes/PPtr.cs",
"repo_id": "AssetStudio",
"token_count": 2366
} | 73 |
using System;
using System.Buffers.Binary;
using System.IO;
namespace AssetStudio
{
public class EndianBinaryReader : BinaryReader
{
private readonly byte[] buffer;
public EndianType Endian;
public EndianBinaryReader(Stream stream, EndianType endian = EndianType.BigEndian) : base(str... | AssetStudio/AssetStudio/EndianBinaryReader.cs/0 | {
"file_path": "AssetStudio/AssetStudio/EndianBinaryReader.cs",
"repo_id": "AssetStudio",
"token_count": 1562
} | 74 |
using System;
using System.Runtime.InteropServices;
namespace AssetStudio
{
[StructLayout(LayoutKind.Sequential, Pack = 4)]
public struct Matrix4x4 : IEquatable<Matrix4x4>
{
public float M00;
public float M10;
public float M20;
public float M30;
public float M01;
... | AssetStudio/AssetStudio/Math/Matrix4x4.cs/0 | {
"file_path": "AssetStudio/AssetStudio/Math/Matrix4x4.cs",
"repo_id": "AssetStudio",
"token_count": 5345
} | 75 |
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Text;
namespace AssetStudio
{
public static class TypeTreeHelper
{
public static string ReadTypeString(TypeTree m_Type, ObjectReader reader)
{
reader.Reset();
... | AssetStudio/AssetStudio/TypeTreeHelper.cs/0 | {
"file_path": "AssetStudio/AssetStudio/TypeTreeHelper.cs",
"repo_id": "AssetStudio",
"token_count": 8764
} | 76 |
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace A... | AssetStudio/AssetStudioGUI/Properties/Resources.Designer.cs/0 | {
"file_path": "AssetStudio/AssetStudioGUI/Properties/Resources.Designer.cs",
"repo_id": "AssetStudio",
"token_count": 3094
} | 77 |
using System;
using System.Collections.Generic;
using System.Text;
namespace SpirV
{
public class ParsedOperand
{
public ParsedOperand(IReadOnlyList<uint> words, int index, int count, object value, Operand operand)
{
uint[] array = new uint[count];
for (int i = 0; i < count; i++)
{
array[i] = words[... | AssetStudio/AssetStudioUtility/CSspv/ParsedInstruction.cs/0 | {
"file_path": "AssetStudio/AssetStudioUtility/CSspv/ParsedInstruction.cs",
"repo_id": "AssetStudio",
"token_count": 2414
} | 78 |
namespace Smolv
{
public struct OpData
{
public OpData(byte hasResult, byte hasType, sbyte deltaFromResult, byte varrest)
{
this.hasResult = hasResult;
this.hasType = hasType;
this.deltaFromResult = deltaFromResult;
this.varrest = varrest;
}
/// <summary>
/// Does it have result ID?
/// </sum... | AssetStudio/AssetStudioUtility/Smolv/OpData.cs/0 | {
"file_path": "AssetStudio/AssetStudioUtility/Smolv/OpData.cs",
"repo_id": "AssetStudio",
"token_count": 7114
} | 79 |
// File: crn_decomp.h - Fast CRN->DXTc texture transcoder header file library
// Copyright (c) 2010-2016 Richard Geldreich, Jr. All rights reserved.
// See Copyright Notice and license at the end of this file.
//
// This single header file contains *all* of the code necessary to unpack .CRN files to raw DXTn bits.
// I... | AssetStudio/Texture2DDecoderNative/crunch/crn_decomp.h/0 | {
"file_path": "AssetStudio/Texture2DDecoderNative/crunch/crn_decomp.h",
"repo_id": "AssetStudio",
"token_count": 76293
} | 80 |
#ifndef CRND_INCLUDE_CRN_DEFS_H
#define CRND_INCLUDE_CRN_DEFS_H
// Include crnlib.h (only to bring in some basic CRN-related types).
#include "crnlib.h"
#define CRND_LIB_VERSION 104
#define CRND_VERSION_STRING "01.04"
#ifdef _DEBUG
#define CRND_BUILD_DEBUG
#else
#define CRND_BUILD_RELEASE
#endif
// CRN decompressio... | AssetStudio/Texture2DDecoderNative/unitycrunch/crn_defs.h/0 | {
"file_path": "AssetStudio/Texture2DDecoderNative/unitycrunch/crn_defs.h",
"repo_id": "AssetStudio",
"token_count": 3961
} | 81 |
# 事件机制EventSystem
ECS最重要的特性一是数据跟逻辑分离,二是数据驱动逻辑。什么是数据驱动逻辑呢?不太好理解,我们举个例子
一个moba游戏,英雄都有血条,血条会在人物头上显示,也会在左上方头像UI上显示。这时候服务端发来一个扣血消息。我们怎么处理这个消息?第一种方法,在消息处理函数中修改英雄的血数值,修改头像上血条显示,同时修改头像UI的血条。这种方式很明显造成了模块间的耦合。第二种方法,扣血消息处理函数中只是改变血值,血值的改变抛出一个hpchange的事件,人物头像模块跟UI模块都订阅血值改变事件,在订阅的方法中分别处理自己的逻辑,这样各个模块负责自己的逻辑,没有耦合。
ET提供了多种事件,事件都是可以多次... | ET/Book/3.4事件机制EventSystem.md/0 | {
"file_path": "ET/Book/3.4事件机制EventSystem.md",
"repo_id": "ET",
"token_count": 2505
} | 82 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.