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

Method PickPoint

trinity/Sprite2d/Tr2Sprite2dStretchVertical.cpp:131–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131ITr2SpriteObject* Tr2Sprite2dStretchVertical::PickPoint( float x, float y, Tr2Sprite2dScene* renderer )
132{
133 if( !m_display )
134 {
135 return NULL;
136 }
137
138 if( m_pickState == TR2_SPS_ON )
139 {
140 if( renderer->IsInside( Vector2( x, y ), Vector2( m_translation.x, m_translation.y ), m_displayWidth, m_displayHeight, m_pickingMask ? 0.f : -1.0f ) )
141 {
142 if( !m_pickingMask || m_pickingMask->SampleMask( renderer->InverseTransformPoint( Vector2( x, y ) ), m_translation, m_displayWidth, m_displayHeight ) )
143 {
144 return this;
145 }
146 }
147 }
148
149 return NULL;
150}
151
152unsigned int Tr2Sprite2dStretchVertical::GetVertexCount()
153{

Callers

nothing calls this directly

Calls 3

IsInsideMethod · 0.80
SampleMaskMethod · 0.80
InverseTransformPointMethod · 0.80

Tested by

no test coverage detected