Removed some trailing white space. Fixed FindGLM.
This commit is contained in:
parent
41025154a6
commit
4e12999fa8
|
@ -274,14 +274,14 @@ void C3D_MODEL_VIEWER::OnPaint( wxPaintEvent &event )
|
||||||
|
|
||||||
double modelunit_to_3d_units_factor = m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB;
|
double modelunit_to_3d_units_factor = m_BiuTo3Dunits * UNITS3D_TO_UNITSPCB;
|
||||||
|
|
||||||
const SFVEC3F model_center = m_ogl_3dmodel->GetBBox().GetCenter();
|
|
||||||
glTranslatef( model_center.x, model_center.y, model_center.z );
|
|
||||||
|
|
||||||
glScaled( modelunit_to_3d_units_factor, modelunit_to_3d_units_factor, modelunit_to_3d_units_factor);
|
glScaled( modelunit_to_3d_units_factor, modelunit_to_3d_units_factor, modelunit_to_3d_units_factor);
|
||||||
|
|
||||||
|
//const SFVEC3F model_center = m_ogl_3dmodel->GetBBox().GetCenter();
|
||||||
|
//glTranslatef( -model_center.x, -model_center.y, -model_center.z );
|
||||||
|
|
||||||
m_ogl_3dmodel->Draw_opaque();
|
m_ogl_3dmodel->Draw_opaque();
|
||||||
//m_ogl_3dmodel->Draw_transparent();
|
//m_ogl_3dmodel->Draw_transparent();
|
||||||
//m_ogl_3dmodel->Draw_bboxes();
|
m_ogl_3dmodel->Draw_bboxes();
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "common_ogl/openGL_includes.h"
|
#include "common_ogl/openGL_includes.h"
|
||||||
#include "3d_rendering/3d_render_raytracing/shapes3D/cbbox.h"
|
#include "3d_rendering/3d_render_raytracing/shapes3D/cbbox.h"
|
||||||
|
|
||||||
///
|
///
|
||||||
class GLM_ALIGN(CLASS_ALIGNMENT) C_OGL_3DMODEL
|
class GLM_ALIGN(CLASS_ALIGNMENT) C_OGL_3DMODEL
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "ray.h"
|
#include "ray.h"
|
||||||
#include "hitinfo.h"
|
#include "hitinfo.h"
|
||||||
|
|
||||||
///
|
///
|
||||||
class GLM_ALIGN(CLASS_ALIGNMENT) CMATERIAL
|
class GLM_ALIGN(CLASS_ALIGNMENT) CMATERIAL
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -63,7 +63,7 @@ public:
|
||||||
virtual bool isTransparent(Vec3f point){return ((transparentColor.x()>0)||(transparentColor.y()>0)||(transparentColor.z()>0));}
|
virtual bool isTransparent(Vec3f point){return ((transparentColor.x()>0)||(transparentColor.y()>0)||(transparentColor.z()>0));}
|
||||||
*/
|
*/
|
||||||
protected:
|
protected:
|
||||||
SFVEC3F m_ambientColor;
|
SFVEC3F m_ambientColor;
|
||||||
// NOTE: we will not use diffuse color material here,
|
// NOTE: we will not use diffuse color material here,
|
||||||
// because it will be stored in object, since there are objects (i.e: triangles)
|
// because it will be stored in object, since there are objects (i.e: triangles)
|
||||||
// that can have per vertex color
|
// that can have per vertex color
|
||||||
|
|
|
@ -92,11 +92,11 @@ bool CIMAGE::wrapCoords( int *aXo, int *aYo ) const
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (x < 0) || (x >= (int)m_width) ||
|
if( (x < 0) || (x >= (int)m_width) ||
|
||||||
(y < 0) || (y >= (int)m_height) )
|
(y < 0) || (y >= (int)m_height) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
*aXo = x;
|
*aXo = x;
|
||||||
*aYo = y;
|
*aYo = y;
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ void CIMAGE::CopyFull( const CIMAGE *aImgA, const CIMAGE *aImgB, E_IMAGE_OP aOpe
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( (aImgA == NULL) || (aImgB == NULL) )
|
if ( (aImgA == NULL) || (aImgB == NULL) )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(aOperation)
|
switch(aOperation)
|
||||||
|
@ -281,7 +281,7 @@ void CIMAGE::CopyFull( const CIMAGE *aImgA, const CIMAGE *aImgB, E_IMAGE_OP aOpe
|
||||||
m_pixels[it] = aImgA->m_pixels[it] ^ aImgB->m_pixels[it];
|
m_pixels[it] = aImgA->m_pixels[it] ^ aImgB->m_pixels[it];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COPY_BLEND50:
|
case COPY_BLEND50:
|
||||||
for( unsigned int it = 0;it < m_wxh; it++ )
|
for( unsigned int it = 0;it < m_wxh; it++ )
|
||||||
{
|
{
|
||||||
|
@ -332,7 +332,7 @@ static const S_FILTER FILTERS[] = {
|
||||||
7,
|
7,
|
||||||
255
|
255
|
||||||
},
|
},
|
||||||
|
|
||||||
// Blur
|
// Blur
|
||||||
{
|
{
|
||||||
{ { 3, 5, 7, 5, 3},
|
{ { 3, 5, 7, 5, 3},
|
||||||
|
@ -457,7 +457,7 @@ void CIMAGE::EfxFilter( CIMAGE *aInImg, E_FILTER aFilterType )
|
||||||
#ifdef USE_OPENMP
|
#ifdef USE_OPENMP
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for
|
||||||
#endif /* USE_OPENMP */
|
#endif /* USE_OPENMP */
|
||||||
|
|
||||||
for( int iy = 0; iy < (int)m_height; iy++)
|
for( int iy = 0; iy < (int)m_height; iy++)
|
||||||
{
|
{
|
||||||
for( int ix = 0; ix < (int)m_width; ix++ )
|
for( int ix = 0; ix < (int)m_width; ix++ )
|
||||||
|
@ -473,7 +473,7 @@ void CIMAGE::EfxFilter( CIMAGE *aInImg, E_FILTER aFilterType )
|
||||||
v += pixelv * factor;
|
v += pixelv * factor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
v /= filter.div;
|
v /= filter.div;
|
||||||
|
|
||||||
v += filter.offset;
|
v += filter.offset;
|
||||||
|
@ -500,7 +500,7 @@ void CIMAGE::SetPixelsFromNormalizedFloat( const float * aNormalizedFloatArray )
|
||||||
void CIMAGE::SaveAsPNG( wxString aFileName ) const
|
void CIMAGE::SaveAsPNG( wxString aFileName ) const
|
||||||
{
|
{
|
||||||
unsigned char* pixelbuffer = (unsigned char*) malloc( m_wxh * 3 );
|
unsigned char* pixelbuffer = (unsigned char*) malloc( m_wxh * 3 );
|
||||||
|
|
||||||
wxImage image( m_width, m_height );
|
wxImage image( m_width, m_height );
|
||||||
|
|
||||||
for( unsigned int i = 0; i < m_wxh; i++)
|
for( unsigned int i = 0; i < m_wxh; i++)
|
||||||
|
|
|
@ -108,7 +108,7 @@ public:
|
||||||
* @param aValue value to set the pixel
|
* @param aValue value to set the pixel
|
||||||
*/
|
*/
|
||||||
void Setpixel( int aX, int aY, unsigned char aValue );
|
void Setpixel( int aX, int aY, unsigned char aValue );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function Getpixel
|
* Function Getpixel
|
||||||
* get the pixel value from pixel position, position is clamped in accord with the
|
* get the pixel value from pixel position, position is clamped in accord with the
|
||||||
|
|
|
@ -80,11 +80,11 @@ bool CIMAGE::wrapCoords( int *aXo, int *aYo ) const
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (x < 0) || (x >= (int)m_width) ||
|
if( (x < 0) || (x >= (int)m_width) ||
|
||||||
(y < 0) || (y >= (int)m_height) )
|
(y < 0) || (y >= (int)m_height) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
*aXo = x;
|
*aXo = x;
|
||||||
*aYo = y;
|
*aYo = y;
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ void CIMAGE::CopyFull( const CIMAGE *aImgA, const CIMAGE *aImgB, E_IMAGE_OP aOpe
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( (aImgA == NULL) || (aImgB == NULL) )
|
if ( (aImgA == NULL) || (aImgB == NULL) )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(aOperation)
|
switch(aOperation)
|
||||||
|
@ -202,7 +202,7 @@ void CIMAGE::CopyFull( const CIMAGE *aImgA, const CIMAGE *aImgB, E_IMAGE_OP aOpe
|
||||||
m_pixels[it] = aImgA->m_pixels[it] ^ aImgB->m_pixels[it];
|
m_pixels[it] = aImgA->m_pixels[it] ^ aImgB->m_pixels[it];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COPY_BLEND50:
|
case COPY_BLEND50:
|
||||||
for( unsigned int it = 0;it < m_wxh; it++ )
|
for( unsigned int it = 0;it < m_wxh; it++ )
|
||||||
{
|
{
|
||||||
|
@ -253,7 +253,7 @@ static const S_FILTER FILTERS[] = {
|
||||||
7,
|
7,
|
||||||
255
|
255
|
||||||
},
|
},
|
||||||
|
|
||||||
// Blur
|
// Blur
|
||||||
{
|
{
|
||||||
{ { 3, 5, 7, 5, 3},
|
{ { 3, 5, 7, 5, 3},
|
||||||
|
@ -378,7 +378,7 @@ void CIMAGE::EfxFilter( CIMAGE *aInImg, E_FILTER aFilterType )
|
||||||
#ifdef USE_OPENMP
|
#ifdef USE_OPENMP
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for
|
||||||
#endif /* USE_OPENMP */
|
#endif /* USE_OPENMP */
|
||||||
|
|
||||||
for( int iy = 0; iy < (int)m_height; iy++)
|
for( int iy = 0; iy < (int)m_height; iy++)
|
||||||
{
|
{
|
||||||
for( int ix = 0; ix < (int)m_width; ix++ )
|
for( int ix = 0; ix < (int)m_width; ix++ )
|
||||||
|
@ -394,7 +394,7 @@ void CIMAGE::EfxFilter( CIMAGE *aInImg, E_FILTER aFilterType )
|
||||||
v += pixelv * factor;
|
v += pixelv * factor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
v /= filter.div;
|
v /= filter.div;
|
||||||
|
|
||||||
v += filter.offset;
|
v += filter.offset;
|
||||||
|
@ -421,7 +421,7 @@ void CIMAGE::SetPixelsFromNormalizedFloat( const float * aNormalizedFloatArray )
|
||||||
void CIMAGE::SaveAsPNG( wxString aFileName ) const
|
void CIMAGE::SaveAsPNG( wxString aFileName ) const
|
||||||
{
|
{
|
||||||
unsigned char* pixelbuffer = (unsigned char*) malloc( m_wxh * 3 );
|
unsigned char* pixelbuffer = (unsigned char*) malloc( m_wxh * 3 );
|
||||||
|
|
||||||
wxImage image( m_width, m_height );
|
wxImage image( m_width, m_height );
|
||||||
|
|
||||||
for( unsigned int i = 0; i < m_wxh; i++)
|
for( unsigned int i = 0; i < m_wxh; i++)
|
||||||
|
|
|
@ -99,7 +99,7 @@ public:
|
||||||
* @param aValue value to set the pixel
|
* @param aValue value to set the pixel
|
||||||
*/
|
*/
|
||||||
void Setpixel( int aX, int aY, unsigned char aValue );
|
void Setpixel( int aX, int aY, unsigned char aValue );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function Getpixel
|
* Function Getpixel
|
||||||
* get the pixel value from pixel position, position is clamped in accord with the
|
* get the pixel value from pixel position, position is clamped in accord with the
|
||||||
|
|
|
@ -8,15 +8,16 @@ if( ${CMAKE_MAJOR_VERSION} STREQUAL "2" AND ${CMAKE_MINOR_VERSION} STREQUAL "8"
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
find_path( GLM_INCLUDE_DIR glm.hpp PATH_SUFFIXES glm )
|
find_path( GLM_INCLUDE_DIR glm/glm.hpp )
|
||||||
|
|
||||||
|
|
||||||
if( NOT ${GLM_INCLUDE_DIR} STREQUAL "" )
|
if( NOT ${GLM_INCLUDE_DIR} STREQUAL "GLM_INCLUDE_DIR-NOTFOUND" )
|
||||||
|
|
||||||
# attempt to extract the GLM Version information from setup.hpp
|
# attempt to extract the GLM Version information from setup.hpp
|
||||||
find_file( GLM_SETUP setup.hpp PATHS ${GLM_INCLUDE_DIR} PATH_SUFFIXES core detail NO_DEFAULT_PATH )
|
find_file( GLM_SETUP setup.hpp PATHS ${GLM_INCLUDE_DIR} PATH_SUFFIXES glm/core glm/detail NO_DEFAULT_PATH )
|
||||||
|
|
||||||
if( GLM_SETUP )
|
if( NOT ${GLM_SETUP} STREQUAL "GLM_SETUP-NOTFOUND" )
|
||||||
|
|
||||||
# extract the "#define GLM_VERSION*" lines
|
# extract the "#define GLM_VERSION*" lines
|
||||||
file( STRINGS ${GLM_SETUP} _version REGEX "^#define.*GLM_VERSION.*" )
|
file( STRINGS ${GLM_SETUP} _version REGEX "^#define.*GLM_VERSION.*" )
|
||||||
|
|
||||||
|
@ -50,14 +51,16 @@ if( NOT ${GLM_INCLUDE_DIR} STREQUAL "" )
|
||||||
set( GLM_VERSION ${_GLM_VERSION_MAJOR}.${_GLM_VERSION_MINOR}.${_GLM_VERSION_PATCH}.${_GLM_VERSION_REVISION} )
|
set( GLM_VERSION ${_GLM_VERSION_MAJOR}.${_GLM_VERSION_MINOR}.${_GLM_VERSION_PATCH}.${_GLM_VERSION_REVISION} )
|
||||||
unset( GLM_SETUP CACHE )
|
unset( GLM_SETUP CACHE )
|
||||||
|
|
||||||
endif( GLM_SETUP )
|
endif()
|
||||||
|
|
||||||
endif( NOT ${GLM_INCLUDE_DIR} STREQUAL "" )
|
endif()
|
||||||
|
|
||||||
|
|
||||||
include( FindPackageHandleStandardArgs )
|
include( FindPackageHandleStandardArgs )
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS( GLM
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS( GLM
|
||||||
REQUIRED_VARS GLM_INCLUDE_DIR
|
REQUIRED_VARS
|
||||||
|
GLM_INCLUDE_DIR
|
||||||
|
GLM_VERSION
|
||||||
VERSION_VAR GLM_VERSION )
|
VERSION_VAR GLM_VERSION )
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#define IFSG_API_H
|
#define IFSG_API_H
|
||||||
|
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
#include "plugins/3dapi/sg_types.h"
|
#include "plugins/3dapi/sg_types.h"
|
||||||
#include "plugins/3dapi/sg_base.h"
|
#include "plugins/3dapi/sg_base.h"
|
||||||
|
|
|
@ -31,15 +31,15 @@
|
||||||
#define XV3D_TYPES_H
|
#define XV3D_TYPES_H
|
||||||
|
|
||||||
#define GLM_FORCE_RADIANS
|
#define GLM_FORCE_RADIANS
|
||||||
#include <glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
#include <gtc/matrix_transform.hpp>
|
#include <glm/gtc/matrix_transform.hpp>
|
||||||
#include <gtc/type_ptr.hpp>
|
#include <glm/gtc/type_ptr.hpp>
|
||||||
#include <gtx/matrix_major_storage.hpp>
|
#include <glm/gtx/matrix_major_storage.hpp>
|
||||||
#include <gtx/matrix_decompose.hpp>
|
#include <glm/gtx/matrix_decompose.hpp>
|
||||||
#include <gtx/quaternion.hpp>
|
#include <glm/gtx/quaternion.hpp>
|
||||||
#include <gtx/fast_square_root.hpp>
|
#include <glm/gtx/fast_square_root.hpp>
|
||||||
#include <gtx/rotate_vector.hpp>
|
#include <glm/gtx/rotate_vector.hpp>
|
||||||
//#include <gtx/simd_vec4.hpp>
|
//#include <glm/gtx/simd_vec4.hpp>
|
||||||
|
|
||||||
typedef glm::uvec2 SFVEC2UI;
|
typedef glm::uvec2 SFVEC2UI;
|
||||||
typedef glm::ivec2 SFVEC2I;
|
typedef glm::ivec2 SFVEC2I;
|
||||||
|
|
Loading…
Reference in New Issue