NVIDIA IndeX API nvidia_logo_transpbg.gif Up
nv::index::IPolygon Class Referenceabstract

A polygon of n vertices defined in image space. More...

#include <ipolygon.h>

Inherits mi::base::Interface_declare< 0x6558d81b, ... >.

Public Types

enum  Fill_style {
  FILL_EMPTY = 0 ,
  FILL_SOLID = 1
}
 Fill style defines the appearance of the polygon. More...
 

Public Member Functions

virtual bool set_geometry (const mi::math::Vector_struct< mi::Float32, 2 > *vertices, mi::Uint32 nb_vertices, const mi::math::Vector_struct< mi::Float32, 3 > &center)=0
 set polygon geometry More...
 
virtual void get_geometry (mi::math::Vector_struct< mi::Float32, 2 > **vertices, mi::Uint32 &nb_vertices, mi::math::Vector_struct< mi::Float32, 3 > &center) const =0
 Get polygon geometry. More...
 
virtual void set_fill_style (const mi::math::Color_struct &fill_color, Fill_style fill_style)=0
 Set polygon fill style. More...
 
virtual void get_fill_style (mi::math::Color_struct &fill_color, Fill_style &fill_style) const =0
 Get polygon fill style. More...
 

Detailed Description

A polygon of n vertices defined in image space.

The polygon always faces towards the viewer, i.e., the polygon is parallel to the view plane.

Member Enumeration Documentation

 Fill_style

Fill style defines the appearance of the polygon.

Enumerator
FILL_EMPTY 

No fill.

FILL_SOLID 

Flat color.

Member Function Documentation

 get_fill_style()

virtual void nv::index::IPolygon::get_fill_style ( mi::math::Color_struct &  fill_color,
Fill_style fill_style 
) const
pure virtual

Get polygon fill style.

Parameters
[out]fill_colorfill color
[out]fill_stylefill style

 get_geometry()

virtual void nv::index::IPolygon::get_geometry ( mi::math::Vector_struct< mi::Float32, 2 > **  vertices,
mi::Uint32 &  nb_vertices,
mi::math::Vector_struct< mi::Float32, 3 > &  center 
) const
pure virtual

Get polygon geometry.

Parameters
[out]verticesThe 2D vertex list in counter-clockwise order in pixel coordinates respect to the polygon center in 2D.
[out]nb_verticesThe number of 2D vertices in the vertex list
[out]centerThe center position of the polygon in 3D

 set_fill_style()

virtual void nv::index::IPolygon::set_fill_style ( const mi::math::Color_struct &  fill_color,
Fill_style  fill_style 
)
pure virtual

Set polygon fill style.

Parameters
[in]fill_colorfill color
[in]fill_stylefill style

 set_geometry()

virtual bool nv::index::IPolygon::set_geometry ( const mi::math::Vector_struct< mi::Float32, 2 > *  vertices,
mi::Uint32  nb_vertices,
const mi::math::Vector_struct< mi::Float32, 3 > &  center 
)
pure virtual

set polygon geometry

Parameters
[in]verticesThe 2D vertex list in counter-clockwise order in pixel coordinates respect to the polygon center in 2D.
[in]nb_verticesThe number of 2D vertices in the vertex list
[in]centerThe center position of the polygon in 3D
Returns
value true : Valid polygon was created. A valid polygon can be convex or concave representing a single shape, without holes or self crossing silhouette. false: Polygon creating fail. Polygon is not not well shaped. Not simple shape or has holes or is self intersecting.

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