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

Method GetMatrixWithoutViewAdjustment

trinity/TriProjection.cpp:130–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void TriProjection::GetMatrixWithoutViewAdjustment( Matrix& proj ) const
131{
132 // This constructs the projection matrix. Note that this is not necessarily the
133 // same matrix that SetProjection would set to the device. That is because
134 // Tr2Renderer::SetPerspectiveProjection may skew/offset the projection if the
135 // viewport is partly off screen. <bjorns 2009-03-26>
136 switch( m_projectionType )
137 {
138 case TRIPROJECTION_FOV:
139 proj = PerspectiveFovMatrix( m_fov, m_aspect, m_zn, m_zf );
140 break;
141 case TRIPROJECTION_OFF_CENTER:
142 proj = PerspectiveOffCenterMatrix( m_left, m_right, m_bottom, m_top, m_zn, m_zf );
143 break;
144 case TRIPROJECTION_ORTHO:
145 proj = OrthoMatrix( m_left, m_top, m_zn, m_zf );
146 break;
147 case TRIPROJECTION_CUSTOM:
148 proj = m_customTransform;
149 break;
150 }
151}
152
153Matrix TriProjection::GetTransform() const
154{

Callers 3

PickObjectMethod · 0.80
PyPickParticleFunction · 0.80
PerformPickingMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected