Rise
The Vieneo Province
Loading...
Searching...
No Matches
Rendering::WindshieldRain11 Class Reference

#include <WindshieldRain11.h>

Collaboration diagram for Rendering::WindshieldRain11:
[legend]

Classes

struct  Vertex
struct  Image
struct  Pane
struct  Wiper

Public Types

enum class  DepthLayout { Unified , CockpitAndWorld }
using Vector = DirectX::XMFLOAT3
using Matrix = DirectX::XMFLOAT4X4

Public Member Functions

HRESULT Initialize (ID3D11Device *device, const std::filesystem::path &shaderDirectory={})
void Clear ()
void SetSimulator (bool value)
void SetGlassCondition (int condition)
void ResetDevice ()
void ReleaseTargets ()
void AddGlass (int component, const Vertex *vertices, size_t count)
void AddWiper (int component, const Vertex *vertices, size_t count)
void FinishGeometry ()
void Update (float elapsed, float rain, const Vector &acceleration, const Vector &relativeWind, const std::vector< Matrix > &transforms, float airDensity, bool wiping, float rainAir=0)
HRESULT Render (ID3D11DeviceContext *context, ID3D11RenderTargetView *target, ID3D11DepthStencilView *depth, const D3D11_VIEWPORT &viewport, const std::vector< Matrix > &world, const Matrix &viewProjection, float opacity=1, DepthLayout depthLayout=DepthLayout::Unified, float cockpitLight=0, ID3D11RenderTargetView *adExclusion=nullptr)
size_t PaneCount () const
bool Wet () const
float Wetness () const
const std::string & Status () const

Static Public Member Functions

static Matrix ToPhysicsTransform (const Matrix &cockpitToView)
static WindshieldRain::Point ProjectAcceleration (const Vector &acceleration, const Matrix &inverse, const Vector &normal, const Vector &u, const Vector &v)

Private Member Functions

HRESULT CreateImage (Image &image, UINT width, UINT height, DXGI_FORMAT format, bool dynamic=false, DXGI_SAMPLE_DESC samples={1, 0})
HRESULT Upload (ID3D11DeviceContext *context, Pane &pane)
HRESULT PrepareTargets (const D3D11_TEXTURE2D_DESC &description)

Private Attributes

std::vector< Pane > panes
bool simulator =false
int glassCondition =127
std::vector< Wiper > wipers
std::vector< Matrix > previousTransforms
std::vector< uint32_t > filmUpload
std::vector< WindshieldRain::Surface::BeadSample > beadUpload
std::vector< WindshieldRain::Surface::WakeSample > wakeUpload
std::vector< float > distanceUpload
Microsoft::WRL::ComPtr< ID3D11Device > device
Microsoft::WRL::ComPtr< ID3DDeviceContextState > isolated
Program11 water
Program11 waterWithAdMask
Program11 visibilityProgram
Program11 damage
Program11 damageWithAdMask
Parameters11 parameters
std::vector< Microsoft::WRL::ComPtr< ID3D11SamplerState > > samplers
Microsoft::WRL::ComPtr< ID3D11DepthStencilState > unifiedDepth
Microsoft::WRL::ComPtr< ID3D11DepthStencilState > noDepth
Microsoft::WRL::ComPtr< ID3D11DepthStencilState > worldDepth
Microsoft::WRL::ComPtr< ID3D11DepthStencilState > cockpitDepth
Microsoft::WRL::ComPtr< ID3D11BlendState > opaque
Microsoft::WRL::ComPtr< ID3D11BlendState > alpha
Microsoft::WRL::ComPtr< ID3D11BlendState > alphaWithAdMask
Image scene
Image visibility
Image visibilitySamples
bool compactVisibility =true
DXGI_FORMAT visibilityFormat =DXGI_FORMAT_UNKNOWN
D3D11_TEXTURE2D_DESC targetDescription {}
std::string status ="native windshield rain not initialized"

Friends

struct WindshieldRain11TestAccess

Detailed Description

Definition at line 11 of file WindshieldRain11.h.

Member Typedef Documentation

◆ Matrix

using Rendering::WindshieldRain11::Matrix = DirectX::XMFLOAT4X4

Definition at line 15 of file WindshieldRain11.h.

◆ Vector

using Rendering::WindshieldRain11::Vector = DirectX::XMFLOAT3

Definition at line 14 of file WindshieldRain11.h.

Member Enumeration Documentation

◆ DepthLayout

Enumerator
Unified 
CockpitAndWorld 

Definition at line 17 of file WindshieldRain11.h.

Member Function Documentation

◆ AddGlass()

void Rendering::WindshieldRain11::AddGlass ( int component,
const Vertex * vertices,
size_t count )

Definition at line 108 of file WindshieldRain11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddWiper()

void Rendering::WindshieldRain11::AddWiper ( int component,
const Vertex * vertices,
size_t count )

