17 #ifndef __H__OBJ_PARSER_STRUCTS__H__
18 #define __H__OBJ_PARSER_STRUCTS__H__
20 #include <boost/fusion/adapted.hpp>
37 union {
float x, r, u, s; };
38 union {
float y, g, v, t; };
41 BOOST_FUSION_ADAPT_STRUCT(
OBJVector2, (
float, x), (
float, y))
52 OBJVector3
const& operator=(OBJVector3
const& rhs);
54 union {
float x, r, u, s; };
55 union {
float y, g, v, t; };
56 union {
float z, b, w; };
59 BOOST_FUSION_ADAPT_STRUCT(
OBJVector3, (
float, x), (
float, y), (
float, z))
70 OBJVector4
const& operator=(OBJVector4
const& rhs);
72 union {
float x, r, u, s; };
73 union {
float y, g, v, t; };
74 union {
float z, b, p; };
75 union {
float w, a, q; };
78 BOOST_FUSION_ADAPT_STRUCT(OBJVector4, (
float, x), (
float, y), (
float, z), (
float, w))
100 int32_t indexTexture;
104 BOOST_FUSION_ADAPT_STRUCT(
OBJVertexGroup, (int32_t, indexSpatial), (int32_t, indexTexture), (int32_t, indexNormal))
134 uint32_t renderState;
137 BOOST_FUSION_ADAPT_STRUCT(
OBJFace, (
OBJVertexGroup, group0), (
OBJVertexGroup, group1), (
OBJVertexGroup, group2), (
OBJVertexGroup, group3), (uint32_t, renderState))
150 OBJLine(std::vector<OBJVertexGroup>
const& vector);
152 std::vector<OBJVertexGroup> segments;
155 BOOST_FUSION_ADAPT_STRUCT(
OBJLine, (std::vector<OBJVertexGroup>, segments))
168 OBJPoint(std::vector<OBJVertexGroup>
const& vector);
170 std::vector<OBJVertexGroup> points;
173 BOOST_FUSION_ADAPT_STRUCT(
OBJPoint, (std::vector<OBJVertexGroup>, points))
191 BOOST_FUSION_ADAPT_STRUCT(
OBJSimpleCurve, (
float, startParam), (
float, endParam), (int32_t, curve2DIndex))
205 uint32_t attributeState;
207 std::vector<float> parametersU;
208 std::vector<float> parametersV;
210 std::vector<OBJSimpleCurve> trims;
211 std::vector<OBJSimpleCurve> holes;
212 std::vector<OBJSimpleCurve> specialCurves;
214 std::vector<int32_t> specialPoints;
226 OBJCurve(
float start,
float end, std::vector<OBJVertexGroup>
const& points);
233 std::vector<OBJVertexGroup> controlPoints;
236 BOOST_FUSION_ADAPT_STRUCT(
OBJCurve, (
float, startParam), (
float, endParam), (std::vector<OBJVertexGroup>, controlPoints))
247 OBJCurve2D(std::vector<int32_t>
const& points);
251 std::vector<int32_t> parameterVertexIndices;
254 BOOST_FUSION_ADAPT_STRUCT(
OBJCurve2D, (std::vector<int32_t>, parameterVertexIndices))
264 OBJSurface(
float startU,
float endU,
float startV,
float endV, std::vector<OBJVertexGroup>
const& points);
274 std::vector<OBJVertexGroup> controlPoints;
277 BOOST_FUSION_ADAPT_STRUCT(
OBJSurface, (
float, startParamU), (
float, endParamU), (
float, startParamV), (
float, endParamV), (std::vector<OBJVertexGroup>, controlPoints))
287 OBJSurfaceConnection();
288 OBJSurfaceConnection(int32_t surf1,
float startParam1,
float endParam1, int32_t curv2D1, int32_t surf2,
float startParam2,
float endParam2, int32_t curv2D2);
292 int32_t surfaceIndex0;
293 int32_t surfaceIndex1;
295 int32_t curve2DIndex0;
296 int32_t curve2DIndex1;
306 (int32_t, surfaceIndex0), (
float, startParam0), (
float, endParam0), (int32_t, curve2DIndex0),
307 (int32_t, surfaceIndex1), (
float, startParam1), (
float, endParam1), (int32_t, curve2DIndex1))
A standard curve object.
Definition: OBJStructs.hpp:223
Simple two-component vector struct.
Definition: OBJStructs.hpp:32
int32_t curve2DIndex
Index of the OBJCurve2D special curve lying in the parameter space of the surface.
Definition: OBJStructs.hpp:188
Collection of vertex groups comprising a single face.
Definition: OBJStructs.hpp:104
Individual curve definition comprising a larger free-form object.
Definition: OBJStructs.hpp:181
float startParam
Starting parameter value for the trimming curve.
Definition: OBJStructs.hpp:185
float endParam
Ending parameter value for the trimming curve.
Definition: OBJStructs.hpp:186
Specifies connectivity between two different surfaces.
Definition: OBJStructs.hpp:277
Definition: OBJStructs.hpp:261
A 2D curve on a surface.
Definition: OBJStructs.hpp:236
Collection of vertex groups comprising a line.
Definition: OBJStructs.hpp:137
Simple three-component vector struct.
Definition: OBJStructs.hpp:41
Collection of vertex groups comprising a point collection.
Definition: OBJStructs.hpp:165
Index pairing comprising a single vertex of a face.
Definition: OBJStructs.hpp:78