NGL
6.5
The NCCA Graphics Library
|
Class to load and manipulate NCCAPointBake data, this will replace the Houdini Clip files as they are now not supported in the educational version of Houdini. More...
#include <NCCAPointBake.h>
Public Member Functions | |
NCCAPointBake () noexcept | |
ctor for the clip More... | |
~NCCAPointBake () noexcept | |
the dtor erases all clip data allocated and also destroys the Obj reference held in the clip More... | |
NCCAPointBake (const std::string &_fileName) noexcept | |
ctor using a clip and an obj More... | |
void | setFrame (const unsigned int frame) noexcept |
Set the current Frame and map the clip for that frame to the obj. More... | |
bool | loadPointBake (const std::string &_fileName) noexcept |
method to load a point baked file More... | |
bool | loadBinaryPointBake (const std::string &_fileName) noexcept |
method to load a binary point baked file More... | |
bool | saveBinaryPointBake (const std::string &_fileName) noexcept |
method to save a binary point baked file basically re-ordered data only More... | |
bool | attachMesh (AbstractMesh *_mesh) noexcept |
method to attach a mesh to the data this method will check for basic vetex compatibility and then re-order the data to match the VBO structure of the mesh More... | |
void | setMeshToFrame (const unsigned int _frame) noexcept |
set the attached mesh to the current frame More... | |
unsigned int | getNumFrames () const noexcept |
return the number of Frames loaded from the PointBake file More... | |
unsigned int | getNumVerts () const noexcept |
return the number of verts loaded from the PointBake file More... | |
std::vector< std::vector< Vec3 > > & | getRawDataPointer () noexcept |
get a Raw data pointer to the un-sorted PointBake data More... | |
std::vector< Vec3 > & | getRawDataPointerAtFrame (unsigned int _f) noexcept |
get a Raw data pointer to the un-sorted PointBake for a particular frame More... | |
Protected Member Functions | |
void | reorderVerts () noexcept |
method to create the vertorder container with the correct vertex order in place to match that of the obj file More... | |
Protected Attributes | |
unsigned int | m_numFrames |
the number of frames in the clip file More... | |
unsigned int | m_currFrame |
Current active frame when animating. More... | |
std::vector< std::vector< Vec3 > > | m_data |
The actual data of the clip stored per vertex in sequence v0 - vn and then per frame frame index is always frame 0- endframe despite the start / end values in the clip file. More... | |
unsigned int | m_nVerts |
Number of verts in the actual clip. More... | |
std::string | m_meshName |
the name of the mesh More... | |
unsigned int | m_startFrame |
the start frame More... | |
unsigned int | m_endFrame |
the end frame More... | |
AbstractMesh * | m_mesh |
pointer to mesh attatched to data More... | |
bool | m_binFile |
flag to indicate if we have a binary or xml based file loaded More... | |
Friends | |
class | AbstractMesh |
Class to load and manipulate NCCAPointBake data, this will replace the Houdini Clip files as they are now not supported in the educational version of Houdini.
<?xml version="1.0" encoding="UTF-8" ?> <NCCAPointBake> <MeshName> The name of the mesh exported </MeshName> <NumVerts> the number of verts </NumVerts> <StartFrame> start frame from export </StartFrame> <EndFrame> end frame from export </EndFrame> <NumFrames> Total number of frames </NumFrame> <TranslateMode> if data for translations are absolute or relative </TranslateMode> <Frame number="0"> <Vertex number="0" attrib="translate"> 2.145875 9.490916 33.391218 </Vertex> etc </Frame> </NCCAPointBake>
Definition at line 58 of file NCCAPointBake.h.
|
noexcept |
ctor for the clip
Definition at line 33 of file NCCAPointBake.cpp.
References m_binFile, m_currFrame, m_endFrame, m_mesh, m_numFrames, m_nVerts, and m_startFrame.
|
noexcept |
the dtor erases all clip data allocated and also destroys the Obj reference held in the clip
Definition at line 134 of file NCCAPointBake.cpp.
|
noexcept |
ctor using a clip and an obj
[in] | _fileName | the name of the bake file to load |
Definition at line 139 of file NCCAPointBake.cpp.
References loadPointBake().
|
noexcept |
method to attach a mesh to the data this method will check for basic vetex compatibility and then re-order the data to match the VBO structure of the mesh
[in] | _mesh | the mesh to attach |
Definition at line 281 of file NCCAPointBake.cpp.
|
inlinenoexcept |
return the number of Frames loaded from the PointBake file
Definition at line 113 of file NCCAPointBake.h.
|
inlinenoexcept |
return the number of verts loaded from the PointBake file
Definition at line 118 of file NCCAPointBake.h.
|
inlinenoexcept |
get a Raw data pointer to the un-sorted PointBake data
Definition at line 123 of file NCCAPointBake.h.
get a Raw data pointer to the un-sorted PointBake for a particular frame
[in] | _f | the frame to access |
Definition at line 301 of file NCCAPointBake.cpp.
References m_data, m_numFrames, and NGL_ASSERT.
|
noexcept |
method to load a binary point baked file
[in] | _fileName | the file to load |
The number of vertices in the object
Definition at line 149 of file NCCAPointBake.cpp.
References m_binFile, m_currFrame, m_data, m_numFrames, m_nVerts, and m_startFrame.
|
noexcept |
method to load a point baked file
[in] | _fileName | the file to load |
Definition at line 44 of file NCCAPointBake.cpp.
References rapidxml::xml_node< Ch >::first_attribute(), rapidxml::xml_node< Ch >::first_node(), m_binFile, m_currFrame, m_data, m_endFrame, m_mesh, m_meshName, m_numFrames, m_nVerts, m_startFrame, rapidxml::xml_node< Ch >::next_sibling(), rapidxml::xml_document< Ch >::parse(), rapidxml::parse_trim_whitespace, and rapidxml::xml_base< Ch >::value().
|
protectednoexcept |
method to create the vertorder container with the correct vertex order in place to match that of the obj file
|
noexcept |
method to save a binary point baked file basically re-ordered data only
[in] | _fileName | the file to load |
Definition at line 203 of file NCCAPointBake.cpp.
References m_binFile, m_currFrame, m_data, m_numFrames, m_nVerts, and m_startFrame.
Set the current Frame and map the clip for that frame to the obj.
[in] | frame | the frame to set |
Definition at line 144 of file NCCAPointBake.cpp.
References m_currFrame.
set the attached mesh to the current frame
[in] | _frame | the frame to set the mesh to |
Definition at line 246 of file NCCAPointBake.cpp.
References ngl::AbstractMesh::getFaceList(), m_currFrame, m_data, m_mesh, ngl::AbstractMesh::mapVAOVerts(), and ngl::AbstractMesh::unMapVAO().
|
friend |
Definition at line 60 of file NCCAPointBake.h.
|
protected |
flag to indicate if we have a binary or xml based file loaded
Definition at line 174 of file NCCAPointBake.h.
|
protected |
Current active frame when animating.
Definition at line 145 of file NCCAPointBake.h.
|
protected |
The actual data of the clip stored per vertex in sequence v0 - vn and then per frame frame index is always frame 0- endframe despite the start / end values in the clip file.
Definition at line 150 of file NCCAPointBake.h.
|
protected |
the end frame
Definition at line 166 of file NCCAPointBake.h.
|
protected |
pointer to mesh attatched to data
Definition at line 170 of file NCCAPointBake.h.
|
protected |
the name of the mesh
Definition at line 158 of file NCCAPointBake.h.
|
protected |
the number of frames in the clip file
Definition at line 141 of file NCCAPointBake.h.
|
protected |
Number of verts in the actual clip.
Definition at line 154 of file NCCAPointBake.h.
|
protected |
the start frame
Definition at line 162 of file NCCAPointBake.h.