Initial commit.
This commit is contained in:
commit
44b5f2392f
98 changed files with 11750 additions and 0 deletions
34
switch.h
Normal file
34
switch.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue