17 #ifndef __H__OBJ_PARSER_STATE__H__
18 #define __H__OBJ_PARSER_STATE__H__
20 #include "OBJFreeFormState.hpp"
21 #include "OBJGroup.hpp"
22 #include "OBJRenderState.hpp"
23 #include "OBJMaterial.hpp"
25 #include <unordered_map>
68 void reserve(uint32_t spatial, uint32_t texture = 0, uint32_t normal = 0, uint32_t groupFaces = 0, uint32_t groupFreeForms = 0);
99 void getGroups(std::vector<OBJGroup const*>& groups)
const;
124 void getMaterials(std::vector<OBJMaterial const*>& materials)
const;
207 void addLine(std::vector<OBJVertexGroup>& line);
524 void resetAuxiliaryStates();
529 uint32_t m_GroupFacesReservedSize;
530 uint32_t m_GroupFreeFormReservedSize;
533 bool m_FreeFormRational;
535 std::unordered_map<std::string, OBJGroup> m_GroupMap;
536 std::unordered_map<std::string, OBJMaterial> m_MaterialMap;
538 std::vector<OBJGroup*> m_ActiveGroups;
540 std::vector<OBJVector4> m_VertexSpatialData;
541 std::vector<OBJVector2> m_VertexTextureData;
542 std::vector<OBJVector3> m_VertexNormalData;
544 std::vector<std::string> m_MaterialLibraries;
545 std::vector<std::string> m_TextureMapLibraries;
547 std::vector<OBJRenderState> m_RenderStates;
std::vector< OBJVector4 > const * getSpatialData() const
Definition: OBJState.cpp:94
void setFreeFormDegreeU(int32_t degree)
Definition: OBJState.cpp:583
void addVertexTexture(OBJVector2 const &vector)
Definition: OBJState.cpp:174
void setLevelOfDetail(uint32_t lod)
Definition: OBJState.cpp:366
OBJFreeFormState * getFreeFormState()
Definition: OBJState.cpp:66
void addVertexParameter(OBJVector3 const &vector)
Definition: OBJState.cpp:184
void setTechniqueParametricA(OBJVector2 const &vec)
Definition: OBJState.cpp:487
A standard curve object.
Definition: OBJStructs.hpp:223
void getGroups(std::vector< OBJGroup const * > &groups) const
Definition: OBJState.cpp:83
void clearActiveGroups()
Definition: OBJState.cpp:125
Simple two-component vector struct.
Definition: OBJStructs.hpp:32
void setColorInterp(bool on)
Definition: OBJState.cpp:395
void addFreeFormCurve(OBJCurve const &curve)
Definition: OBJState.cpp:234
void addLine(std::vector< OBJVertexGroup > &line)
Definition: OBJState.cpp:208
OBJRenderState getRenderState(uint32_t index) const
Definition: OBJState.cpp:71
void setFreeFormType(OBJFreeFormType type)
Definition: OBJState.cpp:567
void setTechniqueSpatialSurface(float length)
Definition: OBJState.cpp:525
Collection of vertex groups comprising a single face.
Definition: OBJStructs.hpp:104
Struct of optional state settings.
Definition: OBJRenderState.hpp:100
Individual curve definition comprising a larger free-form object.
Definition: OBJStructs.hpp:181
void setFreeFormStepU(int32_t step)
Definition: OBJState.cpp:593
void setFreeFormBasisMatrixV(std::vector< float > const &matrix)
Definition: OBJState.cpp:611
void addPointCollection(std::vector< OBJVertexGroup > &points)
Definition: OBJState.cpp:221
void addActiveGroup(std::string const &name)
Definition: OBJState.cpp:135
void setTextureMap(std::string const &name)
Definition: OBJState.cpp:432
void setTechniqueParametric(float res)
Definition: OBJState.cpp:475
void addFreeFormSpecialCurve(OBJSimpleCurve const &scurve)
Definition: OBJState.cpp:352
void addFreeFormSurface(OBJSurface const &surface)
Definition: OBJState.cpp:267
void reserve(uint32_t spatial, uint32_t texture=0, uint32_t normal=0, uint32_t groupFaces=0, uint32_t groupFreeForms=0)
Definition: OBJState.cpp:56
std::vector< OBJVector3 > const * getNormalData() const
Definition: OBJState.cpp:104
void setFreeFormMergeGroupResolution(float res)
Definition: OBJState.cpp:624
void setTechniqueCurvatureSurface(OBJVector2 const &vec)
Definition: OBJState.cpp:550
Definition: OBJMaterial.hpp:122
void addFreeFormSpecialPoints(std::vector< int32_t > const &points)
Definition: OBJState.cpp:357
void setFreeFormRational(bool rational)
Definition: OBJState.cpp:578
void setTracingObject(std::string const &name)
Definition: OBJState.cpp:458
void addVertexSpatial(OBJVector4 const &vector)
Definition: OBJState.cpp:169
void clearState()
Definition: OBJState.cpp:40
void setFreeFormBasisMatrixU(std::vector< float > const &matrix)
Definition: OBJState.cpp:603
std::vector< std::string > const * getMaterialLibraries() const
Definition: OBJState.cpp:109
Specifies connectivity between two different surfaces.
Definition: OBJStructs.hpp:277
Definition: OBJStructs.hpp:261
void setMaterial(std::string const &name)
Definition: OBJState.cpp:411
void setTechniqueSpatialCurve(float length)
Definition: OBJState.cpp:513
void addFreeFormParameterV(std::vector< float > const ¶meters)
Definition: OBJState.cpp:338
void addFace(OBJFace face)
Definition: OBJState.cpp:193
void addMaterialLibrary(std::string const &path)
Definition: OBJState.cpp:427
void addVertexNormal(OBJVector3 const &vector)
Definition: OBJState.cpp:179
void setSmoothingGroup(uint32_t group)
Definition: OBJState.cpp:379
void setTechniqueCurvatureCurve(OBJVector2 const &vec)
Definition: OBJState.cpp:537
void addFreeFormParameterU(std::vector< float > const ¶meters)
Definition: OBJState.cpp:333
Simple three-component vector struct.
Definition: OBJStructs.hpp:41
void setBevelInterp(bool on)
Definition: OBJState.cpp:387
void setFreeFormStepV(int32_t step)
Definition: OBJState.cpp:598
std::vector< OBJVector2 > const * getTextureData() const
Definition: OBJState.cpp:99
void addFreeFormTrim(OBJSimpleCurve const &trim)
Definition: OBJState.cpp:342
void addFreeFormCurve2D(std::vector< int32_t > const &points)
Definition: OBJState.cpp:249
void addFreeFormConnection(OBJSurfaceConnection connection)
Definition: OBJState.cpp:282
void setFreeFormDegreeV(int32_t degree)
Definition: OBJState.cpp:588
void setDissolveInterp(bool on)
Definition: OBJState.cpp:403
void addTextureMapLibrary(std::string const &path)
Definition: OBJState.cpp:440
void addFreeFormHole(OBJSimpleCurve const &hole)
Definition: OBJState.cpp:347
Definition: OBJState.hpp:37
void setFreeFormMergeGroupNumber(int32_t id)
Definition: OBJState.cpp:619
Index pairing comprising a single vertex of a face.
Definition: OBJStructs.hpp:78
void setShadowObject(std::string const &name)
Definition: OBJState.cpp:445
void setTechniqueParametricB(float res)
Definition: OBJState.cpp:500