OROCHI
 
Loading...
Searching...
No Matches
GxSysRenderBase Class Reference

描画システムクラス More...

#include <GxSysRenderBase.h>

Inheritance diagram for GxSysRenderBase:
Collaboration diagram for GxSysRenderBase:

Classes

struct  GxVertexData
 頂点構造体 More...
 
class  GxViewport
 ビューポートクラス More...
 

Public Member Functions

初期化
 GxSysRenderBase (void)
 コンストラクタ
 
 ~GxSysRenderBase (void) override
 デストラクタ
 
b32 initialize (const GxClassBase *pInitialInformation) override
 初期化
 
void terminate (void) override
 終了処理
 
virtual b32 initializeThreadLocalStorage (u32 workerThreadIndex)
 スレッドローカルストレージ初期化関数
 
アクセサ
GX_FORCE_INLINE void setVirtualResolution (GxSize &size)
 仮想解像度の設定
 
GX_FORCE_INLINE const GxSizegetVirtualResolution (void) const
 仮想解像度の取得
 
GX_FORCE_INLINE const GxSizegetOutputResolution (void) const
 出力解像度の取得
 
GX_FORCE_INLINE const GxSizegetDefaultViewportResolution (void) const
 Viewportのデフォルト解像度の取得
 
GX_FORCE_INLINE const GxRectgetSafetyArea (void) const
 セーフティエリアの取得
 
GX_FORCE_INLINE const GxRectgetVirtualSafetyArea (void) const
 セーフティエリアの取得(仮想座標系)
 
GX_FORCE_INLINE void setClearColor (const GxColor &color)
 クリアカラーを設定
 
GX_FORCE_INLINE const GxColorgetClearColor (void) const
 クリアカラーを取得
 
GxViewportgetViewport (RENDER_VIEW index) const
 ビューポートの取得
 
GxViewportgetDisableViewport (void) const
 未使用のビューポートを取得
 
u32 getViewIndex (GxViewport *pViewport) const
 ビューインデックスの取得
 
u32 getEnableViewportNum (void)
 有効なビューポートの数を取得
 
constexpr GxRenderVertexBuffergetInstanceVertexBuffer (void)
 インスタンス用の頂点バッファの取得
 
virtual GX_FORCE_INLINE GxResShaderPackagegetModelShaderPackage (void)
 モデル用シェーダパッケージを取得(仮)
 
GX_FORCE_INLINE b32 isFrustumCulling (void) const
 フラスタムカリング有効判定
 
GX_FORCE_INLINE void setFrustumCulling (b32 enable)
 フラスタムカリング有効設定
 
GX_FORCE_INLINE b32 isShadowCullingModeDefault (void) const
 シャドウ描画時のカリングにデフォルト設定か否か(trueの場合 デフォルト設定のカリング無効時;無効、有効時:フロントフェースカリング)
 
GX_FORCE_INLINE void setShadowCullingModeDefaul (b32 enable)
 シャドウ描画時のカリングにデフォルト設定を有効にするか否か(trueの場合 デフォルト設定のカリング無効時;無効、有効時:フロントフェースカリング)
 
RENDER_VIEW getViewportFromScreen (const GxPoint2 &screenPosition)
 スクリーン座標からビューポート番号を取得
 
- Public Member Functions inherited from GxSysBase
template<typename T >
T * getModule (void) const
 モジュールを取得
 
 GxSysBase (void)
 デフォルトコンストラクタ
 
 ~GxSysBase (void) override
 デストラクタ
 
b32 isLocked (void)
 クリティカルセクションのロック状態を確認する
 
void sleep (f32 time)
 スリープ(スクリプト用)
 
- Public Member Functions inherited from GxClassBase
constexpr GxClassBase (void)
 コンストラクタ
 
constexpr GxClassBase (const GxClassBase &base)
 コピーコンストラクタ
 
 ~GxClassBase (void) override
 デストラクタ
 
- Public Member Functions inherited from GxClassBaseRoot
constexpr GxClassBaseRoot (void)
 コンストラクタ
 
constexpr GxClassBaseRoot (const GxClassBaseRoot &)
 コピーコンストラクタ
 
virtual ~GxClassBaseRoot (void)
 デストラクタ
 
constexpr GxClassBaseRootoperator= (const GxClassBaseRoot &)
 代入演算子
 
virtual GxRttigetRtti (void) const =0
 Rttiの取得
 
virtual GX_FORCE_INLINE const GxTypedObjectgetDefaultObject (void)
 デフォルトオブジェクトを取得
 
GX_FORCE_INLINE b32 isDefaultObject (void)
 デフォルトオブジェクト判定
 
- Public Member Functions inherited from SingletonBase< GxSysRenderBase >
 SingletonBase (void)
 コンストラクタ
 
 ~SingletonBase (void)
 デストラクタ
 

Static Public Attributes

定義
static constexpr u32 LIGHTING_TILE_WIDTH = GxMath::VALUE_128
 ライティングのタイル幅
 
static constexpr u32 LIGHTING_TILE_HEIGHT = GxMath::VALUE_64
 ライティングのタイル高さ
 

操作

void update (void) override
 更新
 
virtual void render (void)
 描画
 
const GxPoint2 transformWorldToScreen (const GxVector3 &worldPosition, const RENDER_VIEW viewport, const GxSize *pResolution=nullptr)
 ワールド座標→スクリーン座標(カメラzチェックなし)
 
b32 transformWorldToScreen (const GxVector3 &worldPosition, GxPoint2 &screenPosition, const RENDER_VIEW viewport)
 ワールド座標→スクリーン座標GxPoint2(カメラzチェックあり) (削除予定)
 
b32 transformWorldToScreen (const GxVector3 &worldPosition, GxVector3 &screenPosition, const RENDER_VIEW viewport)
 ワールド座標→スクリーン座標GxVector3(カメラzチェックあり)
 
const GxVector2 transformWorldToVirtual (const GxVector3 &worldPosition, const RENDER_VIEW viewport)
 ワールド座標→仮想座標(カメラzチェックなし)
 
b32 transformScreenToRay (const GxPoint2 &screenPosition, GxVector3 &rayStart, GxVector3 &rayEnd, const GxSize *pResolution=nullptr)
 スクリーン座標→ワールド座標でのレイ
 
b32 transformScreenToRay (const GxPoint2 &screenPosition, GxVector3 &rayStart, GxVector3 &rayEnd, const RENDER_VIEW viewport, const GxSize *pResolution=nullptr)
 スクリーン座標→ワールド座標でのレイ(指定ビューポート)
 
void copyTextureToBackbuffer (GxRenderTexture *pDst, GxRenderTexture *pSrc, b32 isRight)
 バックバッファにテクスチャをコピー
 
constexpr void setClearTexture (GxRenderTexture *pClearRenderTexture)
 画面クリア用テクスチャを設定
 
constexpr GxRenderTexturegetClearTexture (void)
 画面クリア用テクスチャのポインタを取得
 
static void getPositionFromVirtual (const GxVector2 &virtualPosition, GxPoint2 &outputPosition, const GxSize *pOutputResolution)
 virtualResolution→指定Resolutionに座標変換
 
static void getPositionToVirtual (const GxPoint2 &inputPosition, GxVector2 &virtualPosition, const GxSize *pInputResolution)
 指定Resolution→virtualResolutionに座標変換
 
static void getPositionVirtualToOutput (const GxVector2 &virtualPosition, GxPoint2 &outputPosition)
 virtualResolution→OutputResolutionに座標変換
 
static void getPositionOutputToVirtual (const GxPoint2 &outputPosition, GxVector2 &virtualPosition)
 OutputResolution→virtualResolutionに座標変換
 
static void getRectFromVirtual (const GxRectF &baseRect, GxRect &dstRect, const GxSize *pOutputResolution)
 virtualResolution→指定Resolutionに矩形変換
 
static void getRectToVirtual (const GxRect &baseRect, GxRectF &dstRect, const GxSize *pInputResolution)
 指定Resolution→virtualResolutionに矩形変換
 
static void getRectVirtualToOutput (const GxRectF &baseRect, GxRect &dstRect)
 virtualResolution→OutputResolutionに矩形変換
 
