Esempio n. 1
0
// Assumes RGBA order, mainly because Vector is RGB
uint Vector4::ToColor() const
{
	float R = Saturate( x );
	float G = Saturate( y );
	float B = Saturate( z );
	float A = Saturate( w );

	return ARGB_TO_COLOR( (byte)( A * 255.0f ), (byte)( R * 255.0f ), (byte)( G * 255.0f ), (byte)( B * 255.0f ) );
}
/*virtual*/ void WBCompEldSensorVision::DebugRender() const
{
	WBCompEldTransform* const pTransform = GetEntity()->GetTransformComponent<WBCompEldTransform>();
	DEVASSERT( pTransform );

	const Vector EyeLocation = pTransform->GetLocation() + Vector( 0.0f, 0.0f, m_EyeOffsetZ );

	GetFramework()->GetRenderer()->DEBUGDrawCross( EyeLocation, 0.5f, ARGB_TO_COLOR( 255, 255, 0, 0 ) );
}
Esempio n. 3
0
/*virtual*/ void WBCompEldFrobbable::DebugRender() const {
  WBCompEldTransform* const pTransform =
      GetEntity()->GetTransformComponent<WBCompEldTransform>();
  DEVASSERT(pTransform);

  const Vector Location = pTransform->GetLocation() + m_BoundOffset;
  GetFramework()->GetRenderer()->DEBUGDrawBox(Location - m_BoundExtents,
                                              Location + m_BoundExtents,
                                              ARGB_TO_COLOR(255, 255, 128, 0));
}
Esempio n. 4
0
/*virtual*/ void WBCompEldMesh::DebugRender() const {
  WBCompEldTransform* pTransform =
      GetEntity()->GetTransformComponent<WBCompEldTransform>();
  DEVASSERT(pTransform);

  IRenderer* const pRenderer = GetFramework()->GetRenderer();
  const Vector EntityLocation = pTransform->GetLocation();

  pRenderer->DEBUGDrawCross(EntityLocation + m_Offset, 0.25f,
                            ARGB_TO_COLOR(255, 255, 255, 0));

  const Vector IrradianceOffset = Vector(0.0f, 0.0f, m_IrradianceOffsetZ);
  const Vector IrradianceLocation = EntityLocation + IrradianceOffset;
  pRenderer->DEBUGDrawCross(IrradianceLocation, 0.25f,
                            ARGB_TO_COLOR(255, 0, 255, 255));

  if (m_UseTwoPointIrradiance) {
    pRenderer->DEBUGDrawCross(IrradianceLocation + m_TwoPointIrradianceOffset,
                              0.25f, ARGB_TO_COLOR(255, 0, 255, 255));
  }

  pRenderer->DEBUGDrawBox(m_Mesh->m_AABB.m_Min, m_Mesh->m_AABB.m_Max,
                          ARGB_TO_COLOR(255, 255, 0, 255));
}
Esempio n. 5
0
UIWidgetText::UIWidgetText( const SimpleString& DefinitionName )
:	m_Font( NULL )
,	m_IsLiteral( false )
,	m_IsDynamicPosition( false )
,	m_String()
,	m_DynamicString()
,	m_Mesh( NULL )
,	m_FontPrintFlags( FONT_PRINT_LEFT )
,	m_WrapWidth( 0.0f )
,	m_HasDropShadow( false )
,	m_DropShadowOffset()
,	m_DropShadowColor( ARGB_TO_COLOR( 255, 0, 0, 0 ) )
,	m_DropShadowMesh( NULL )
{
	InitializeFromDefinition( DefinitionName );
}
Esempio n. 6
0
UIWidgetText::UIWidgetText()
:	m_Font( NULL )
,	m_IsLiteral( false )
,	m_IsDynamicPosition( false )
,	m_ClampToPixelGrid( false )
,	m_String()
,	m_DynamicString()
,	m_Mesh( NULL )
,	m_FontPrintFlags( FONT_PRINT_LEFT )
,	m_WrapWidth( 0.0f )
,	m_HasDropShadow( false )
,	m_DropShadowOffset()
,	m_DropShadowColor( ARGB_TO_COLOR( 255, 0, 0, 0 ) ) 
,	m_DropShadowMesh( NULL )
{
}