# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

Public Member Functions | Protected Attributes

# vl::TriangleIterator Class Reference

Iterator used to extract the indices of every single triangle of a DrawCall regardless of the primitive type. More...

`#include <TriangleIterator.hpp>`

List of all members.

## Public Member Functions

| TriangleIterator (TriangleIteratorAbstract *it)
bool | next ()
| Requires the next triangle.
bool | operator++ ()
bool | hasNext ()
| Returns false if the iterator has reached the end of the triangle list.
int | a () const
| First index of the triangle.
int | b () const
| First index of the triangle.
int | c () const
| First index of the triangle.

## Protected Attributes

ref< TriangleIteratorAbstract > | mIterator

## Detailed Description

Iterator used to extract the indices of every single triangle of a DrawCall regardless of the primitive type.

See also:
  DrawCall::triangles()

Definition at line 575 of file TriangleIterator.hpp.

## Constructor & Destructor Documentation

vl::TriangleIterator::TriangleIterator | ( | TriangleIteratorAbstract * | it ) | `[inline]`

Definition at line 578 of file TriangleIterator.hpp.

## Member Function Documentation

bool vl::TriangleIterator::next | ( | ) | `[inline]`

Requires the next triangle.

Returns `false` the iterator reached the end of the triangle list.

Definition at line 581 of file TriangleIterator.hpp.

References mIterator.

Referenced by operator++().

bool vl::TriangleIterator::operator++ | ( | ) | `[inline]`

Definition at line 583 of file TriangleIterator.hpp.

References next().

bool vl::TriangleIterator::hasNext | ( | ) | `[inline]`

Returns false if the iterator has reached the end of the triangle list.

In this case a(), b() and c() return -1.

Definition at line 586 of file TriangleIterator.hpp.

References mIterator.

Referenced by vl::Geometry::computeTangentSpace(), vl::DrawCall::countTriangles(), vl::EdgeExtractor::extractEdges(), vl::Geometry::fixTriangleWinding(), vl::RayIntersector::intersectGeometry(), vl::Geometry::mergeDrawCallsWithTriangles(), vl::PolygonSimplifier::simplify(), and vl::Geometry::triangulateDrawCalls().

int vl::TriangleIterator::a | ( | ) | const`[inline]`

First index of the triangle.

Definition at line 589 of file TriangleIterator.hpp.

References mIterator.

int vl::TriangleIterator::b | ( | ) | const`[inline]`

First index of the triangle.

Definition at line 592 of file TriangleIterator.hpp.

References mIterator.

int vl::TriangleIterator::c | ( | ) | const`[inline]`

First index of the triangle.

Definition at line 595 of file TriangleIterator.hpp.

References mIterator.

## Member Data Documentation

ref<TriangleIteratorAbstract> vl::TriangleIterator::mIterator`[protected]`

Definition at line 598 of file TriangleIterator.hpp.

Referenced by a(), b(), c(), hasNext(), and next().

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

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlGraphics/TriangleIterator.hpp

Visualization Library v2011.09.1162 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu Jan 26 2012 00:44:55.
Permission is granted to use this page to write and publish articles regarding Visualization Library.