Rhino C++ API  8.6
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ON_DepthImageTriangleShader Class Reference

#include <opennurbs_plus_idimage.h>

Public Member Functions

 ON_DepthImageTriangleShader ()
 

Static Public Member Functions

static bool DefaultShadePixel (void *context, const class ON_DepthImageTriangle *triangle, ON__UINT_PTR id, double depth, const class ON_DepthImagePixel *pixel)
 
static bool DefaultTestTriangle (void *context, const class ON_DepthImageTriangle *triangle)
 

Public Attributes

void * m_context
 first parameter passed to m_function More...
 
bool(* m_shade_pixel_function )(void *, const class ON_DepthImageTriangle *, ON__UINT_PTR, double, const class ON_DepthImagePixel *)
 
bool(* m_test_triangle_function )(void *, const class ON_DepthImageTriangle *)
 

Static Public Attributes

static const ON_DepthImageTriangleShader Default
 

Detailed Description

Description: ON_DepthImageShader is used to pass a shader function and context to ON_DepthImage drawing tools.

Constructor & Destructor Documentation

◆ ON_DepthImageTriangleShader()

ON_DepthImageTriangleShader::ON_DepthImageTriangleShader ( )

Member Function Documentation

◆ DefaultShadePixel()

static bool ON_DepthImageTriangleShader::DefaultShadePixel ( void *  context,
const class ON_DepthImageTriangle triangle,
ON__UINT_PTR  id,
double  depth,
const class ON_DepthImagePixel pixel 
)
static

Description: When m_context points to a ON_DepthImageDefaultShaderContext class, the DefaultShadePixel function can be used as the m_shade_pixel_function.

◆ DefaultTestTriangle()

static bool ON_DepthImageTriangleShader::DefaultTestTriangle ( void *  context,
const class ON_DepthImageTriangle triangle 
)
static

Description: When m_context points to a ON_DepthImageDefaultShaderContext class, the DefaultTestTriangle function can be used as the m_test_triangle_function. Parameters: context - [in] This must point to a ON_DepthImageDefaultShaderContext class. triangle - [in] Triangle information about the triangle ON_DepthImage::DrawTriangleMesh() will draw if this function returns true. Returns: 0 == (triangle->m_triangle_status & ON_DepthImageDefaultShaderContext::m_test_triangle_status). Example: To create a triangle shader that will cull back faces: ON_DepthImageDefaultShaderContext shader_context; shader_context.m_test_triangle_status = ON_DepthImage::back_triangle; ON_DepthImageTriangleShader shader(ON_DepthImageTriangleShader::Default); shader.m_context =

Member Data Documentation

◆ Default

const ON_DepthImageTriangleShader ON_DepthImageTriangleShader::Default
static

◆ m_context

void* ON_DepthImageTriangleShader::m_context

first parameter passed to m_function

◆ m_shade_pixel_function

bool(* ON_DepthImageTriangleShader::m_shade_pixel_function) (void *, const class ON_DepthImageTriangle *, ON__UINT_PTR, double, const class ON_DepthImagePixel *)

◆ m_test_triangle_function

bool(* ON_DepthImageTriangleShader::m_test_triangle_function) (void *, const class ON_DepthImageTriangle *)

Returns: true if the triangle should be included in the image.