MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / MakeUnitSquare

Method MakeUnitSquare

samples/hmd_opencv_sandbox/geometry_object.cpp:207–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207void GeometryObject::MakeUnitSquare( int index )
208{
209 SetArrayProps( 0, 0, 4 );
210 SetArrayPropsAdvanced( 0, 0, 2, 0 );
211 SetArrayPropsAdvanced( 0, 1, 2, 2 );
212 SetRenderType( index, GL_TRIANGLES );
213 m_bTaintIAFlags |= 1 << index;
214 TackVertex( 0, 0, -1, 1 ); TackVertex( 0, 1, 0, 1 );
215 TackVertex( 0, 0, 1, 1 ); TackVertex( 0, 1, 1, 1 );
216 TackVertex( 0, 0, -1, -1 ); TackVertex( 0, 1, 0, 0 );
217 TackVertex( 0, 0, 1, -1 ); TackVertex( 0, 1, 1, 0 );
218 TackIndex( 0, 0 );
219 TackIndex( 0, 1 );
220 TackIndex( 0, 3 );
221 TackIndex( 0, 0 );
222 TackIndex( 0, 3 );
223 TackIndex( 0, 2 );
224}
225
226void GeometryObject::SetIndexArray( int index, std::vector<unsigned int> & intarray, unsigned int render_type )
227{

Callers 2

PrerenderMethod · 0.80
SetupCompanionWindowMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected