Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
c5721c306This file is pinned to the selected release. Download the original to open it in your design tool.
// ShapeData.h
// Copyright (c) 2009, Dan Heeks
// This program is released under the BSD license. See the file COPYING for details.
#pragma once
class CShape;
enum SolidTypeEnum{
SOLID_TYPE_UNKNOWN, // probably not a primitive solid anymore
SOLID_TYPE_SPHERE,
SOLID_TYPE_CYLINDER,
SOLID_TYPE_CUBOID,
SOLID_TYPE_CONE
};
class CFaceData
{
public:
int m_id;
unsigned int m_color;
CFaceData(int id, unsigned int color) :m_id(id), m_color(color){}
};
// used for reading and writing to the XML file
class CShapeData{
public:
CShapeData();
CShapeData(CShape* shape);
int m_id;
bool m_visible;
std::string m_title;
bool m_title_made_from_id;
SolidTypeEnum m_solid_type;
TiXmlElement m_xml_element;
std::list<int> m_vertex_ids;
std::list<int> m_edge_ids;
std::list<CFaceData> m_face_ids;
void SetShape(CShape* shape, bool apply_id);
};