# class
DirectXRenderer
A Renderer using DirectX 11 that can be used to preview a scene object containing geometry data by rendering it from selected SceneCamera nodes within the given scene and then storing the frames to disc. If using a Shading Node Network (having an IShadingNode assigned to the IMaterial), then the material can be previewed with the generated HLSL shader.
# Properties
Property | Description |
---|---|
UseInMemoryShaderGeneration | Use in-memory shader generation instead of creating a temporary .fx file on disk. Needs to be called after CreatePreviewer to have any effect. |
# Methods
Method | Description |
---|---|
CreatePreviewer | Creates a previewer with the specified window dimensions. |
GetBackgroundColor | The current background color of the renderer. |
GetClass | Get the name of the DirectXRenderer class. |
IsA | Returns true if DirectXRenderer is a or is a descendant of the class named as the type parameter. |
IsNull | Returns true if the DirectXRenderer object is invalid. |
LoadGeometryData | Loads a geometry data object and its materials into the previewer. |
LoadGeometryDataWithMaterialShadingNetwork | Loads a scene into the previewer. The material should have a shading network attached to it. |
RenderAlongCameraPathAndStorePics | Render from each camera view in the camera target direction specified in the selection set with the scene cameras and stores the frame to the file path specified. |
SetBackgroundColor | The background color of the renderer. |
SetRenderWireFrameMode | The render mode to wire frame. |
# Static methods
Method | Description |
---|---|
IsClassA | Returns true if the class is a or is a descendant of the class named as the type parameter. |
SafeCast | SafeCast makes sure the input object is of a class that can be cast into spDirectXRenderer, and if this is the case, returns the object cast into spDirectXRenderer. |
# Properties details
# UseInMemoryShaderGeneration
Use in-memory shader generation instead of creating a temporary .fx file on disk. Needs to be called after CreatePreviewer to have any effect.
# Syntax
// Setter
void SetUseInMemoryShaderGeneration( bool flag );
// Getter
bool GetUseInMemoryShaderGeneration();
# SetUseInMemoryShaderGeneration parameters
Type | Name | Min | Max | Description |
---|---|---|---|---|
bool | flag | The requested boolean value for the UseInMemoryShaderGeneration setting. |
# GetUseInMemoryShaderGeneration return value
Type: bool
# Methods details
# CreatePreviewer
Creates a previewer with the specified window dimensions.
# GetBackgroundColor
The current background color of the renderer.
# GetClass
Get the name of the DirectXRenderer class.
# IsA
Returns true if DirectXRenderer is a or is a descendant of the class named as the type parameter.
# IsNull
Returns true if the DirectXRenderer object is invalid.
# LoadGeometryData
Loads a geometry data object and its materials into the previewer.
# Syntax
bool LoadGeometryData( spGeometryData geom , spMaterialTable materials );
# Parameters
Type | Name | Min | Max | Description |
---|---|---|---|---|
GeometryData | geom | The geometry data object to preview. | ||
MaterialTable | materials | The material table of the geometry. Can be null if no material table exists. |
# Return value
Type: bool
# LoadGeometryDataWithMaterialShadingNetwork
Loads a scene into the previewer. The material should have a shading network attached to it.
# RenderAlongCameraPathAndStorePics
Render from each camera view in the camera target direction specified in the selection set with the scene cameras and stores the frame to the file path specified.
# Syntax
void RenderAlongCameraPathAndStorePics( int cameraSelectionSetID , const char * file_name_base , const char * format );
# Parameters
Type | Name | Min | Max | Description |
---|---|---|---|---|
int | cameraSelectionSetID | The ID of the selection set with the scene cameras to render from. | ||
const char * | file_name_base | The desired directory and file name. | ||
const char * | format | Picture format (PNG or RAW). |
# SetBackgroundColor
The background color of the renderer.
# Syntax
void SetBackgroundColor( real r , real g , real b , real a );
# Parameters
Type | Name | Min | Max | Description |
---|---|---|---|---|
real | r | 0 | 1 | The red color component for the background color. |
real | g | 0 | 1 | The green color component for the background color. |
real | b | 0 | 1 | The blue color component for the background color. |
real | a | 0 | 1 | The alpha component for the background color. |
# SetRenderWireFrameMode
The render mode to wire frame.
# Static methods details
# IsClassA
Returns true if the class is a or is a descendant of the class named as the type parameter.
# SafeCast
SafeCast makes sure the input object is of a class that can be cast into spDirectXRenderer, and if this is the case, returns the object cast into spDirectXRenderer.