mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-07 21:05:15 +00:00
Add pivot/pan/rotation/lights controls to PCB render dialog.
This commit is contained in:
parent
3add0afdff
commit
9a3d7594d9
common/jobs
kicad/cli
libs/kimath/include/math
pcbnew
@ -24,6 +24,26 @@
|
||||
#include <i18n_utility.h>
|
||||
|
||||
|
||||
namespace nlohmann
|
||||
{
|
||||
template <>
|
||||
struct adl_serializer<VECTOR3D>
|
||||
{
|
||||
static void from_json( const json& j, VECTOR3D& s )
|
||||
{
|
||||
if( !j.is_array() || j.size() != 3 )
|
||||
throw std::invalid_argument( "JSON array size should be 3 for VECTOR3D" );
|
||||
|
||||
s.x = j[0];
|
||||
s.y = j[1];
|
||||
s.z = j[2];
|
||||
}
|
||||
|
||||
static void to_json( json& j, const VECTOR3D& s ) { j = json::array( { s.x, s.y, s.z } ); }
|
||||
};
|
||||
} // namespace nlohmann
|
||||
|
||||
|
||||
std::map<JOB_PCB_RENDER::FORMAT, wxString> outputFormatNameMap = {
|
||||
{ JOB_PCB_RENDER::FORMAT::JPEG, wxT( "JPEG" ) },
|
||||
{ JOB_PCB_RENDER::FORMAT::PNG, wxT( "PNG" ) }
|
||||
@ -75,6 +95,24 @@ JOB_PCB_RENDER::JOB_PCB_RENDER() :
|
||||
m_params.emplace_back( new JOB_PARAM<int>( "width", &m_width, m_width ) );
|
||||
m_params.emplace_back( new JOB_PARAM<int>( "height", &m_height, m_height ) );
|
||||
|
||||
m_params.emplace_back( new JOB_PARAM<double>( "pivot_x", &m_pivot.x, m_pivot.x ) );
|
||||
m_params.emplace_back( new JOB_PARAM<double>( "pivot_y", &m_pivot.y, m_pivot.y ) );
|
||||
m_params.emplace_back( new JOB_PARAM<double>( "pivot_z", &m_pivot.z, m_pivot.z ) );
|
||||
|
||||
m_params.emplace_back( new JOB_PARAM<double>( "pan_x", &m_pan.x, m_pan.x ) );
|
||||
m_params.emplace_back( new JOB_PARAM<double>( "pan_y", &m_pan.y, m_pan.y ) );
|
||||
m_params.emplace_back( new JOB_PARAM<double>( "pan_z", &m_pan.z, m_pan.z ) );
|
||||
|
||||
m_params.emplace_back( new JOB_PARAM<double>( "rotation_x", &m_rotation.x, m_rotation.x ) );
|
||||
m_params.emplace_back( new JOB_PARAM<double>( "rotation_y", &m_rotation.y, m_rotation.y ) );
|
||||
m_params.emplace_back( new JOB_PARAM<double>( "rotation_z", &m_rotation.z, m_rotation.z ) );
|
||||
|
||||
m_params.emplace_back( new JOB_PARAM<VECTOR3D>( "light_top_intensity", &m_lightTopIntensity, m_lightTopIntensity ) );
|
||||
m_params.emplace_back( new JOB_PARAM<VECTOR3D>( "light_bottom_intensity", &m_lightBottomIntensity, m_lightBottomIntensity ) );
|
||||
m_params.emplace_back( new JOB_PARAM<VECTOR3D>( "light_side_intensity", &m_lightSideIntensity, m_lightSideIntensity ) );
|
||||
m_params.emplace_back( new JOB_PARAM<VECTOR3D>( "light_camera_intensity", &m_lightCameraIntensity, m_lightCameraIntensity ) );
|
||||
|
||||
m_params.emplace_back( new JOB_PARAM<int>( "light_side_elevation", &m_lightSideElevation, m_lightSideElevation ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -93,6 +93,11 @@ public:
|
||||
VECTOR3D m_pan;
|
||||
VECTOR3D m_pivot;
|
||||
bool m_floor = false;
|
||||
VECTOR3D m_lightTopIntensity;
|
||||
VECTOR3D m_lightBottomIntensity;
|
||||
VECTOR3D m_lightCameraIntensity;
|
||||
VECTOR3D m_lightSideIntensity = VECTOR3D( 0.5, 0.5, 0.5 );
|
||||
int m_lightSideElevation = 60;
|
||||
};
|
||||
|
||||
#endif
|
@ -51,6 +51,13 @@
|
||||
#define ARG_PERSPECTIVE "--perspective"
|
||||
#define ARG_FLOOR "--floor"
|
||||
|
||||
#define ARG_LIGHT_TOP "--light-top"
|
||||
#define ARG_LIGHT_BOTTOM "--light-bottom"
|
||||
#define ARG_LIGHT_SIDE "--light-side"
|
||||
#define ARG_LIGHT_CAMERA "--light-camera"
|
||||
|
||||
#define ARG_LIGHT_SIDE_ELEVATION "--light-side-elevation"
|
||||
|
||||
|
||||
template <typename T>
|
||||
static wxString enumString()
|
||||
@ -158,6 +165,51 @@ static bool getToVector3( const std::string& aInput, VECTOR3D& aOutput )
|
||||
}
|
||||
|
||||
|
||||
static bool getColorOrIntensity( const std::string& aInput, VECTOR3D& aOutput )
|
||||
{
|
||||
// If not specified, leave at default
|
||||
if( aInput.empty() )
|
||||
return true;
|
||||
|
||||
// Remove potential quotes
|
||||
wxString wxStr = From_UTF8( aInput );
|
||||
|
||||
if( wxStr[0] == '\'' )
|
||||
wxStr = wxStr.AfterFirst( '\'' );
|
||||
|
||||
if( wxStr[wxStr.length() - 1] == '\'' )
|
||||
wxStr = wxStr.BeforeLast( '\'' );
|
||||
|
||||
wxArrayString arr = wxSplit( wxStr, ',', 0 );
|
||||
|
||||
if( arr.size() == 3 )
|
||||
{
|
||||
VECTOR3D vec;
|
||||
bool success = true;
|
||||
success &= arr[0].Trim().ToCDouble( &vec.x );
|
||||
success &= arr[1].Trim().ToCDouble( &vec.y );
|
||||
success &= arr[2].Trim().ToCDouble( &vec.z );
|
||||
|
||||
if( !success )
|
||||
return false;
|
||||
|
||||
aOutput = vec;
|
||||
return true;
|
||||
}
|
||||
else if( arr.size() == 1 )
|
||||
{
|
||||
double val;
|
||||
if( arr[0].Trim().ToCDouble( &val ) )
|
||||
{
|
||||
aOutput = VECTOR3D( val, val, val );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
CLI::PCB_RENDER_COMMAND::PCB_RENDER_COMMAND() : COMMAND( "render" )
|
||||
{
|
||||
addCommonArgs( true, true, false, false );
|
||||
@ -237,6 +289,32 @@ CLI::PCB_RENDER_COMMAND::PCB_RENDER_COMMAND() : COMMAND( "render" )
|
||||
.metavar( "ANGLES" )
|
||||
.help( UTF8STDSTR(
|
||||
_( "Rotate board, format 'X,Y,Z' e.g.: '-45,0,45' for isometric view" ) ) );
|
||||
|
||||
m_argParser.add_argument( ARG_LIGHT_TOP )
|
||||
.default_value( std::string( "" ) )
|
||||
.metavar( "COLOR" )
|
||||
.help( UTF8STDSTR( _( "Top light intensity, format 'R,G,B' or a single number, range: 0-1" ) ) );
|
||||
|
||||
m_argParser.add_argument( ARG_LIGHT_BOTTOM )
|
||||
.default_value( std::string( "" ) )
|
||||
.metavar( "COLOR" )
|
||||
.help( UTF8STDSTR( _( "Bottom light intensity, format 'R,G,B' or a single number, range: 0-1" ) ) );
|
||||
|
||||
m_argParser.add_argument( ARG_LIGHT_SIDE )
|
||||
.default_value( std::string( "" ) )
|
||||
.metavar( "COLOR" )
|
||||
.help( UTF8STDSTR( _( "Side lights intensity, format 'R,G,B' or a single number, range: 0-1" ) ) );
|
||||
|
||||
m_argParser.add_argument( ARG_LIGHT_CAMERA )
|
||||
.default_value( std::string( "" ) )
|
||||
.metavar( "COLOR" )
|
||||
.help( UTF8STDSTR( _( "Camera light intensity, format 'R,G,B' or a single number, range: 0-1" ) ) );
|
||||
|
||||
m_argParser.add_argument( ARG_LIGHT_SIDE_ELEVATION )
|
||||
.default_value( 60 )
|
||||
.scan<'i', int>()
|
||||
.metavar( "ANGLE" )
|
||||
.help( UTF8STDSTR( _( "Side lights elevation angle in degrees, range: 0-90" ) ) );
|
||||
}
|
||||
|
||||
|
||||
@ -254,6 +332,7 @@ int CLI::PCB_RENDER_COMMAND::doPerform( KIWAY& aKiway )
|
||||
renderJob->m_zoom = m_argParser.get<double>( ARG_ZOOM );
|
||||
renderJob->m_perspective = m_argParser.get<bool>( ARG_PERSPECTIVE );
|
||||
renderJob->m_floor = m_argParser.get<bool>( ARG_FLOOR );
|
||||
renderJob->m_lightSideElevation = m_argParser.get<double>( ARG_LIGHT_SIDE_ELEVATION );
|
||||
|
||||
getToEnum( m_argParser.get<std::string>( ARG_QUALITY ), renderJob->m_quality );
|
||||
getToEnum( m_argParser.get<std::string>( ARG_SIDE ), renderJob->m_side );
|
||||
@ -282,6 +361,34 @@ int CLI::PCB_RENDER_COMMAND::doPerform( KIWAY& aKiway )
|
||||
return EXIT_CODES::ERR_ARGS;
|
||||
}
|
||||
|
||||
if( !getColorOrIntensity( m_argParser.get<std::string>( ARG_LIGHT_TOP ),
|
||||
renderJob->m_lightTopIntensity ) )
|
||||
{
|
||||
wxFprintf( stderr, _( "Invalid light top intensity format\n" ) );
|
||||
return EXIT_CODES::ERR_ARGS;
|
||||
}
|
||||
|
||||
if( !getColorOrIntensity( m_argParser.get<std::string>( ARG_LIGHT_BOTTOM ),
|
||||
renderJob->m_lightBottomIntensity ) )
|
||||
{
|
||||
wxFprintf( stderr, _( "Invalid light bottom intensity format\n" ) );
|
||||
return EXIT_CODES::ERR_ARGS;
|
||||
}
|
||||
|
||||
if( !getColorOrIntensity( m_argParser.get<std::string>( ARG_LIGHT_SIDE ),
|
||||
renderJob->m_lightSideIntensity ) )
|
||||
{
|
||||
wxFprintf( stderr, _( "Invalid light side intensity format\n" ) );
|
||||
return EXIT_CODES::ERR_ARGS;
|
||||
}
|
||||
|
||||
if( !getColorOrIntensity( m_argParser.get<std::string>( ARG_LIGHT_CAMERA ),
|
||||
renderJob->m_lightCameraIntensity ) )
|
||||
{
|
||||
wxFprintf( stderr, _( "Invalid light camera intensity format\n" ) );
|
||||
return EXIT_CODES::ERR_ARGS;
|
||||
}
|
||||
|
||||
if( m_argOutput.Lower().EndsWith( wxS( ".png" ) ) )
|
||||
{
|
||||
renderJob->m_format = JOB_PCB_RENDER::FORMAT::PNG;
|
||||
|
@ -99,6 +99,11 @@ public:
|
||||
*/
|
||||
VECTOR3<T> Normalize();
|
||||
|
||||
/**
|
||||
* Set all elements to \a val
|
||||
*/
|
||||
VECTOR3<T> SetAll( T val );
|
||||
|
||||
/// Equality operator
|
||||
bool operator==( const VECTOR3<T>& aVector ) const;
|
||||
|
||||
@ -166,6 +171,17 @@ VECTOR3<T> VECTOR3<T>::Normalize()
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
VECTOR3<T> VECTOR3<T>::SetAll( T val )
|
||||
{
|
||||
x = val;
|
||||
y = val;
|
||||
z = val;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
bool VECTOR3<T>::operator==( VECTOR3<T> const& aVector ) const
|
||||
{
|
||||
|
@ -163,6 +163,25 @@ bool DIALOG_RENDER_JOB::TransferDataFromWindow()
|
||||
m_job->m_width = m_spinCtrlWidth->GetValue();
|
||||
m_job->m_height = m_spinCtrlHeight->GetValue();
|
||||
|
||||
m_job->m_pivot.x = m_spinCtrlPivotX->GetValue();
|
||||
m_job->m_pivot.y = m_spinCtrlPivotY->GetValue();
|
||||
m_job->m_pivot.z = m_spinCtrlPivotZ->GetValue();
|
||||
|
||||
m_job->m_pan.x = m_spinCtrlPanX->GetValue();
|
||||
m_job->m_pan.y = m_spinCtrlPanY->GetValue();
|
||||
m_job->m_pan.z = m_spinCtrlPanZ->GetValue();
|
||||
|
||||
m_job->m_rotation.x = m_spinCtrlRotX->GetValue();
|
||||
m_job->m_rotation.y = m_spinCtrlRotY->GetValue();
|
||||
m_job->m_rotation.z = m_spinCtrlRotZ->GetValue();
|
||||
|
||||
m_job->m_lightTopIntensity.SetAll( m_spinCtrlLightsTop->GetValue() );
|
||||
m_job->m_lightBottomIntensity.SetAll( m_spinCtrlLightsBottom->GetValue() );
|
||||
m_job->m_lightSideIntensity.SetAll( m_spinCtrlLightsSides->GetValue() );
|
||||
m_job->m_lightCameraIntensity.SetAll( m_spinCtrlLightsCamera->GetValue() );
|
||||
|
||||
m_job->m_lightSideElevation = m_spinCtrlLightsSideElevation->GetValue();
|
||||
|
||||
m_radioProjection->GetSelection() == 0 ? m_job->m_perspective = true
|
||||
: m_job->m_perspective = false;
|
||||
|
||||
@ -202,5 +221,24 @@ bool DIALOG_RENDER_JOB::TransferDataToWindow()
|
||||
m_spinCtrlWidth->SetValue( width );
|
||||
m_spinCtrlHeight->SetValue( height );
|
||||
|
||||
m_spinCtrlPivotX->SetValue( m_job->m_pivot.x );
|
||||
m_spinCtrlPivotY->SetValue( m_job->m_pivot.y );
|
||||
m_spinCtrlPivotZ->SetValue( m_job->m_pivot.z );
|
||||
|
||||
m_spinCtrlPanX->SetValue( m_job->m_pan.x );
|
||||
m_spinCtrlPanY->SetValue( m_job->m_pan.y );
|
||||
m_spinCtrlPanZ->SetValue( m_job->m_pan.z );
|
||||
|
||||
m_spinCtrlRotX->SetValue( m_job->m_rotation.x );
|
||||
m_spinCtrlRotY->SetValue( m_job->m_rotation.y );
|
||||
m_spinCtrlRotZ->SetValue( m_job->m_rotation.z );
|
||||
|
||||
m_spinCtrlLightsTop->SetValue( m_job->m_lightTopIntensity.x );
|
||||
m_spinCtrlLightsBottom->SetValue( m_job->m_lightBottomIntensity.x );
|
||||
m_spinCtrlLightsSides->SetValue( m_job->m_lightSideIntensity.x );
|
||||
m_spinCtrlLightsCamera->SetValue( m_job->m_lightCameraIntensity.x );
|
||||
|
||||
m_spinCtrlLightsSideElevation->SetValue( m_job->m_lightSideElevation );
|
||||
|
||||
return true;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@ -16,32 +16,32 @@ DIALOG_RENDER_JOB_BASE::DIALOG_RENDER_JOB_BASE( wxWindow* parent, wxWindowID id,
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer1;
|
||||
fgSizer1 = new wxFlexGridSizer( 0, 2, 6, 5 );
|
||||
fgSizer1->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
wxFlexGridSizer* fgSizerTop;
|
||||
fgSizerTop = new wxFlexGridSizer( 0, 2, 6, 5 );
|
||||
fgSizerTop->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerTop->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_textOutputPath = new wxStaticText( this, wxID_ANY, _("Output file:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_textOutputPath->Wrap( -1 );
|
||||
fgSizer1->Add( m_textOutputPath, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
fgSizerTop->Add( m_textOutputPath, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
||||
|
||||
m_textCtrlOutputFile = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_textCtrlOutputFile->SetMinSize( wxSize( 350,-1 ) );
|
||||
|
||||
fgSizer1->Add( m_textCtrlOutputFile, 0, 0, 5 );
|
||||
fgSizerTop->Add( m_textCtrlOutputFile, 0, 0, 5 );
|
||||
|
||||
m_formatLabel = new wxStaticText( this, wxID_ANY, _("Format:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_formatLabel->Wrap( -1 );
|
||||
fgSizer1->Add( m_formatLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
fgSizerTop->Add( m_formatLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
||||
|
||||
wxArrayString m_choiceFormatChoices;
|
||||
m_choiceFormat = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceFormatChoices, 0 );
|
||||
m_choiceFormat->SetSelection( 0 );
|
||||
fgSizer1->Add( m_choiceFormat, 0, 0, 5 );
|
||||
fgSizerTop->Add( m_choiceFormat, 0, 0, 5 );
|
||||
|
||||
m_dimensionsLabel = new wxStaticText( this, wxID_ANY, _("Dimensions:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_dimensionsLabel->Wrap( -1 );
|
||||
fgSizer1->Add( m_dimensionsLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
fgSizerTop->Add( m_dimensionsLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizer3;
|
||||
bSizer3 = new wxBoxSizer( wxHORIZONTAL );
|
||||
@ -65,39 +65,39 @@ DIALOG_RENDER_JOB_BASE::DIALOG_RENDER_JOB_BASE( wxWindow* parent, wxWindowID id,
|
||||
bSizer3->Add( m_staticText182, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( bSizer3, 1, wxEXPAND, 5 );
|
||||
fgSizerTop->Add( bSizer3, 1, wxEXPAND, 5 );
|
||||
|
||||
m_qualityLabel = new wxStaticText( this, wxID_ANY, _("Quality:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_qualityLabel = new wxStaticText( this, wxID_ANY, _("Quality preset:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_qualityLabel->Wrap( -1 );
|
||||
fgSizer1->Add( m_qualityLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
fgSizerTop->Add( m_qualityLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
||||
|
||||
wxArrayString m_choiceQualityChoices;
|
||||
m_choiceQuality = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceQualityChoices, 0 );
|
||||
m_choiceQuality->SetSelection( 0 );
|
||||
fgSizer1->Add( m_choiceQuality, 0, 0, 5 );
|
||||
fgSizerTop->Add( m_choiceQuality, 0, 0, 5 );
|
||||
|
||||
m_backgroundStyleLabel = new wxStaticText( this, wxID_ANY, _("Background style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_backgroundStyleLabel->Wrap( -1 );
|
||||
fgSizer1->Add( m_backgroundStyleLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
fgSizerTop->Add( m_backgroundStyleLabel, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
||||
|
||||
wxArrayString m_choiceBgStyleChoices;
|
||||
m_choiceBgStyle = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceBgStyleChoices, 0 );
|
||||
m_choiceBgStyle->SetSelection( 0 );
|
||||
fgSizer1->Add( m_choiceBgStyle, 0, 0, 5 );
|
||||
fgSizerTop->Add( m_choiceBgStyle, 0, 0, 5 );
|
||||
|
||||
m_staticText15 = new wxStaticText( this, wxID_ANY, _("Zoom:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText15->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
fgSizerTop->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrlZoom = new wxSpinCtrlDouble( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 1, 0.1 );
|
||||
m_spinCtrlZoom->SetDigits( 2 );
|
||||
fgSizer1->Add( m_spinCtrlZoom, 0, 0, 5 );
|
||||
fgSizerTop->Add( m_spinCtrlZoom, 0, 0, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( fgSizer1, 1, wxALL|wxEXPAND, 5 );
|
||||
bSizerMain->Add( fgSizerTop, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizerBottom;
|
||||
bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
|
||||
wxBoxSizer* bSizerViewProjection;
|
||||
bSizerViewProjection = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxStaticBoxSizer* sbSizer1;
|
||||
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("View") ), wxVERTICAL );
|
||||
@ -109,30 +109,203 @@ DIALOG_RENDER_JOB_BASE::DIALOG_RENDER_JOB_BASE( wxWindow* parent, wxWindowID id,
|
||||
|
||||
m_sideLabel = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Side:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_sideLabel->Wrap( -1 );
|
||||
gbSizer1->Add( m_sideLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
gbSizer1->Add( m_sideLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
wxArrayString m_choiceSideChoices;
|
||||
m_choiceSide = new wxChoice( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceSideChoices, 0 );
|
||||
m_choiceSide->SetSelection( 0 );
|
||||
gbSizer1->Add( m_choiceSide, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
||||
gbSizer1->Add( m_choiceSide, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), 0, 5 );
|
||||
|
||||
m_cbFloor = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Show floor"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cbFloor = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Add floor"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer1->Add( m_cbFloor, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), 0, 5 );
|
||||
|
||||
|
||||
sbSizer1->Add( gbSizer1, 1, wxEXPAND, 5 );
|
||||
sbSizer1->Add( gbSizer1, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerBottom->Add( sbSizer1, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerViewProjection->Add( sbSizer1, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxString m_radioProjectionChoices[] = { _("Perspective"), _("Orthogonal") };
|
||||
int m_radioProjectionNChoices = sizeof( m_radioProjectionChoices ) / sizeof( wxString );
|
||||
m_radioProjection = new wxRadioBox( this, wxID_ANY, _("Projection"), wxDefaultPosition, wxDefaultSize, m_radioProjectionNChoices, m_radioProjectionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_radioProjection->SetSelection( 1 );
|
||||
bSizerBottom->Add( m_radioProjection, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerViewProjection->Add( m_radioProjection, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerBottom, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
bSizerMain->Add( bSizerViewProjection, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizerPositioning;
|
||||
sbSizerPositioning = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Positioning") ), wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer2;
|
||||
fgSizer2 = new wxFlexGridSizer( 0, 5, 5, 5 );
|
||||
fgSizer2->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_labelX = new wxStaticText( sbSizerPositioning->GetStaticBox(), wxID_ANY, _("X"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_labelX->Wrap( -1 );
|
||||
fgSizer2->Add( m_labelX, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
m_labelY = new wxStaticText( sbSizerPositioning->GetStaticBox(), wxID_ANY, _("Y"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_labelY->Wrap( -1 );
|
||||
fgSizer2->Add( m_labelY, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
m_labelZ = new wxStaticText( sbSizerPositioning->GetStaticBox(), wxID_ANY, _("Z"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_labelZ->Wrap( -1 );
|
||||
fgSizer2->Add( m_labelZ, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
|
||||
fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_labelxx = new wxStaticText( sbSizerPositioning->GetStaticBox(), wxID_ANY, _("Pivot:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_labelxx->Wrap( -1 );
|
||||
fgSizer2->Add( m_labelxx, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 );
|
||||
|
||||
m_spinCtrlPivotX = new wxSpinCtrlDouble( sbSizerPositioning->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -10000, 10000, 0, 1 );
|
||||
m_spinCtrlPivotX->SetDigits( 3 );
|
||||
fgSizer2->Add( m_spinCtrlPivotX, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlPivotY = new wxSpinCtrlDouble( sbSizerPositioning->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -10000, 10000, 0, 1 );
|
||||
m_spinCtrlPivotY->SetDigits( 3 );
|
||||
fgSizer2->Add( m_spinCtrlPivotY, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlPivotZ = new wxSpinCtrlDouble( sbSizerPositioning->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -10000, 10000, 0, 1 );
|
||||
m_spinCtrlPivotZ->SetDigits( 3 );
|
||||
fgSizer2->Add( m_spinCtrlPivotZ, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_labelMM1 = new wxStaticText( sbSizerPositioning->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_labelMM1->Wrap( -1 );
|
||||
fgSizer2->Add( m_labelMM1, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_labelxx2 = new wxStaticText( sbSizerPositioning->GetStaticBox(), wxID_ANY, _("Pan:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_labelxx2->Wrap( -1 );
|
||||
fgSizer2->Add( m_labelxx2, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 );
|
||||
|
||||
m_spinCtrlPanX = new wxSpinCtrlDouble( sbSizerPositioning->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -10000, 10000, 0, 1 );
|
||||
m_spinCtrlPanX->SetDigits( 3 );
|
||||
fgSizer2->Add( m_spinCtrlPanX, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlPanY = new wxSpinCtrlDouble( sbSizerPositioning->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -10000, 10000, 0, 1 );
|
||||
m_spinCtrlPanY->SetDigits( 3 );
|
||||
fgSizer2->Add( m_spinCtrlPanY, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlPanZ = new wxSpinCtrlDouble( sbSizerPositioning->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -10000, 10000, 0, 1 );
|
||||
m_spinCtrlPanZ->SetDigits( 3 );
|
||||
fgSizer2->Add( m_spinCtrlPanZ, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_labelMM2 = new wxStaticText( sbSizerPositioning->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_labelMM2->Wrap( -1 );
|
||||
fgSizer2->Add( m_labelMM2, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_labelxx21 = new wxStaticText( sbSizerPositioning->GetStaticBox(), wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_labelxx21->Wrap( -1 );
|
||||
fgSizer2->Add( m_labelxx21, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5 );
|
||||
|
||||
m_spinCtrlRotX = new wxSpinCtrlDouble( sbSizerPositioning->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -10000, 10000, 0, 1 );
|
||||
m_spinCtrlRotX->SetDigits( 3 );
|
||||
fgSizer2->Add( m_spinCtrlRotX, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlRotY = new wxSpinCtrlDouble( sbSizerPositioning->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -10000, 10000, 0, 1 );
|
||||
m_spinCtrlRotY->SetDigits( 3 );
|
||||
fgSizer2->Add( m_spinCtrlRotY, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlRotZ = new wxSpinCtrlDouble( sbSizerPositioning->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, -10000, 10000, 0, 1 );
|
||||
m_spinCtrlRotZ->SetDigits( 3 );
|
||||
fgSizer2->Add( m_spinCtrlRotZ, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_labelDeg1 = new wxStaticText( sbSizerPositioning->GetStaticBox(), wxID_ANY, _("°"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_labelDeg1->Wrap( -1 );
|
||||
fgSizer2->Add( m_labelDeg1, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
sbSizerPositioning->Add( fgSizer2, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( sbSizerPositioning, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizerLights;
|
||||
bSizerLights = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxStaticBoxSizer* sbSizerLightsIntensity;
|
||||
sbSizerLightsIntensity = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Lights intensity") ), wxVERTICAL );
|
||||
|
||||
wxGridBagSizer* gbSizer11;
|
||||
gbSizer11 = new wxGridBagSizer( 5, 5 );
|
||||
gbSizer11->SetFlexibleDirection( wxBOTH );
|
||||
gbSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_TopLabel = new wxStaticText( sbSizerLightsIntensity->GetStaticBox(), wxID_ANY, _("Top:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_TopLabel->Wrap( -1 );
|
||||
gbSizer11->Add( m_TopLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
||||
|
||||
m_spinCtrlLightsTop = new wxSpinCtrlDouble( sbSizerLightsIntensity->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1, 0, 0.1 );
|
||||
m_spinCtrlLightsTop->SetDigits( 2 );
|
||||
gbSizer11->Add( m_spinCtrlLightsTop, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
m_bottomLabel = new wxStaticText( sbSizerLightsIntensity->GetStaticBox(), wxID_ANY, _("Bottom:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_bottomLabel->Wrap( -1 );
|
||||
gbSizer11->Add( m_bottomLabel, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrlLightsBottom = new wxSpinCtrlDouble( sbSizerLightsIntensity->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1, 0, 0.1 );
|
||||
m_spinCtrlLightsBottom->SetDigits( 2 );
|
||||
gbSizer11->Add( m_spinCtrlLightsBottom, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
m_sidesLabel = new wxStaticText( sbSizerLightsIntensity->GetStaticBox(), wxID_ANY, _("Side:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_sidesLabel->Wrap( -1 );
|
||||
gbSizer11->Add( m_sidesLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrlLightsSides = new wxSpinCtrlDouble( sbSizerLightsIntensity->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1, 0.5, 0.1 );
|
||||
m_spinCtrlLightsSides->SetDigits( 2 );
|
||||
gbSizer11->Add( m_spinCtrlLightsSides, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
m_cameraLabel = new wxStaticText( sbSizerLightsIntensity->GetStaticBox(), wxID_ANY, _("Camera:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_cameraLabel->Wrap( -1 );
|
||||
gbSizer11->Add( m_cameraLabel, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
||||
|
||||
m_spinCtrlLightsCamera = new wxSpinCtrlDouble( sbSizerLightsIntensity->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1, 0, 0.1 );
|
||||
m_spinCtrlLightsCamera->SetDigits( 2 );
|
||||
gbSizer11->Add( m_spinCtrlLightsCamera, wxGBPosition( 1, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
gbSizer11->AddGrowableCol( 1 );
|
||||
gbSizer11->AddGrowableCol( 3 );
|
||||
|
||||
sbSizerLightsIntensity->Add( gbSizer11, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerLights->Add( sbSizerLightsIntensity, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizerLightsPosition;
|
||||
sbSizerLightsPosition = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Lights position") ), wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer3;
|
||||
fgSizer3 = new wxFlexGridSizer( 0, 3, 5, 5 );
|
||||
fgSizer3->AddGrowableCol( 1 );
|
||||
fgSizer3->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_labelSideLightsElevation = new wxStaticText( sbSizerLightsPosition->GetStaticBox(), wxID_ANY, _("Side lights elevation:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_labelSideLightsElevation->Wrap( -1 );
|
||||
fgSizer3->Add( m_labelSideLightsElevation, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
||||
|
||||
m_spinCtrlLightsSideElevation = new wxSpinCtrl( sbSizerLightsPosition->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 90, 60 );
|
||||
fgSizer3->Add( m_spinCtrlLightsSideElevation, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
||||
|
||||
m_labelDegrees = new wxStaticText( sbSizerLightsPosition->GetStaticBox(), wxID_ANY, _("°"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_labelDegrees->Wrap( -1 );
|
||||
fgSizer3->Add( m_labelDegrees, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
sbSizerLightsPosition->Add( fgSizer3, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerLights->Add( sbSizerLightsPosition, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerLights, 0, wxEXPAND, 5 );
|
||||
|
||||
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
||||
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@ -30,7 +30,6 @@
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_RENDER_JOB_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -59,6 +58,35 @@ class DIALOG_RENDER_JOB_BASE : public DIALOG_SHIM
|
||||
wxChoice* m_choiceSide;
|
||||
wxCheckBox* m_cbFloor;
|
||||
wxRadioBox* m_radioProjection;
|
||||
wxStaticText* m_labelX;
|
||||
wxStaticText* m_labelY;
|
||||
wxStaticText* m_labelZ;
|
||||
wxStaticText* m_labelxx;
|
||||
wxSpinCtrlDouble* m_spinCtrlPivotX;
|
||||
wxSpinCtrlDouble* m_spinCtrlPivotY;
|
||||
wxSpinCtrlDouble* m_spinCtrlPivotZ;
|
||||
wxStaticText* m_labelMM1;
|
||||
wxStaticText* m_labelxx2;
|
||||
wxSpinCtrlDouble* m_spinCtrlPanX;
|
||||
wxSpinCtrlDouble* m_spinCtrlPanY;
|
||||
wxSpinCtrlDouble* m_spinCtrlPanZ;
|
||||
wxStaticText* m_labelMM2;
|
||||
wxStaticText* m_labelxx21;
|
||||
wxSpinCtrlDouble* m_spinCtrlRotX;
|
||||
wxSpinCtrlDouble* m_spinCtrlRotY;
|
||||
wxSpinCtrlDouble* m_spinCtrlRotZ;
|
||||
wxStaticText* m_labelDeg1;
|
||||
wxStaticText* m_TopLabel;
|
||||
wxSpinCtrlDouble* m_spinCtrlLightsTop;
|
||||
wxStaticText* m_bottomLabel;
|
||||
wxSpinCtrlDouble* m_spinCtrlLightsBottom;
|
||||
wxStaticText* m_sidesLabel;
|
||||
wxSpinCtrlDouble* m_spinCtrlLightsSides;
|
||||
wxStaticText* m_cameraLabel;
|
||||
wxSpinCtrlDouble* m_spinCtrlLightsCamera;
|
||||
wxStaticText* m_labelSideLightsElevation;
|
||||
wxSpinCtrl* m_spinCtrlLightsSideElevation;
|
||||
wxStaticText* m_labelDegrees;
|
||||
wxStdDialogButtonSizer* m_sdbSizer1;
|
||||
wxButton* m_sdbSizer1OK;
|
||||
wxButton* m_sdbSizer1Cancel;
|
||||
|
@ -535,6 +535,38 @@ int PCBNEW_JOBS_HANDLER::JobExportRender( JOB* aJob )
|
||||
cfg->m_Render.raytrace_post_processing = true;
|
||||
}
|
||||
|
||||
cfg->m_Render.raytrace_lightColorTop = COLOR4D(aRenderJob->m_lightTopIntensity.x,
|
||||
aRenderJob->m_lightTopIntensity.y,
|
||||
aRenderJob->m_lightTopIntensity.z, 1.0);
|
||||
|
||||
cfg->m_Render.raytrace_lightColorBottom = COLOR4D(aRenderJob->m_lightBottomIntensity.x,
|
||||
aRenderJob->m_lightBottomIntensity.y,
|
||||
aRenderJob->m_lightBottomIntensity.z, 1.0);
|
||||
|
||||
cfg->m_Render.raytrace_lightColorCamera = COLOR4D( aRenderJob->m_lightCameraIntensity.x,
|
||||
aRenderJob->m_lightCameraIntensity.y,
|
||||
aRenderJob->m_lightCameraIntensity.z, 1.0 );
|
||||
|
||||
COLOR4D lightColor( aRenderJob->m_lightSideIntensity.x,
|
||||
aRenderJob->m_lightSideIntensity.y,
|
||||
aRenderJob->m_lightSideIntensity.z, 1.0 );
|
||||
|
||||
cfg->m_Render.raytrace_lightColor = {
|
||||
lightColor, lightColor, lightColor, lightColor,
|
||||
lightColor, lightColor, lightColor, lightColor,
|
||||
};
|
||||
|
||||
int sideElevation = aRenderJob->m_lightSideElevation;
|
||||
|
||||
cfg->m_Render.raytrace_lightElevation = {
|
||||
sideElevation, sideElevation, sideElevation, sideElevation,
|
||||
-sideElevation, -sideElevation, -sideElevation, -sideElevation,
|
||||
};
|
||||
|
||||
cfg->m_Render.raytrace_lightAzimuth = {
|
||||
45, 135, 225, 315, 45, 135, 225, 315,
|
||||
};
|
||||
|
||||
cfg->m_CurrentPreset = aRenderJob->m_colorPreset;
|
||||
boardAdapter.m_Cfg = cfg;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user