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

Method PickPoint

trinity/Sprite2d/Tr2Sprite2d.cpp:144–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144ITr2SpriteObject* Tr2Sprite2d::PickPoint( float x, float y, Tr2Sprite2dScene* renderer )
145{
146 if( !m_display )
147 {
148 return NULL;
149 }
150
151 if( m_pickState == TR2_SPS_ON )
152 {
153 if( renderer->IsInside( Vector2( x, y ), m_translation, m_displayWidth, m_displayHeight, m_pickRadius ) )
154 {
155 if( !m_pickingMask || m_pickingMask->SampleMask( renderer->InverseTransformPoint( Vector2( x, y ) ), m_translation, m_displayWidth, m_displayHeight ) )
156 {
157 return this;
158 }
159 }
160 }
161
162 return NULL;
163}
164
165unsigned int Tr2Sprite2d::GetVertexCount()
166{

Callers 1

PickObjectMethod · 0.45

Calls 3

IsInsideMethod · 0.80
SampleMaskMethod · 0.80
InverseTransformPointMethod · 0.80

Tested by

no test coverage detected