Definition at line 140 of file WindshieldRain11.cpp.

Here is the caller graph for this function:

◆ Clear()

void Rendering::WindshieldRain11::Clear ( )

Definition at line 75 of file WindshieldRain11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateImage()

HRESULT Rendering::WindshieldRain11::CreateImage ( Image & image,
UINT width,
UINT height,
DXGI_FORMAT format,
bool dynamic = false,
DXGI_SAMPLE_DESC samples = {1,0} )
private

Definition at line 370 of file WindshieldRain11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FinishGeometry()

void Rendering::WindshieldRain11::FinishGeometry ( )

Definition at line 144 of file WindshieldRain11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Initialize()

HRESULT Rendering::WindshieldRain11::Initialize ( ID3D11Device * device,
const std::filesystem::path & shaderDirectory = {} )

Definition at line 317 of file WindshieldRain11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PaneCount()

size_t Rendering::WindshieldRain11::PaneCount ( ) const
inline

Definition at line 37 of file WindshieldRain11.h.

Here is the caller graph for this function:

◆ PrepareTargets()

HRESULT Rendering::WindshieldRain11::PrepareTargets ( const D3D11_TEXTURE2D_DESC & description)
private

Definition at line 382 of file WindshieldRain11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProjectAcceleration()

WindshieldRain::Point Rendering::WindshieldRain11::ProjectAcceleration ( const Vector & acceleration,
const Matrix & inverse,
const Vector & normal,
const Vector & u,
const Vector & v )
static

Definition at line 50 of file WindshieldRain11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReleaseTargets()

void Rendering::WindshieldRain11::ReleaseTargets ( )

Definition at line 94 of file WindshieldRain11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Render()

HRESULT Rendering::WindshieldRain11::Render ( ID3D11DeviceContext * context,
ID3D11RenderTargetView * target,
ID3D11DepthStencilView * depth,
const D3D11_VIEWPORT & viewport,
const std::vector< Matrix > & world,
const Matrix & viewProjection,
float opacity = 1,
DepthLayout depthLayout = DepthLayout::Unified,
float cockpitLight = 0,
ID3D11RenderTargetView * adExclusion = nullptr )

Definition at line 439 of file WindshieldRain11.cpp.

Here is the caller graph for this function:

◆ ResetDevice()

void Rendering::WindshieldRain11::ResetDevice ( )

Definition at line 99 of file WindshieldRain11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetGlassCondition()

void Rendering::WindshieldRain11::SetGlassCondition ( int condition)

Definition at line 89 of file WindshieldRain11.cpp.

Here is the caller graph for this function:

◆ SetSimulator()

void Rendering::WindshieldRain11::SetSimulator ( bool value)

Definition at line 79 of file WindshieldRain11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Status()

const std::string & Rendering::WindshieldRain11::Status ( ) const
inline

Definition at line 40 of file WindshieldRain11.h.

◆ ToPhysicsTransform()

Matrix Rendering::WindshieldRain11::ToPhysicsTransform ( const Matrix & cockpitToView)
static

Definition at line 42 of file WindshieldRain11.cpp.

Here is the caller graph for this function:

◆ Update()

void Rendering::WindshieldRain11::Update ( float elapsed,
float rain,
const Vector & acceleration,
const Vector & relativeWind,
const std::vector< Matrix > & transforms,
float airDensity,
bool wiping,
float rainAir = 0 )

Definition at line 225 of file WindshieldRain11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Upload()

HRESULT Rendering::WindshieldRain11::Upload ( ID3D11DeviceContext * context,
Pane & pane )
private

Definition at line 412 of file WindshieldRain11.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Wet()

bool Rendering::WindshieldRain11::Wet ( ) const

Definition at line 215 of file WindshieldRain11.cpp.

Here is the caller graph for this function:

◆ Wetness()

float Rendering::WindshieldRain11::Wetness ( ) const

Definition at line 219 of file WindshieldRain11.cpp.

Here is the caller graph for this function:

◆ WindshieldRain11TestAccess

friend struct WindshieldRain11TestAccess
friend

Definition at line 42 of file WindshieldRain11.h.

Member Data Documentation

◆ alpha

Microsoft::WRL::ComPtr<ID3D11BlendState> Rendering::WindshieldRain11::alpha
private

Definition at line 82 of file WindshieldRain11.h.

◆ alphaWithAdMask

Microsoft::WRL::ComPtr<ID3D11BlendState> Rendering::WindshieldRain11::alphaWithAdMask
private

Definition at line 82 of file WindshieldRain11.h.

◆ beadUpload

std::vector<WindshieldRain::Surface::BeadSample> Rendering::WindshieldRain11::beadUpload
private

Definition at line 73 of file WindshieldRain11.h.

◆ cockpitDepth

Microsoft::WRL::ComPtr<ID3D11DepthStencilState> Rendering::WindshieldRain11::cockpitDepth
private

Definition at line 81 of file WindshieldRain11.h.

◆ compactVisibility

bool Rendering::WindshieldRain11::compactVisibility =true
private

Definition at line 85 of file WindshieldRain11.h.

◆ damage

Program11 Rendering::WindshieldRain11::damage
private

Definition at line 78 of file WindshieldRain11.h.

◆ damageWithAdMask

Program11 Rendering::WindshieldRain11::damageWithAdMask
private

Definition at line 78 of file WindshieldRain11.h.

◆ device

Microsoft::WRL::ComPtr<ID3D11Device> Rendering::WindshieldRain11::device
private

Definition at line 76 of file WindshieldRain11.h.

◆ distanceUpload

std::vector<float> Rendering::WindshieldRain11::distanceUpload
private

Definition at line 75 of file WindshieldRain11.h.

◆ filmUpload

std::vector<uint32_t> Rendering::WindshieldRain11::filmUpload
private

Definition at line 72 of file WindshieldRain11.h.

◆ glassCondition

int Rendering::WindshieldRain11::glassCondition =127
private

Definition at line 69 of file WindshieldRain11.h.

◆ isolated

Microsoft::WRL::ComPtr<ID3DDeviceContextState> Rendering::WindshieldRain11::isolated
private

Definition at line 77 of file WindshieldRain11.h.

◆ noDepth

Microsoft::WRL::ComPtr<ID3D11DepthStencilState> Rendering::WindshieldRain11::noDepth
private

Definition at line 81 of file WindshieldRain11.h.

◆ opaque

Microsoft::WRL::ComPtr<ID3D11BlendState> Rendering::WindshieldRain11::opaque
private

Definition at line 82 of file WindshieldRain11.h.

◆ panes

std::vector<Pane> Rendering::WindshieldRain11::panes
private

Definition at line 67 of file WindshieldRain11.h.

◆ parameters

Parameters11 Rendering::WindshieldRain11::parameters
private

Definition at line 79 of file WindshieldRain11.h.

◆ previousTransforms

std::vector<Matrix> Rendering::WindshieldRain11::previousTransforms
private

Definition at line 71 of file WindshieldRain11.h.

◆ samplers

std::vector<Microsoft::WRL::ComPtr<ID3D11SamplerState> > Rendering::WindshieldRain11::samplers
private

Definition at line 80 of file WindshieldRain11.h.

◆ scene

Image Rendering::WindshieldRain11::scene
private

Definition at line 83 of file WindshieldRain11.h.

◆ simulator

bool Rendering::WindshieldRain11::simulator =false
private

Definition at line 68 of file WindshieldRain11.h.

◆ status

std::string Rendering::WindshieldRain11::status ="native windshield rain not initialized"
private

Definition at line 88 of file WindshieldRain11.h.

◆ targetDescription

D3D11_TEXTURE2D_DESC Rendering::WindshieldRain11::targetDescription {}
private

Definition at line 87 of file WindshieldRain11.h.

◆ unifiedDepth

Microsoft::WRL::ComPtr<ID3D11DepthStencilState> Rendering::WindshieldRain11::unifiedDepth
private

Definition at line 81 of file WindshieldRain11.h.

◆ visibility

Image Rendering::WindshieldRain11::visibility
private

Definition at line 83 of file WindshieldRain11.h.

◆ visibilityFormat

DXGI_FORMAT Rendering::WindshieldRain11::visibilityFormat =DXGI_FORMAT_UNKNOWN
private

Definition at line 86 of file WindshieldRain11.h.

◆ visibilityProgram

Program11 Rendering::WindshieldRain11::visibilityProgram
private

Definition at line 78 of file WindshieldRain11.h.

◆ visibilitySamples

Image Rendering::WindshieldRain11::visibilitySamples
private

Definition at line 83 of file WindshieldRain11.h.

◆ wakeUpload

std::vector<WindshieldRain::Surface::WakeSample> Rendering::WindshieldRain11::wakeUpload
private

Definition at line 74 of file WindshieldRain11.h.

◆ water

Program11 Rendering::WindshieldRain11::water
private

Definition at line 78 of file WindshieldRain11.h.

◆ waterWithAdMask

Program11 Rendering::WindshieldRain11::waterWithAdMask
private

Definition at line 78 of file WindshieldRain11.h.

◆ wipers

std::vector<Wiper> Rendering::WindshieldRain11::wipers
private

Definition at line 70 of file WindshieldRain11.h.

◆ worldDepth

Microsoft::WRL::ComPtr<ID3D11DepthStencilState> Rendering::WindshieldRain11::worldDepth
private

Definition at line 81 of file WindshieldRain11.h.


The documentation for this class was generated from the following files: