зеркало из https://github.com/microsoft/DirectXTK.git
Страница:
Ray
Страницы
3D shapes
Adding audio to your project
Adding the DirectX Tool Kit for Audio
Adding the DirectX Tool Kit
AlphaTestEffect
AnimatedTexture
Animating using model bones
Audio
AudioEmitter
AudioEngine
AudioListener
Authoring an Effect
Basic game math
BasicEffect
BasicPostProcess
BufferHelpers
Collision detection
Color
ComPtr
CommonStates
ControllerFont
Creating and playing sounds
Creating custom shaders with DGSL
DDSTextureLoader
DGSLEffect
DebugDraw
DebugEffect
DeviceResources
DirectXHelpers
DirectXTK
Drawing text
DualPostProcess
DualTextureEffect
DynamicSoundEffectInstance
EffectFactory
Effects
EnvironmentMapEffect
Game Gallery
Game controller input
GamePad
GeometricPrimitive
Getting Started
GraphicsMemory
Home
IEffect
IEffectFog
IEffectLights
IEffectMatrices
IEffectSkinning
Implementation
Keyboard
Legacy XAudio 2.7 Notes
Line drawing and anti aliasing
MSAAHelper
MakeSpriteFont
Making use of wave banks
Matrix
Mixing SimpleMath and DirectXMath
Model
ModelBone
ModelMesh
ModelMeshPart
More tricks with sprites
Mouse and keyboard input
Mouse
Multistream rendering and instancing
NormalMapEffect
PBREffect
Physically based rendering
Picking
Plane
PostProcess
PrimitiveBatch
Quaternion
Ray
Rectangle
RenderTexture
Rendering a model
Resources
Samples
ScreenGrab
ScrollingBackground
Simple rendering
SimpleMath
SkinnedEffect
SoundEffect
SoundEffectInstance
SoundStreamInstance
SpriteBatch
SpriteFont
SpriteSheet
Sprites and textures
StepTimer
TextConsole
The basic game loop
ThrowIfFailed
ToneMapPostProcess
Using DeviceResources
Using HDR rendering
Using advanced shaders
Using positional audio
Using skinned models
Using the SimpleMath library
Utilities
Vector2
Vector3
Vector4
VertexTypes
Viewport
WICTextureLoader
Wave Formats
WaveBank
Writing custom shaders
XWBTool
XboxDDSTextureLoader
8
Ray
Chuck Walbourn редактировал(а) эту страницу 2022-04-26 16:45:12 -07:00
Содержание
DirectXTK | SimpleMath |
---|
Ray class modeled after the XNA Game Studio 4 (Microsoft.Xna.Framework.Ray
) math library.
Header
#include <SimpleMath.h>
Initialization
using namespace DirectX::SimpleMath;
Ray r; // Create a ray starting at the origin
// pointing in positive Z
Ray( Vector3(1,2,3), Vector3(0,1,0 ); // Creates a ray at 1,2,3
// pointing in positive Y
Fields
- position: Position of the ray
- direction: Direction vector of the ray
Methods
- Comparison operators:
==
and!=
- Intersects: Performs intersection tests of the ray against a collision type, a triangle, or a Plane.
Further reading
For Use
- Universal Windows Platform apps
- Windows desktop apps
- Windows 11
- Windows 10
- Windows 8.1
- Windows 7 Service Pack 1
- Xbox One
Architecture
- x86
- x64
- ARM64
For Development
- Visual Studio 2022
- Visual Studio 2019 (16.11)
- clang/LLVM v12 - v18
- MinGW 12.2, 13.2
- CMake 3.20
Related Projects
DirectX Tool Kit for DirectX 12
Tools
All content and source code for this package are subject to the terms of the MIT License.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.