DofSet Struct Reference

This reference page is linked to from the following overview topics: IK Concepts.


#include <iiksys.h>

Inheritance diagram for DofSet:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  DofSet ()
  DofSet (const DofSet &src)
void  Add (DofAxis dn)
void  Clear (DofAxis dn)
int  Include (DofAxis dn) const
int  Count () const

Public Attributes

unsigned  bits

Constructor & Destructor Documentation

DofSet ( ) [inline]
: bits(0) {}
DofSet ( const DofSet src ) [inline]
: bits(src.bits) {}

Member Function Documentation

void Add ( DofAxis  dn ) [inline]
{ bits |= (1 << dn); }
void Clear ( DofAxis  dn ) [inline]
{ bits &= ~(unsigned(1 << dn)); }
int Include ( DofAxis  dn ) const [inline]
{ return bits & (1 << dn); }
int Count ( ) const [inline]
  {
   unsigned int ret;
   unsigned int b, i;
    for (b = bits, ret = 0, i = TransX; i <= RotZ; ++i) {
      if (b == 0) break;
      else if (b & 01u) {
        ret++;
      }
      b = b >> 1;
    }
    return ret;
  }

Member Data Documentation