Logo Search packages:      
Sourcecode: blender version File versions  Download package

CTR_TaggedSetOps< IndexType, ObjectType > Class Template Reference

#include <CTR_TaggedSetOps.h>

Inheritance diagram for CTR_TaggedSetOps< IndexType, ObjectType >:

MEM_NonCopyable

List of all members.


Detailed Description

template<class IndexType, class ObjectType>
class CTR_TaggedSetOps< IndexType, ObjectType >

Id
CTR_TaggedSetOps.h 14444 2008-04-16 22:40:48Z hos
***** BEGIN GPL LICENSE BLOCK *****

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. All rights reserved.

The Original Code is: all of this file.

Contributor(s): none yet.

***** END GPL LICENSE BLOCK ***** This class contains some utility functions for finding the intersection, union, and difference of a collection of stl vector of indices into a set of primitives.

These are mainly used as helper functions in the decimation and bsp libraries.

This template class assumes that each value of type IndexType encountered in the list is a valid index into an array of primitives. This is not checked at run-time and is left to the user to insure. Prmitives of type ObjectType must have the following public methods to be used by this template class:

int OpenTag(void) --- return a persistent tag value for the primitive

void SetOpenTag(int bla) --- set the persistent tag value for this primitive to bla.

bool SelectTag() --- return a persistent boolean tag for this primitive

void SetSelectTag(bool bla) --- set the persistent boolean tag for this primitive to bla.

Here persistent means that the tag should be associated with the object for the entire lifetime of the primitive. Again none of this stuff is enforced you have to make sure that your primitives do the right thing. Often these tags can be cunningly stowed away inside some of the spare bits in the primitive. See CTR_TaggedIndex for such a class.

Definition at line 71 of file CTR_TaggedSetOps.h.


Static Public Member Functions

static void Difference (std::vector< IndexType > &a, std::vector< IndexType > &b, std::vector< ObjectType > &primitives, std::vector< IndexType > &output)
static void Intersect (const std::vector< std::vector< IndexType > > &index_list, std::vector< ObjectType > &primitives, std::vector< IndexType > &output, unsigned int mask, unsigned int shift)
static void IntersectPair (const std::vector< IndexType > &a, const std::vector< IndexType > &b, std::vector< ObjectType > &primitives, std::vector< IndexType > &output)
static void Union (std::vector< std::vector< IndexType > > &index_list, std::vector< ObjectType > &primitives, std::vector< IndexType > &output)

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

Generated by  Doxygen 1.6.0   Back to index