42 lines
658 B
C++
42 lines
658 B
C++
#pragma once
|
|
#ifndef OBJECT
|
|
#define OBJECT
|
|
|
|
#include <GL/glew.h>
|
|
|
|
#include "mesh.h"
|
|
#include "material.h"
|
|
#include "box.h"
|
|
|
|
class Xr_Object
|
|
{
|
|
public:
|
|
Xr_Object();
|
|
~Xr_Object();
|
|
|
|
bool isReady() const;
|
|
float* const getPos() const;
|
|
Xr_Material* const getMaterial() const;
|
|
Xr_AABB* const getBox() const;
|
|
|
|
void attachMesh(Xr_Mesh*);
|
|
void detachMesh();
|
|
void loadToServer();
|
|
void unloadToServer();
|
|
void attachMaterial(Xr_Material*);
|
|
void detachMaterial();
|
|
void setPos(float, float, float);
|
|
void draw();
|
|
|
|
private:
|
|
Xr_Mesh *O_mesh;
|
|
Xr_AABB *O_box;
|
|
|
|
Xr_Material *O_material;
|
|
|
|
float O_pos[3];
|
|
bool O_isReady;
|
|
};
|
|
|
|
#endif
|