- AmbientColorGet
- AmbientColorSet
- Attach
- Create
- Destroy
- DXContext
- DXDispatcher
- InputScene
- LightColorGet
- LightColorSet
- LightDirectionGet
- LightDirectionSet
- ObjectAdd
- ProjectionMatrixGet
- ProjectionMatrixSet
- Render
- RenderBegin
- RenderEnd
- ViewMatrixGet
- ViewMatrixSet
- ViewPositionSet
- ViewRotationSet
- ViewTargetSet
- ViewUpDirectionSet
CCanvas3D
CCanvas3D is a class for simplified creation and visualization of 3D objects on a chart.
Description
CCanvas3D greatly simplifies creation and visualization of large amounts of data in the form of animated 3D graphics. The class contains the methods for managing camera and lighting, as well as features the resource manager for creating graphic resources: textures, shaders, vertex buffers, indexes, and shader parameters.
Besides, the library contains the classes of the scene base objects, such as a box, a three-dimensional surface on user data, or an arbitrary grid.
A video card should support DX 11 and Shader Model 5.0 for the functions to work.
Declaration
class CCanvas |
Title
#include <Canvas\Canvas.mqh> |
Inheritance hierarchyCCanvas3D |
Class methods by groups
Creating/deleting |
Description |
---|---|
Creates a graphic resource for rendering a 3D scene without binding to a chart object. |
|
Gets a graphical resource from the OBJ_BITMAP_LABEL object and attaches it to an instance of the CCanvas class. |
|
Adds an object to a 3D scene for subsequent rendering. |
|
Destroys a graphic resource and releases a graphic 3D context. |
|
Light |
|
Sets the color and intensity of the ambient all-round lighting. |
|
Gets the color and intensity of the ambient all-round lighting. |
|
Sets the direction of a directed light source. |
|
Gets the direction of a directed light source. |
|
Sets the color and intensity of a directed light source. |
|
Gets the color and intensity of a directed light source. |
|
Camera |
|
Calculates and sets a 3D coordinate projection matrix to a 2D frame. |
|
Gets a 3D scene projection matrix to a 2D frame. |
|
Sets a 3D scene view matrix. |
|
Returns a 3D scene view matrix. |
|
Sets a viewpoint on a 3D scene. |
|
Sets the direction of a gaze at a 3D scene. |
|
Sets the coordinates of the point a gaze is directed at. |
|
Sets the direction of the upper frame border in 3D space. |
|
Rendering |
|
Renders all scene objects in the frame inner buffer for subsequent display. |
|
Prepares a graphic context for rendering a new frame. |
|
Copies a rendered frame to the inner buffer and updates a chart image if necessary. |
|
Getting resources |
|
Gets the graphic context handle. |
|
Gets the resource dispatcher handle. |
|
Gets the pointer to the buffer of scene parameters. |