MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/FleX / PlyRead

Function PlyRead

core/mesh.cpp:104–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102
103 template <typename T>
104 T PlyRead(ifstream& s, PlyFormat format)
105 {
106 T data = eAscii;
107
108 switch (format)
109 {
110 case eAscii:
111 {
112 s >> data;
113 break;
114 }
115 case eBinaryBigEndian:
116 {
117 char c[sizeof(T)];
118 s.read(c, sizeof(T));
119 reverse(c, c+sizeof(T));
120 data = *(T*)c;
121 break;
122 }
123 default:
124 assert(0);
125 }
126
127 return data;
128 }
129
130} // namespace anonymous
131

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected