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.
WARNING
This class is marked as deprecated and will be removed in a future version.
Properties
Property | Description |
Name | The name of the DirectXRenderer object. (Inherited from Object) |
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 |
AddObserver | Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object) |
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. (Inherited from Object) |
InitializeSceneRenderData | Initialize scene geometry's and generates material shaders for rendering. |
IsA | Returns true if DirectXRenderer is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
IsNull | Returns true if the DirectXRenderer object is invalid. (Inherited from Object) |
IsSameObjectAs | Returns true if the DirectXRenderer object is valid. (Inherited from Object) |
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. |
NonNull | Returns true if the DirectXRenderer object is valid. (Inherited from Object) |
PrintInfo | Prints the content/info of the DirectXRenderer object to the log. (Inherited from Object) |
RemoveObserver | Removes a previously added observer object. (Inherited from Object) |
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. |
SetScene | Sets a scene into the previewer. Use InitializeSceneRenderData to generate the material shaders. |
Static methods
Method | Description |
IsClassA | Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
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. (Inherited from Object) |
Properties details
Name
The name of the DirectXRenderer object. (Inherited from Object)
Syntax
SetName parameters
Type | Name | Min | Max | Description |
const char * | name | | | New name of the object. |
GetName return value
Type: spString
Syntax
SetName parameters
Type | Name | Min | Max | Description |
string | name | | | New name of the object. |
GetName return value
Type: string
Syntax
SetName parameters
Name | Type | Min | Max | Description |
name | str | | | New name of the object. |
GetName return value
Type: str
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
AddObserver
Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
Observer | observer | | | Observer is the object that will receive events. |
Return value
Type: rid
Syntax
Parameters
Type | Name | Min | Max | Description |
Observer | observer | | | Observer is the object that will receive events. |
Return value
Type: int
Syntax
Parameters
Name | Type | Min | Max | Description |
observer | Observer | | | Observer is the object that will receive events. |
Return value
Type: int
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: spRealData
Syntax
Parameters
GetBackgroundColor takes no parameters.
Return value
Type: spRealData
Syntax
Parameters
GetBackgroundColor takes no parameters.
Return value
Type: list[float]
GetClass
Get the name of the DirectXRenderer class. (Inherited from Object)
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
InitializeSceneRenderData
Initialize scene geometry's and generates material shaders for rendering.
Syntax
Parameters
InitializeSceneRenderData takes no parameters.
Return value
Type: bool
Syntax
Parameters
InitializeSceneRenderData takes no parameters.
Return value
Type: bool
Syntax
Parameters
InitializeSceneRenderData takes no parameters.
Return value
Type: bool
IsA
Returns true if DirectXRenderer is a or is a descendant of the class named as the type parameter. (Inherited from Object)
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. (Inherited from Object)
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
IsSameObjectAs
Returns true if the DirectXRenderer object is valid. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to compare with. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to compare with. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
object | Object | | | Object to compare with. |
Return value
Type: bool
LoadGeometryData
Loads a geometry data object and its materials into the previewer.
WARNING
This method is marked as deprecated and will be removed in a future version.
Use SetScene instead.
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.
WARNING
This method is marked as deprecated and will be removed in a future version.
Use SetScene instead.
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
NonNull
Returns true if the DirectXRenderer object is valid. (Inherited from Object)
Syntax
Parameters
NonNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
NonNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
NonNull takes no parameters.
Return value
Type: bool
PrintInfo
Prints the content/info of the DirectXRenderer object to the log. (Inherited from Object)
Syntax
Parameters
PrintInfo takes no parameters.
Syntax
Parameters
PrintInfo takes no parameters.
Syntax
Parameters
PrintInfo takes no parameters.
RemoveObserver
Removes a previously added observer object. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
rid | observerId | | | ObserverId is the id returned by AddObserver when the observer was added. |
Syntax
Parameters
Type | Name | Min | Max | Description |
int | observerId | | | ObserverId is the id returned by AddObserver when the observer was added. |
Syntax
Parameters
Name | Type | Min | Max | Description |
observerId | int | | | ObserverId is the id returned by AddObserver when the observer was added. |
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. |
SetScene
Sets a scene into the previewer. Use InitializeSceneRenderData to generate the material shaders.
Syntax
Parameters
Type | Name | Min | Max | Description |
Scene | _scene | | | The scene to preview. |
Syntax
Parameters
Type | Name | Min | Max | Description |
Scene | _scene | | | The scene to preview. |
Syntax
Parameters
Name | Type | Min | Max | Description |
_scene | Scene | | | The scene to preview. |
Static methods details
IsClassA
Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
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. (Inherited from Object)
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