Blender V2.61 - r43446
Static Public Member Functions

CTR_TaggedSetOps< IndexType, ObjectType > Class Template Reference

#include <CTR_TaggedSetOps.h>

Inheritance diagram for CTR_TaggedSetOps< IndexType, ObjectType >:
Inheritance graph
[legend]

List of all members.

Static Public Member Functions

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)
static void Difference (std::vector< IndexType > &a, std::vector< IndexType > &b, std::vector< ObjectType > &primitives, std::vector< IndexType > &output)

Detailed Description

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

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 75 of file CTR_TaggedSetOps.h.


Member Function Documentation

template<class IndexType , class ObjectType >
static void CTR_TaggedSetOps< IndexType, ObjectType >::Difference ( std::vector< IndexType > &  a,
std::vector< IndexType > &  b,
std::vector< ObjectType > &  primitives,
std::vector< IndexType > &  output 
) [inline, static]

Definition at line 247 of file CTR_TaggedSetOps.h.

template<class IndexType , class ObjectType >
static void CTR_TaggedSetOps< IndexType, ObjectType >::Intersect ( const std::vector< std::vector< IndexType > > &  index_list,
std::vector< ObjectType > &  primitives,
std::vector< IndexType > &  output,
unsigned int  mask,
unsigned int  shift 
) [inline, static]

Definition at line 81 of file CTR_TaggedSetOps.h.

template<class IndexType , class ObjectType >
static void CTR_TaggedSetOps< IndexType, ObjectType >::IntersectPair ( const std::vector< IndexType > &  a,
const std::vector< IndexType > &  b,
std::vector< ObjectType > &  primitives,
std::vector< IndexType > &  output 
) [inline, static]

Definition at line 158 of file CTR_TaggedSetOps.h.

template<class IndexType , class ObjectType >
static void CTR_TaggedSetOps< IndexType, ObjectType >::Union ( std::vector< std::vector< IndexType > > &  index_list,
std::vector< ObjectType > &  primitives,
std::vector< IndexType > &  output 
) [inline, static]

Definition at line 196 of file CTR_TaggedSetOps.h.


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