This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
csce441pine64backup/L15/src/ShapeCage.h
2017-04-10 17:50:27 -05:00

35 lines
652 B
C++

#pragma once
#ifndef _SHAPECAGE_H_
#define _SHAPECAGE_H_
#include <memory>
#include <vector>
class Grid;
class ShapeCage
{
public:
ShapeCage();
virtual ~ShapeCage();
void load(const std::string &meshName);
void setGrid(std::shared_ptr<Grid> g) { grid = g; }
void toLocal();
void toWorld();
void init();
void draw(int h_pos, int h_tex) const;
private:
std::vector<unsigned int> elemBuf;
std::vector<float> posBuf;
std::vector<float> norBuf;
std::vector<float> texBuf;
std::vector<float> posLocalBuf;
std::vector<float> tileIndexBuf;
unsigned posBufID;
unsigned texBufID;
unsigned elemBufID;
std::shared_ptr<Grid> grid;
};
#endif