VisionWorks Toolkit Reference

December 18, 2015 | 1.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvxio::Render3D Class Referenceabstract

Detailed Description

Render3D interface.

See also
NVXIO APIs

Definition at line 59 of file Render3D.hpp.

Data Structures

struct  PlaneStyle
 Holds the plane style. More...
 
struct  PointCloudStyle
 Holds the point cloud style. More...
 

Public Types

enum  MouseButtonEvent {
  LeftButtonDown,
  LeftButtonUp,
  MiddleButtonDown,
  MiddleButtonUp,
  RightButtonDown,
  RightButtonUp,
  MouseMove
}
 Defines mouse events. More...
 
typedef void(* OnKeyboardEventCallback )(void *context, vx_char key, vx_uint32 x, vx_uint32 y)
 Callback for keyboard events. More...
 
typedef void(* OnMouseEventCallback )(void *context, MouseButtonEvent event, vx_uint32 x, vx_uint32 y)
 Callback for mouse events. More...
 
enum  TargetType {
  UNKNOWN_RENDER,
  BASE_RENDER_3D
}
 Defines Render3D types. More...
 

Public Member Functions

virtual void close ()=0
 Closes the render. More...
 
virtual void disableDefaultKeyboardEventCallback ()=0
 Disables default keyboard event handler. More...
 
virtual void enableDefaultKeyboardEventCallback ()=0
 Enables the default keyboard event handler. More...
 
virtual bool flush ()=0
 Renders all primitives. More...
 
virtual vx_uint32 getHeight () const =0
 Gets the height. More...
 
virtual void getProjectionMatrix (vx_matrix projection) const =0
 Gets the projection matrix. More...
 
virtual void getViewMatrix (vx_matrix view) const =0
 Gets view matrix. More...
 
virtual vx_uint32 getWidth () const =0
 Gets the width. More...
 
virtual void putImage (vx_image image)=0
 Puts the image to the render. More...
 
virtual void putPlanes (vx_array planes, vx_matrix model, const PlaneStyle &style)=0
 Puts the surface to the render. More...
 
virtual void putPointCloud (vx_array points, vx_matrix model, const PointCloudStyle &style)=0
 Puts the point cloud to the render. More...
 
virtual void putText (const std::string &text, const nvxio::Render::TextBoxStyle &style)=0
 Puts a message box on the image. More...
 
virtual void setDefaultFOV (float fov)=0
 Sets the field of view. More...
 
virtual void setOnKeyboardEventCallback (OnKeyboardEventCallback callback, void *context)=0
 Sets the keyboard event callback. More...
 
virtual void setOnMouseEventCallback (OnMouseEventCallback callback, void *context)=0
 Sets mouse event callback. More...
 
virtual void setProjectionMatrix (vx_matrix projection)=0
 Sets the projection matrix. More...
 
virtual void setViewMatrix (vx_matrix view)=0
 Sets view matrix. More...
 
virtual bool useDefaultKeyboardEventCallback ()=0
 Gets the flag indicating if the default keyboard event handler is enabled. More...
 
virtual ~Render3D ()
 Destructor. More...
 

Protected Member Functions

 Render3D (TargetType type=Render3D::UNKNOWN_RENDER, const std::string &name="Undefined")
 

Protected Attributes

const std::string renderName
 
const TargetType targetType
 

Member Typedef Documentation

typedef void(* nvxio::Render3D::OnKeyboardEventCallback)(void *context, vx_char key, vx_uint32 x, vx_uint32 y)

Callback for keyboard events.

Parameters
[in]contextA pointer to data to be passed to the callback.
[in]keySpecifies the keyboard key that corresponds to the event.
[in]xSpecifies the x-coordinate of the mouse position.
[in]ySpecifies the y-coordinate of the mouse position.

Definition at line 119 of file Render3D.hpp.

typedef void(* nvxio::Render3D::OnMouseEventCallback)(void *context, MouseButtonEvent event, vx_uint32 x, vx_uint32 y)

Callback for mouse events.

Parameters
[in]contextA pointer to data to be passed to the callback.
[in]eventSpecifies the mouse event.
[in]xSpecifies the x-coordinate of the mouse position.
[in]ySpecifies the y-coordinate of the mouse position.

Definition at line 127 of file Render3D.hpp.

Member Enumeration Documentation

Defines Render3D types.

Enumerator
UNKNOWN_RENDER 

Indicates a stub render.

BASE_RENDER_3D 

Indicates Render3D.

Definition at line 66 of file Render3D.hpp.

Defines mouse events.

Enumerator
LeftButtonDown 

Indicates the left mouse button has been pressed down.

LeftButtonUp 

Indicates the left mouse button has been released.

MiddleButtonDown 

Indicates a middle mouse button has been pressed down.

MiddleButtonUp 

Indicates the middle mouse button has been released.

RightButtonDown 

Indicates the right mouse button has been pressed down.

RightButtonUp 

Indicates the right mouse button has been released.

MouseMove 

Indicates the mouse has been moved.

Definition at line 101 of file Render3D.hpp.

Constructor & Destructor Documentation

virtual nvxio::Render3D::~Render3D ( )
inlinevirtual

Destructor.

Definition at line 248 of file Render3D.hpp.

nvxio::Render3D::Render3D ( TargetType  type = Render3D::UNKNOWN_RENDER,
const std::string &  name = "Undefined" 
)
inlineprotected

Definition at line 252 of file Render3D.hpp.

Member Function Documentation

virtual void nvxio::Render3D::setOnKeyboardEventCallback ( OnKeyboardEventCallback  callback,
void *  context 
)
pure virtual

Sets the keyboard event callback.

Parameters
[in]callbackSpecifies the callback to set.
[in]contextA pointer to data to be passed to the callback.
virtual void nvxio::Render3D::setOnMouseEventCallback ( OnMouseEventCallback  callback,
void *  context 
)
pure virtual

Sets mouse event callback.

Parameters
[in]callbackCallback.
[in]contextA pointer to data to be passed to the callback.
virtual void nvxio::Render3D::putPlanes ( vx_array  planes,
vx_matrix  model,
const PlaneStyle style 
)
pure virtual

Puts the surface to the render.

The surface consists of 2 adjacent triangles.

Parameters
[in]planesArray of surface. The surface is encoded as 4 nvx_point3f_t points that define the vertices of the triangles. If the points are (p1,p2,p3,p4), then (p1,p2,p3) define the first triangle and (p1,p3,p4) define the second.
[in]modelSpecifies the model matrix that transforms Model Space to World Space coordinates.
[in]styleA reference to the style of the surface.
virtual void nvxio::Render3D::putPointCloud ( vx_array  points,
vx_matrix  model,
const PointCloudStyle style 
)
pure virtual

Puts the point cloud to the render.

Parameters
[in]pointsArray of the points. The point is encoded as nvx_point3f_t.
[in]modelSpecifies the model matrix that transforms Model Space to World Space coordinates.
[in]styleA reference to the style of the point cloud.
virtual bool nvxio::Render3D::flush ( )
pure virtual

Renders all primitives.

Returns
Status of the operation.
virtual void nvxio::Render3D::close ( )
pure virtual

Closes the render.

virtual void nvxio::Render3D::setViewMatrix ( vx_matrix  view)
pure virtual

Sets view matrix.

The view matrix transforms World Space to Camera Space coordinates.

Parameters
[in]viewSpecifies the view matrix.
virtual void nvxio::Render3D::getViewMatrix ( vx_matrix  view) const
pure virtual

Gets view matrix.

The view matrix transforms World Space to Camera Space coordinates.

Parameters
[out]viewReturns the view matrix.
virtual void nvxio::Render3D::setProjectionMatrix ( vx_matrix  projection)
pure virtual

Sets the projection matrix.

The projection matrix transforms Camera Space to Homogeneous Space coordinates.

Parameters
[in]projectionSpecifies the projection matrix.
virtual void nvxio::Render3D::getProjectionMatrix ( vx_matrix  projection) const
pure virtual

Gets the projection matrix.

The projection matrix transforms Camera Space to Homogeneous Space coordinates.

Parameters
[out]projectionReturns the projection matrix.
virtual void nvxio::Render3D::setDefaultFOV ( float  fov)
pure virtual

Sets the field of view.

Parameters
[in]fovSpecifies the field of view in degrees.
virtual void nvxio::Render3D::enableDefaultKeyboardEventCallback ( )
pure virtual

Enables the default keyboard event handler.

In this case the user can handle the camera by pressing W, S, A, D, -, + buttons. W/S - pitch, A/D - yaw, -/= - zoom.

virtual void nvxio::Render3D::disableDefaultKeyboardEventCallback ( )
pure virtual

Disables default keyboard event handler.

virtual bool nvxio::Render3D::useDefaultKeyboardEventCallback ( )
pure virtual

Gets the flag indicating if the default keyboard event handler is enabled.

Returns
true indicates enabled; false indicates disabled.
virtual vx_uint32 nvxio::Render3D::getWidth ( ) const
pure virtual

Gets the width.

Returns
The width.
virtual vx_uint32 nvxio::Render3D::getHeight ( ) const
pure virtual

Gets the height.

Returns
The height.
virtual void nvxio::Render3D::putImage ( vx_image  image)
pure virtual

Puts the image to the render.

Parameters
[in]imageSpecifies the image.
virtual void nvxio::Render3D::putText ( const std::string &  text,
const nvxio::Render::TextBoxStyle style 
)
pure virtual

Puts a message box on the image.

Parameters
[in]textA reference to the text of the message.
[in]styleA reference to the style of the message box.

Field Documentation

const TargetType nvxio::Render3D::targetType
protected

Definition at line 257 of file Render3D.hpp.

const std::string nvxio::Render3D::renderName
protected

Definition at line 258 of file Render3D.hpp.


The documentation for this class was generated from the following file: