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
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
SetUseInMemoryShaderGeneration parameters
Type | Name | Min | Max | Description |
bool | flag | | | The requested boolean value for the UseInMemoryShaderGeneration setting. |
GetUseInMemoryShaderGeneration return value
Type: bool
Syntax
SetUseInMemoryShaderGeneration parameters
Type | Name | Min | Max | Description |
bool | flag | | | The requested boolean value for the UseInMemoryShaderGeneration setting. |
GetUseInMemoryShaderGeneration return value
Type: bool
Syntax
SetUseInMemoryShaderGeneration parameters
Name | Type | Min | Max | Description |
flag | bool | | | The requested boolean value for the UseInMemoryShaderGeneration setting. |
GetUseInMemoryShaderGeneration return value
Type: bool
Methods details
CreatePreviewer
Creates a previewer with the specified window dimensions.
Syntax
Parameters
Type | Name | Min | Max | Description |
int | _width | | | The window width. |
int | _height | | | The window height. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
int | _width | | | The window width. |
int | _height | | | The window height. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
_width | int | | | The window width. |
_height | int | | | The window height. |
Return value
Type: bool
GetBackgroundColor
The current background color of the renderer.
Syntax
Parameters
GetBackgroundColor takes no parameters.
Return value
Type: RealData
Syntax
Parameters
GetBackgroundColor takes no parameters.
Return value
Type: RealData
Syntax
Parameters
GetBackgroundColor takes no parameters.
Return value
Type: float
GetClass
Get the name of the DirectXRenderer class.
Syntax
Parameters
GetClass takes no parameters.
Return value
Type: spString
Syntax
Parameters
GetClass takes no parameters.
Return value
Type: string
Syntax
Parameters
GetClass takes no parameters.
Return value
Type: str
IsA
Returns true if DirectXRenderer is a or is a descendant of the class named as the type parameter.
Syntax
Parameters
Type | Name | Min | Max | Description |
const char * | type | | | Name of the class to check if DirectXRenderer is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
string | type | | | Name of the class to check if DirectXRenderer is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
type | str | | | Name of the class to check if DirectXRenderer is, or is a descendant of. |
Return value
Type: bool
IsNull
Returns true if the DirectXRenderer object is invalid.
Syntax
Parameters
IsNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
IsNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
IsNull takes no parameters.
Return value
Type: bool
LoadGeometryData
Loads a geometry data object and its materials into the previewer.
Syntax
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
Syntax
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
Syntax
Parameters
Name | Type | Min | Max | Description |
geom | GeometryData | | | The geometry data object to preview. |
materials | MaterialTable | | | 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.
Syntax
Parameters
Type | Name | Min | Max | Description |
Scene | _scene | | | The scene to preview. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
Scene | _scene | | | The scene to preview. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
_scene | Scene | | | The scene to preview. |
Return value
Type: bool
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
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). |
Syntax
Parameters
Type | Name | Min | Max | Description |
int | cameraSelectionSetID | | | The ID of the selection set with the scene cameras to render from. |
string | file_name_base | | | The desired directory and file name. |
string | format | | | Picture format (PNG or RAW). |
Syntax
Parameters
Name | Type | Min | Max | Description |
cameraSelectionSetID | int | | | The ID of the selection set with the scene cameras to render from. |
file_name_base | str | | | The desired directory and file name. |
format | str | | | Picture format (PNG or RAW). |
SetBackgroundColor
The background color of the renderer.
Syntax
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. |
Syntax
Parameters
Type | Name | Min | Max | Description |
float | r | 0 | 1 | The red color component for the background color. |
float | g | 0 | 1 | The green color component for the background color. |
float | b | 0 | 1 | The blue color component for the background color. |
float | a | 0 | 1 | The alpha component for the background color. |
Syntax
Parameters
Name | Type | Min | Max | Description |
r | float | 0 | 1 | The red color component for the background color. |
g | float | 0 | 1 | The green color component for the background color. |
b | float | 0 | 1 | The blue color component for the background color. |
a | float | 0 | 1 | The alpha component for the background color. |
SetRenderWireFrameMode
The render mode to wire frame.
Syntax
Parameters
Type | Name | Min | Max | Description |
bool | flag | | | True if render mode should be enabled. |
Syntax
Parameters
Type | Name | Min | Max | Description |
bool | flag | | | True if render mode should be enabled. |
Syntax
Parameters
Name | Type | Min | Max | Description |
flag | bool | | | True if render mode should be enabled. |
Static methods details
IsClassA
Returns true if the class is a or is a descendant of the class named as the type parameter.
Syntax
Parameters
Type | Name | Min | Max | Description |
const char * | type | | | Name of the class to check if the class is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
string | type | | | Name of the class to check if the class is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
type | str | | | Name of the class to check if the class is, or is a descendant of. |
Return value
Type: bool
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.
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to cast. |
Return value
Type: DirectXRenderer
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to cast. |
Return value
Type: DirectXRenderer
Syntax
Parameters
Name | Type | Min | Max | Description |
object | Object | | | Object to cast. |
Return value
Type: DirectXRenderer