Initial commit.

This commit is contained in:
Mike Bostock 2012-12-14 09:47:48 -08:00
commit 44b5f2392f
98 changed files with 11750 additions and 0 deletions

34
switch.h Normal file
View file

@ -0,0 +1,34 @@
// -*- C++ -*-
#ifndef MBOSTOCK_SWITCH_H
#define MBOSTOCK_SWITCH_H
#include <vector>
#include "block.h"
namespace mbostock {
class Transform;
class Switch : public AxisAlignedBlock {
public:
Switch(const Vector& min, const Vector& max);
virtual bool dynamic() const;
virtual void applyWeight(float w, const Vector& x);
virtual void reset();
void addTarget(Transform& t);
void setActiveMaterial(const Material& m);
private:
std::vector<Transform*> targets_;
const Material* inactiveMaterial_;
const Material* inactiveTopMaterial_;
const Material* activeMaterial_;
};
}
#endif