static void getRectOutputToVirtual (const GxRect &baseRect, GxRectF &dstRect)
 OutputResolution→virtualResolutionに矩形変換
 
static GxPoint2 getPositionViewPortToOutput (const GxPoint2 &viewportPosition, const RENDER_VIEW viewportNo)
 各ビューポートでの2D座標系→OutputResolutionに変換
 
static GxPoint2 getPositionOutputToViewPort (const GxPoint2 &outputResolution, const RENDER_VIEW viewportNo)
 OutputResolution→各ビューポートでの2D座標系に変換
 
void drawClearTexture (GxViewport *pViewport)
 画面クリア用テクスチャを描画
 
virtual void renderUnit (void)
 ユニットの描画
 
void copyViewport (void)
 ビューポートをコピー
 
virtual GxRenderTexturegetViewportRenderTarget (RENDER_VIEW viewport)
 指定ビューポートのレンダーターゲットを取得
 
GX_FORCE_INLINE GxRenderContextgetRenderContext (u32 workerThreadIndex)
 指定スレッドのコンテキストを取得
 

Additional Inherited Members

- Static Public Member Functions inherited from GxClassBaseRoot
static GX_FORCE_INLINE GxRtti__getStaticRtti (void)
 Rttiの取得
 
- Static Public Member Functions inherited from SingletonBase< GxSysRenderBase >
static GX_FORCE_INLINE GxSysRenderBasegetSingleton (void)
 参照を取得
 
static constexpr GxSysRenderBasegetSingletonPointer (void)
 ポインタを取得
 
- Protected Types inherited from GxSysBase
enum class  LOCK_TYPE { SEQUENTIAL_THREAD_SAFE , THREAD_SAFE }
 ロックタイプ More...
 
- Protected Member Functions inherited from GxSysBase
void terminateGxModules (void)
 GXモジュールの終了処理
 
void lock (LOCK_TYPE type=LOCK_TYPE::THREAD_SAFE)
 クリティカルセクションに入る
 
void unlock (LOCK_TYPE type=LOCK_TYPE::THREAD_SAFE)
 クリティカルセクションを出る
 
template<typename T >
T * addModule (void)
 モジュールを作成
 
template<typename T >
void removeModule (void)
 モジュールを削除
 

Detailed Description

描画システムクラス

Member Function Documentation

◆ copyTextureToBackbuffer()

void GxSysRenderBase::copyTextureToBackbuffer ( GxRenderTexture * pDst,
GxRenderTexture * pSrc,
b32 isRight )

バックバッファにテクスチャをコピー

Parameters
pDst[out] 出力テクスチャ
pSrc[in] 入力テクスチャ
isRight[in] 右寄せならtrue(未使用)
Here is the call graph for this function:

◆ drawClearTexture()

void GxSysRenderBase::drawClearTexture ( GxViewport * pViewport)
protected

画面クリア用テクスチャを描画

Parameters
pViewport[in] ビューポート
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDisableViewport()

GxSysRenderBase::GxViewport * GxSysRenderBase::getDisableViewport ( void ) const

未使用のビューポートを取得

Parameters
index[in] インデックス
Returns
未使用のビューポート

◆ getEnableViewportNum()

u32 GxSysRenderBase::getEnableViewportNum ( void )

有効なビューポートの数を取得

Returns
ビューポートの数

◆ getModelShaderPackage()

virtual GX_FORCE_INLINE GxResShaderPackage * GxSysRenderBase::getModelShaderPackage ( void )
inlinevirtual

モデル用シェーダパッケージを取得(仮)

Reimplemented in GxSysRender.

◆ getPositionFromVirtual()

void GxSysRenderBase::getPositionFromVirtual ( const GxVector2 & virtualPosition,
GxPoint2 & outputPosition,
const GxSize * pOutputResolution )
static

virtualResolution→指定Resolutionに座標変換

Parameters
virtualPosition[in] 仮想解像度の座標
outputPosition[out] 出力解像度の座標
pOutputResolution[in] 出力解像度
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPositionOutputToViewPort()

GxPoint2 GxSysRenderBase::getPositionOutputToViewPort ( const GxPoint2 & outputResolutionPosition,
const RENDER_VIEW viewPortNo )
static

OutputResolution→各ビューポートでの2D座標系に変換

Parameters
outputResolutionPosition[in] 出力解像度の座標
viewportNo[in] ビューポート番号
Returns
2D座標系の座標
Here is the call graph for this function:

◆ getPositionOutputToVirtual()

void GxSysRenderBase::getPositionOutputToVirtual ( const GxPoint2 & outputPosition,
GxVector2 & virtualPosition )
static

OutputResolution→virtualResolutionに座標変換

Parameters
outputPosition[in] 出力解像度の座標
virtualPosition[out] 仮想解像度の座標
Here is the call graph for this function:

◆ getPositionToVirtual()

void GxSysRenderBase::getPositionToVirtual ( const GxPoint2 & inputPosition,
GxVector2 & virtualPosition,
const GxSize * pInputResolution )
static

指定Resolution→virtualResolutionに座標変換

Parameters
inputPosition[in] 入力解像度の座標
virtualPosition[out] 仮想解像度の座標
pInputResolution[in] 入力解像度
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPositionViewPortToOutput()

GxPoint2 GxSysRenderBase::getPositionViewPortToOutput ( const GxPoint2 & viewportPosition,
const RENDER_VIEW viewportNo )
static

各ビューポートでの2D座標系→OutputResolutionに変換

Parameters
viewportPosition[in] ビューポート座標
viewportNo[in] ビューポート番号
Returns
出力解像度
Here is the call graph for this function:

◆ getPositionVirtualToOutput()

void GxSysRenderBase::getPositionVirtualToOutput ( const GxVector2 & virtualPosition,
GxPoint2 & outputPosition )
static

virtualResolution→OutputResolutionに座標変換

Parameters
virtualPosition[in] 仮想解像度の座標
outputPosition[out] 出力解像度の座標
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRectFromVirtual()

void GxSysRenderBase::getRectFromVirtual ( const GxRectF & baseRect,
GxRect & dstRect,
const GxSize * pOutputResolution )
static

virtualResolution→指定Resolutionに矩形変換

Parameters
baseRect[in] 仮想解像度の矩形
dstRect[out] 出力解像度の矩形
pOutputResolution[in] 出力解像度
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRectOutputToVirtual()

void GxSysRenderBase::getRectOutputToVirtual ( const GxRect & baseRect,
GxRectF & dstRect )
static

OutputResolution→virtualResolutionに矩形変換

Parameters
baseRect[in] 出力解像度の矩形
dstRect[out] 仮想解像度の矩形
Here is the call graph for this function:

◆ getRectToVirtual()

void GxSysRenderBase::getRectToVirtual ( const GxRect & baseRect,
GxRectF & dstRect,
const GxSize * pInputResolution )
static

指定Resolution→virtualResolutionに矩形変換

Parameters
baseRect[in] 入力解像度の矩形
dstRect[out] 仮想解像度の矩形
pInputResolution[in] 入力解像度
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRectVirtualToOutput()

void GxSysRenderBase::getRectVirtualToOutput ( const GxRectF & baseRect,
GxRect & dstRect )
static

virtualResolution→OutputResolutionに矩形変換

Parameters
baseRect[in] 仮想解像度の矩形
dstRect[out] 出力解像度の矩形
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getViewIndex()

u32 GxSysRenderBase::getViewIndex ( GxViewport * pViewport) const

ビューインデックスの取得

Parameters
pViewport[in] ビューポート
Returns
ビューインデックス
Here is the call graph for this function:

◆ getViewportFromScreen()

RENDER_VIEW GxSysRenderBase::getViewportFromScreen ( const GxPoint2 & screenPosition)

スクリーン座標からビューポート番号を取得

Parameters
screenPosition[in] スクリーン座標
Returns
screenPositionに表示されているビューポート番号
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getViewportRenderTarget()

GxRenderTexture * GxSysRenderBase::getViewportRenderTarget ( RENDER_VIEW index)
protectedvirtual

指定ビューポートのレンダーターゲットを取得

Parameters
index[in] インデックス
Returns
レンダーターゲット
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize()

b32 GxSysRenderBase::initialize ( const GxClassBase * pInitialInformation)
overridevirtual

初期化

Parameters
pInitialInformation[in] 初期化情報
Returns
成功ならtrue

Reimplemented from GxSysBase.

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

◆ initializeThreadLocalStorage()

b32 GxSysRenderBase::initializeThreadLocalStorage ( u32 workerThreadIndex)
virtual

スレッドローカルストレージ初期化関数

Parameters
workerThreadIndex[in] ワーカースレッドインデックス
Returns
成功ならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderUnit()

void GxSysRenderBase::renderUnit ( void )
protectedvirtual

ユニットの描画

Reimplemented in GxSysRender.

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

◆ terminate()

void GxSysRenderBase::terminate ( void )
overridevirtual

終了処理

Reimplemented from GxSysBase.

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

◆ transformScreenToRay() [1/2]

b32 GxSysRenderBase::transformScreenToRay ( const GxPoint2 & screenPosition,
GxVector3 & rayStart,
GxVector3 & rayEnd,
const GxSize * pResolution = nullptr )

スクリーン座標→ワールド座標でのレイ

Parameters
screenPosition[in] スクリーン座標
rayStart[out] ワールド座標系でのレイ開始点
rayEnd[out] ワールド座標系でのレイ終了点
pResolution[in] 解像度
Returns
変換成功ならtrue
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transformScreenToRay() [2/2]

b32 GxSysRenderBase::transformScreenToRay ( const GxPoint2 & screenPosition,
GxVector3 & rayStart,
GxVector3 & rayEnd,
const RENDER_VIEW viewport,
const GxSize * pResolution = nullptr )

スクリーン座標→ワールド座標でのレイ(指定ビューポート)

Parameters
screenPosition[in] スクリーン座標
rayStart[out] ワールド座標系でのレイ開始点
rayEnd[out] ワールド座標系でのレイ終了点
pResolution[in] 解像度
Returns
変換成功ならtrue
Here is the call graph for this function:

◆ transformWorldToScreen() [1/3]

const GxPoint2 GxSysRenderBase::transformWorldToScreen ( const GxVector3 & worldPosition,
const RENDER_VIEW viewport,
const GxSize * pResolution = nullptr )

ワールド座標→スクリーン座標(カメラzチェックなし)

Parameters
worldPosition[in] ワールド座標
viewport[in] 変換先ビューポート番号
pResolution[in] 解像度
Returns
スクリーン座標
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transformWorldToScreen() [2/3]

b32 GxSysRenderBase::transformWorldToScreen ( const GxVector3 & worldPosition,
GxPoint2 & screenPosition,
const RENDER_VIEW viewport )

ワールド座標→スクリーン座標GxPoint2(カメラzチェックあり) (削除予定)

Parameters
worldPosition[in] ワールド座標
screenPosition[out] スクリーン座標
viewport[in] 変換先ビューポート番号
Returns
変換成功ならtrue(座標がカメラzのnear~far範囲外等の理由で変換不可)
Here is the call graph for this function:

◆ transformWorldToScreen() [3/3]

b32 GxSysRenderBase::transformWorldToScreen ( const GxVector3 & worldPosition,
GxVector3 & screenPosition,
const RENDER_VIEW viewport )

ワールド座標→スクリーン座標GxVector3(カメラzチェックあり)

Parameters
worldPosition[in] ワールド座標
screenPosition[out] スクリーン座標
viewport[in] 変換先ビューポート番号
Returns
変換成功ならtrue(座標がカメラzのnear~far範囲外等の理由で変換不可)
Here is the call graph for this function:

◆ transformWorldToVirtual()

const GxVector2 GxSysRenderBase::transformWorldToVirtual ( const GxVector3 & worldPosition,
const RENDER_VIEW viewport )

ワールド座標→仮想座標(カメラzチェックなし)

Parameters
worldPosition[in] ワールド座標
viewport[in] 変換先ビューポート番号
Returns
スクリーン座標
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void GxSysRenderBase::update ( void )
overridevirtual

更新

Reimplemented from GxSysBase.

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

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