This class is used to draw simple primitives, markers, text with given material and transformations.
More...
|
virtual const Matrix44 & | GetWorldMatrix () const =0 |
| This method gets current row-major world transform matrix. More...
|
|
virtual void | SetWorldMatrix (const Matrix44 &worldMatrix)=0 |
| This method sets current row-major world transform matrix for example, world matrix with translation should be: | 1 0 0 0 | | 0 1 0 0 | | 0 0 1 0 | | x y z 1 |. More...
|
|
virtual const Matrix44 & | GetViewMatrix () const =0 |
| This method gets current row-major view transform matrix. More...
|
|
virtual void | SetViewMatrix (const Matrix44 &viewMatrix)=0 |
| This method sets current row-major view transform matrix pseudo view matrix should like this: zaxis = normal(At - Eye) xaxis = normal(cross(Up, zaxis)) yaxis = cross(zaxis, xaxis) More...
|
|
virtual const Matrix44 & | GetProjectionMatrix () const =0 |
| This method gets current row-major projection transform matrix. More...
|
|
virtual void | SetProjectionMatrix (const Matrix44 &projMatrix)=0 |
| This method sets current row-major projection transform matrix typical perspective project matrix should like this: | 2*zNear/width 0 0 0 | | 0 2*zNear/height 0 0 | | 0 0 zFar/(zFar-zNear) 1 | | 0 0 zNear*zFar/(zNear-zFar) 0 |. More...
|
|
virtual Rect | GetViewportRect ()=0 |
| This method gets current viewport rectangle. More...
|
|
virtual Point2 | GetDepthRange ()=0 |
| This method gets current depth range. More...
|
|
virtual void | SetScreenSpace (const Rect &r, const Point2 &depth)=0 |
| This method sets current viewport rectangle and depth range. More...
|
|
virtual void | Clear (const BufferClearFlag flags, const AColor &color, const float z, const int stencil)=0 |
| This method clears screen. More...
|
|
virtual void | Clear (const IPoint2 &upperleft, const IPoint2 &bottomright, const BufferClearFlag flags, const AColor &color, const float z, const int stencil)=0 |
| This method clears sub-region of screen. More...
|
|
virtual void | DrawIndexedPrimitiveUP (PrimitiveType primitiveType, const SimpleVertexStream &vertices, int primitiveCount, const int *indices, int indexCount)=0 |
| This method draws indexed primitives to screen, warning : primitive restart is not supported, you will need several calls to handle this. More...
|
|
virtual void | DrawPrimitiveUP (PrimitiveType primitiveType, const SimpleVertexStream &vertices, int primitiveCount)=0 |
| This method draws primitives to screen. More...
|
|
virtual void | DrawPrimitive (MaxSDK::Graphics::PrimitiveType primitiveType, int vertexStart, int primitiveCount)=0 |
| This method draws primitives based on the current vertex and index buffers. More...
|
|
virtual void | DrawPrimitiveInstanced (MaxSDK::Graphics::PrimitiveType primitiveType, int vertexStart, int primitiveCount, int instanceCount)=0 |
| This method draws multiple primitives instance from vertex buffer and index buffer. More...
|
|
virtual void | DrawRenderItem (const DisplayCallbackContext &displayContext, const RenderItemHandle &hRenderItem)=0 |
| Draw a given render item. More...
|
|
virtual void | DrawScreenQuad (float z=0.0f)=0 |
| This method draws a quad covering the entire current target set. More...
|
|
virtual void | DrawText (const Point3 &xyz, const MCHAR *s)=0 |
| This method draws a string at given world position. More...
|
|
virtual void | DrawText (const IPoint2 &xy, const MCHAR *s)=0 |
| This method draws a string at given screen position (upper left is the origin) More...
|
|
virtual bool | BeginMarker ()=0 |
| This method should be called before AddMarkers. More...
|
|
virtual bool | AddMarkers (MarkerType type, const Point3 *xyz, size_t count, const Color &color=DefaultMarkerColor)=0 |
| This allows drawing batches of markers at a time. More...
|
|
virtual bool | AddScreenSpaceMarkers (MarkerType type, const Point3 *xyz, size_t count, const Color &color=DefaultMarkerColor)=0 |
| This allows drawing batches of screen-space markers at a time. More...
|
|
virtual void | EndMarker ()=0 |
| Ends the marker drawing sequence. More...
|
|
virtual bool | SetMaterial (const BaseMaterialHandle &material)=0 |
| This method sets current material used by DrawPrimitive and DrawIndexedPrimitive. More...
|
|
virtual BaseMaterialHandle & | GetMaterial ()=0 |
| This method gets current material. More...
|
|
virtual void | SetVertexBuffer (size_t count, const VertexBufferHandle *pBuffers)=0 |
| This method sets vertex buffers used by DrawPrimitive. More...
|
|
virtual void | SetIndexBuffer (const IndexBufferHandle &pIndexBuffer)=0 |
| This method sets index buffer used by DrawPrimitive. More...
|
|
virtual void | SetStreamFormat (const StreamFormatHandle &format)=0 |
| This method sets vertex format of vertex buffer. More...
|
|
virtual IRenderStateManager & | GetRenderStates ()=0 |
| This method retrieves current render states object. More...
|
|
virtual IVirtualDevice & | GetVirtualDevice ()=0 |
| This method retrieves current virtual device object. More...
|
|
|
static UtilExport void * | operator new (size_t size) |
| Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e) |
| Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
|
|
static UtilExport void * | operator new (size_t size, const char *filename, int line) |
| New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new (size_t size, int block_type, const char *filename, int line) |
| New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, const char *filename, int line) |
| New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
|
|
static UtilExport void * | operator new (size_t size, unsigned long flags) |
| New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new (size_t size, const std::nothrow_t &e, unsigned long flags) |
| New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
|
|
static UtilExport void * | operator new[] (size_t size) |
| New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e) |
| New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
|
|
static UtilExport void * | operator new[] (size_t size, const char *filename, int line) |
| New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
| New operator used to allocate arrays of objects. More...
|
|
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line) |
| New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
|
|
static UtilExport void * | operator new[] (size_t size, unsigned long flags) |
| New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
|
|
static UtilExport void * | operator new[] (size_t size, const std::nothrow_t &e, unsigned long flags) |
| New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
|
|
static UtilExport void | operator delete (void *ptr) |
| Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e) |
| Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
|
|
static UtilExport void | operator delete (void *ptr, const char *filename, int line) |
| Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete (void *ptr, int block_type, const char *filename, int line) |
| Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
| Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
|
|
static UtilExport void | operator delete (void *ptr, unsigned long flags) |
| Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags) |
| Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
|
|
static UtilExport void | operator delete[] (void *ptr) |
| Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e) |
| Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
|
|
static UtilExport void | operator delete[] (void *ptr, const char *filename, int line) |
| Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete[] (void *ptr, int block_type, const char *filename, int line) |
| Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line) |
| Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
|
|
static UtilExport void | operator delete[] (void *ptr, unsigned long flags) |
| Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void | operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags) |
| Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
|
|
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
| Placement new operator. More...
|
|
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
| Placement delete operator. More...
|
|
static UtilExport void * | aligned_malloc (size_t size, size_t alignment) |
| Allocates memory on a specified alignment boundary. More...
|
|
static UtilExport void * | aligned_realloc (void *ptr, size_t size, size_t alignment) |
| Reallocates memory on a specified alignment boundary. More...
|
|
static UtilExport void | aligned_free (void *ptr) |
| Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
|
|
This class is used to draw simple primitives, markers, text with given material and transformations.
- Description
- The class provides various ways to draw objects. Many functions are self contained and handle much of the code for you by using SimpleVertexStream, whilst others give you complete control over how the primitive is drawn. For example DrawPrimitive() allows the developer to create vertex and index buffers and define the actual vertex format to be used by providing a StreamFormatHandle which provides formating information for vertex data like Position, UVs and Normals.
- See also
- IDisplayCallback IVertexBuffer IIndexBuffer