Commit 7ceeea64 authored by Aron Helser's avatar Aron Helser

Avatar: generate geometry headers using binary flag

Use BINARY and NUL_TERMINATE cmake flags to generate a char array in a
header, instead of hand-editing to avoid static string length limits.
parent 653fee07
......@@ -38,11 +38,28 @@ list(APPEND Module_SRCS ${source})
# Avatar's dependency on vtkIOXML keeps it out of OpenGL2 module
list(APPEND Module_SRCS
vtkAvatarHead.cxx
vtkAvatarLeftHand.cxx
vtkAvatarRightHand.cxx
vtkOpenGLAvatar.cxx
)
# Generates headers with char arrays that contain the model file contents.
set(geometry_files
data/vtkAvatarHead.vtp
data/vtkAvatarLeftHand.vtp
data/vtkAvatarRightHand.vtp
)
unset(geometry_h_files)
foreach(file ${geometry_files})
vtk_encode_string(
INPUT "${file}"
EXPORT_SYMBOL "VTKRENDERINGOPENVR_EXPORT"
EXPORT_HEADER "vtkRenderingOpenVRModule.h"
HEADER_OUTPUT header
SOURCE_OUTPUT source
BINARY
NUL_TERMINATE)
list(APPEND Module_SRCS ${source})
endforeach()
vtk_add_override(vtkAvatar vtkOpenGLAvatar)
vtk_object_factory_configure("${vtk_module_overrides}")
......
This diff is collapsed.
#ifndef vtkAvatarHead_h
#define vtkAvatarHead_h
#include "vtkRenderingOpenVRModule.h"
VTKRENDERINGOPENVR_EXPORT extern const char *vtkAvatarHead;
#endif
// VTK-HeaderTest-Exclude: vtkAvatarHead.h
This diff is collapsed.
#ifndef vtkAvatarLeftHand_h
#define vtkAvatarLeftHand_h
#include "vtkRenderingOpenVRModule.h"
#include <string> // for data var
VTKRENDERINGOPENVR_EXPORT extern std::string vtkAvatarLeftHand;
#endif
// VTK-HeaderTest-Exclude: vtkAvatarLeftHand.h
This diff is collapsed.
#ifndef vtkAvatarRightHand_h
#define vtkAvatarRightHand_h
#include "vtkRenderingOpenVRModule.h"
#include <string> // for data var
VTKRENDERINGOPENVR_EXPORT extern std::string vtkAvatarRightHand;
#endif
// VTK-HeaderTest-Exclude: vtkAvatarRightHand.h
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment