SbClip - Online Linux Manual Page
Section : 3
Updated : Mon Jan 25 2021
Source : Version 2.5.0
Note : Coin
NAMESbClip − The SbClip class is a generic polygon clipper class.
SYNOPSIS
#include <include/Inventor/base/SbClip.h>
Public Member FunctionsSbClip (SbClipCallback *callback=NULL, void *userdata=NULL)
void addVertex (const SbVec3f &v, void *vdata=NULL)
void reset (void)
void clip (const SbPlane &plane)
int getNumVertices (void) const
void getVertex (const int idx, SbVec3f &v, void **vdata=NULL) const
void * getVertexData (const int idx) const
Detailed DescriptionThe SbClip class is a generic polygon clipper class. It is used by first adding all vertices in the polygon, and then clipping against any number of planes. If you need to supply additional information per vertex (e.g. texture coordinates), you should supply a callback in the constructor, and a pointer to your vertex structure in addVertex(). For every new vertex created, the callback is called with the line being clipped, including the pointers to your vertex structures and the position of the new (clipped against some plane) vertex. You should then create a new vertex structure, calculate your data (e.g. a new texture coordinate) and return a pointer to this structure.
Be aware that this class is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
Since Coin 2.0
Constructor & Destructor Documentation
SbClip::SbClip (SbClipCallback * callback = NULL, void * userdata = NULL)A constructor. Supply a callback if you need to handle additional data per vertex.
Member Function Documentation
void SbClip::addVertex (const SbVec3f & v, void * vdata = NULL)Adds a polygon vertex. vdata could be a pointer to your vertex structure. References SbList< Type >::append().
void SbClip::reset (void)Resets the clipper. This should be called before adding any vertices when reusing an SbClip instance. References SbList< Type >::truncate().
void SbClip::clip (const SbPlane & plane)Clip polygon against plane. This might change the number of vertices in the polygon. For each time a new vertex is created, the callback supplied in the constructor (if != NULL) is called with the line being clipped and the new vertex calculated. The callback should return a new void pointer to be stored by the clipper. References SbList< Type >::append(), SbVec3f::dot(), SbPlane::getDistance(), SbList< Type >::getLength(), SbPlane::getNormal(), SbVec3f::normalize(), and SbList< Type >::truncate().
int SbClip::getNumVertices (void) constReturns the number of vertices in the polygon. See also SbClip::getVertex() References SbList< Type >::getLength().
void SbClip::getVertex (const int idx, SbVec3f & v, void ** vdata = NULL) constReturns the vertex at index idx. See also SbClip::getNumVertices()
void * SbClip::getVertexData (const int idx) constReturn the vertex data at index idx.
AuthorGenerated automatically by Doxygen for Coin from the source code. 0
Johanes Gumabo
Data Size : 14,889 byte
man-SbClip.3coin2Build : 2025-03-22, 13:26 :
Visitor Screen : x
Visitor Counter ( page / site ) : 25 / 2,084,028
Visitor ID : :
Visitor IP : 216.73.216.62 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 37.751000 x -97.822000 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : :
Provider Province : , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 25.03.22
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.