class
render::SceneGridRenderer
Inherits:
RendererExtension
Handles scene grid rendering on the render thread.
Public
Constructors
SceneGridRenderer
SceneGridRenderer()
Private
Methods
Initialize
Called when the renderer extension is first initialized.
Check
Returns true if the render() method should be called for the provided camera.
Render
Called at the point at which rendering should be performed for the provided camera.
Relevant render targets are guaranteed to be already bound to the render API, depending on the RenderLocation. Note that actual structure of the render targets depends on the active renderer.
- camera
- Camera through which the renderer is currently rendering.
- viewContext
- Additional information about the currently rendered view.
UpdateData
void UpdateData(const SPtr<Mesh> &mesh, float spacing, bool fadeGrid, const Vector3 &gridPlaneNormal)
Updates the grid mesh to render.
- mesh
- Grid mesh to render.
- spacing
- Spacing between the grid lines.
- fadeGrid
- Determines should the grid fade out at larger distances.
- gridPlaneNormal
- Normal to the plane to render the grid on. Must be one of the basis vectors (can't be arbitrary).
Fields
mCamera
SPtr<Camera> mCamera
mGridMesh
SPtr<Mesh> mGridMesh
mGridMaterial
SPtr<Material> mGridMaterial
mMaterialParameterAdapter
SPtr<MaterialParameterAdapter> mMaterialParameterAdapter
mSpacing
float mSpacing
mFadeGrid
bool mFadeGrid
mGridPlaneNormal
Vector3 mGridPlaneNormal
mViewProjParam
MaterialParameterMatrix4 mViewProjParam
mWorldCameraPosParam
MaterialParameterVector4 mWorldCameraPosParam
mGridColorParam
MaterialParameterColor mGridColorParam
mGridSpacingParam
MaterialParameterFloat mGridSpacingParam
mGridBorderWidthParam
MaterialParameterFloat mGridBorderWidthParam
mGridFadeOutStartParam
MaterialParameterFloat mGridFadeOutStartParam
mGridFadeOutEndParam
MaterialParameterFloat mGridFadeOutEndParam
mGridPlaneNormalParam
MaterialParameterVector3 mGridPlaneNormalParam