MCPcopy Create free account
hub / github.com/carbonengine/trinity / PickPoint

Method PickPoint

trinity/Sprite2d/Tr2Sprite2dRenderJob.cpp:27–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27ITr2SpriteObject* Tr2Sprite2dRenderJob::PickPoint( float x, float y, Tr2Sprite2dScene* renderer )
28{
29 if( !m_display )
30 {
31 return NULL;
32 }
33
34 if( m_pickState == TR2_SPS_ON )
35 {
36 if( renderer->IsInside( Vector2( x, y ), m_translation, m_displayWidth, m_displayHeight, 0.0f ) )
37 {
38 if( !m_pickingMask || m_pickingMask->SampleMask( renderer->InverseTransformPoint( Vector2( x, y ) ), m_translation, m_displayWidth, m_displayHeight ) )
39 {
40 return this;
41 }
42 }
43 }
44
45 return NULL;
46}
47
48unsigned int Tr2Sprite2dRenderJob::GetVertexCount()
49{

Callers

nothing calls this directly

Calls 3

IsInsideMethod · 0.80
SampleMaskMethod · 0.80
InverseTransformPointMethod · 0.80

Tested by

no test coverage detected