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

Method PickPoint

trinity/Sprite2d/Tr2Sprite2dFrame.cpp:181–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181ITr2SpriteObject* Tr2Sprite2dFrame::PickPoint( float x, float y, Tr2Sprite2dScene* renderer )
182{
183 if( !m_display )
184 {
185 return NULL;
186 }
187
188 if( m_pickState == TR2_SPS_ON )
189 {
190 if( renderer->IsInside( Vector2( x, y ), Vector2( m_translation.x, m_translation.y ), m_displayWidth, m_displayHeight, 0.0f ) )
191 {
192 if( !m_pickingMask || m_pickingMask->SampleMask( renderer->InverseTransformPoint( Vector2( x, y ) ), m_translation, m_displayWidth, m_displayHeight ) )
193 {
194 return this;
195 }
196 }
197 }
198
199 return NULL;
200}
201
202unsigned int Tr2Sprite2dFrame::GetVertexCount()
203{

Callers

nothing calls this directly

Calls 3

IsInsideMethod · 0.80
SampleMaskMethod · 0.80
InverseTransformPointMethod · 0.80

Tested by

no test coverage detected