repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/qipython/api.hpp | #pragma once
/*
** Copyright (C) 2013 <NAME>
** See COPYING for the license
*/
#ifndef _QIPYTHON_API_HPP_
#define _QIPYTHON_API_HPP_
#include <qi/macro.hpp>
#define QIPYTHON_API QI_LIB_API(qipython)
#endif // _QIPYTHON_PYEXPORT_HPP_
|
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/bn/usb/usb.hpp | /* -*- Mode: C++; -*- */
/**
* @author <NAME>
* Aldebaran Robotics (c) 2008 All Rights Reserved - This file is confidential.
*
* Version : $Id$
*/
#ifndef USB_HPP_
# define USB_HPP_
# include <usb.h>
# include <bn/common.hpp>
# include <bn/usb/chestboardmessage.hpp>
namespace bn {
namespace usb {
/*
... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/bn/usb/chestboardmanager.hpp | /*
** chestboardmanager.hpp
** Login : <<EMAIL>>
** Started on Thu Jan 22 16:06:42 2009 <NAME>
** $Id$
**
** Author(s):
** - <NAME> <<EMAIL>>
**
** Copyright (C) 2009 Aldebaran Robotics
*/
#ifndef CHESTBOARDMANAGER_HPP_
# define CHESTBOARDMANAGER_HPP_
/**
* each protocol need a version:
* - chestboard
*... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/bn/common/singleton.hpp | /* -*- Mode: C++; -*- */
/**
* @author aldebaran-robotics
* Aldebaran Robotics (c) 2007 All Rights Reserved - This file is confidential.\n
*
*/
#ifndef SINGLETON_HPP
#define SINGLETON_HPP
#include <bn/common/ptr.hpp>
namespace bn
{
/*
* singleton class
* to use:
* Singleton<Myclass> o;
* o->myfunct... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/qipython/pytranslator.hpp | <gh_stars>1-10
#pragma once
/*
** Copyright (C) 2014 <NAME>
** See COPYING for the license
*/
#ifndef _PYTHON_SRC_PYTRANSLATOR_HPP_
#define _PYTHON_SRC_PYTRANSLATOR_HPP_
#include <qi/translator.hpp>
namespace qi {
namespace py {
class PyTranslator: public qi::Translator {
public:
PyTranslator(c... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/examples/dummysim/dummysim.cpp | <reponame>fernandozuher/naoqi_webots<gh_stars>1-10
#include <math.h>
#include <iostream>
#include <limits>
#include <stdlib.h>
#include <signal.h>
#include <stdexcept>
#include <qi/application.hpp>
#include <qi/path.hpp>
#include <qi/os.hpp>
#include <alnaosim/alnaosim.h>
#include <alrobotmodel/alrobotmodel.h>
#include... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/qipython/pyproperty.hpp | #pragma once
/*
** Copyright (C) 2013 <NAME>
** See COPYING for the license
*/
#ifndef _QIPYTHON_PYPROPERTY_HPP_
#define _QIPYTHON_PYPROPERTY_HPP_
#include <boost/python.hpp>
#include <qitype/metaproperty.hpp>
#include <qitype/anyobject.hpp>
#include <qipython/api.hpp>
namespace qi {
class PropertyBase;
namesp... |
fernandozuher/naoqi_webots | controllers/naoqi_webots/nao/Nao.cpp | #include "Nao.hpp"
Nao::Nao(bool use_cameras, webots::Robot *robot, int time_step) :
use_cameras {use_cameras}, robot {robot}, time_step {time_step},
model {Singletons::model()}
{
std::cout << "\n\n\t\t--------------------" << __FILE__ << "--------------------"
<< "\n\t\t" << "5.1 - Inside co... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/bn/ipc.hpp | /*
** ipc.hpp
** Login : <<EMAIL>>
** Started on Wed Mar 25 01:04:11 2009 <NAME>
** $Id$
**
** Author(s):
** - <NAME> <<EMAIL>>
**
** Copyright (C) 2009 Aldebaran Robotics
*/
#ifndef IPC_HPP_
# define IPC_HPP_
# include <bn/common.hpp>
# include <bn/ipc/shmtypes.hpp>
# include <bn/ipc/shmfactory.hpp>
# inclu... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/bn/ipc/processsyncserver.hpp | <gh_stars>1-10
/*
** Author(s):
** - <NAME> <<EMAIL>>
**
** Copyright (C) 2010 Aldebaran Robotics
*/
#ifndef PROCESSSYNCSERVER_HPP_
# define PROCESSSYNCSERVER_HPP_
# include <bn/ipc/processsync.hpp>
namespace bn {
/**
* Sync a client and a server, the server allow the client to run
* a timeout can be... |
fernandozuher/naoqi_webots | controllers/naoqi_webots/nao/01_sensors/Inertial_Unit.cpp | #include "Inertial_Unit.hpp"
Inertial_Unit::Inertial_Unit(const Sim::InertialSensor *sensor, int step) :
Device("Inertial_Unit"),
m_inertial_unit {wb_robot_get_device("inertial unit")},
m_accelerometer {wb_robot_get_device("accelerometer")},
m_gyroscope {wb_robot_get_device("gyro")},
m_sensor {sens... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/bn/usb/chestboardfactory.hpp | /*
** chestboardfactory.hpp
** Login : <<EMAIL>>
** Started on Thu Apr 2 17:21:24 2009 <NAME>
** $Id$
**
** Author(s):
** - <NAME> <<EMAIL>>
**
** Copyright (C) 2009 Aldebaran Robotics
*/
#ifndef CHESTBOARDFACTORY_HPP_
# define CHESTBOARDFACTORY_HPP_
# include <bn/common.hpp>
# include <bn/usb/usb.hpp>
name... |
fernandozuher/naoqi_webots | controllers/naoqi_webots/nao/01_sensors/Bumper.hpp | // Description: Foot bumper
#ifndef BUMPER_HPP
#define BUMPER_HPP
#include "../../common_library.hpp"
// Webots library
#include <webots/touch_sensor.h>
namespace Sim {
class BumperSensor;
}
class Bumper : public Device
{
private:
WbDeviceTag m_tag;
const Sim::BumperSensor *m_sensor;
p... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/bn/common/log.hpp | /* -*- Mode: C++; -*- */
/*
** Login : <<EMAIL>>
** Started on Tue Sep 30 11:26:47 2008 <NAME>
**
** Author(s):
** - <NAME> <<EMAIL>>
**
** Copyright (C) 2008 Aldebaran Robotics
*/
#ifndef LOG_H_
# define LOG_H_
//# include <bn/common.hpp>
# include <bn/common/types.hpp>
# include <map>
# include <string>
# ... |
fernandozuher/naoqi_webots | controllers/naoqi_webots/nao/03_others/Singletons.hpp | #ifndef SINGLETONS_HPP
#define SINGLETONS_HPP
// Description: static environment for alsim
// the Model contains a description of the robot model
// the HALInterface is used to communicate with the sensors and
// actuators
// C... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/bn/rt/rtthread.hpp | /* -*- C++ -*- */
/**
* @author <NAME>
* Aldebaran Robotics (c) 2008 All Rights Reserved - This file is confidential.
*
* Version : $Id$
*/
#ifndef __RTTHREAD_HPP_
# define __RTTHREAD_HPP_
# include <pthread.h>
# include <time.h>
# include <bn/rt.hpp>
namespace bn {
namespace rt {
class RtThread : publi... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/qipython/error.hpp | #pragma once
/*
** Copyright (C) 2013 <NAME>
** See COPYING for the license
*/
#ifndef _QIPYTHON_ERROR_HPP_
#define _QIPYTHON_ERROR_HPP_
#include <qipython/api.hpp>
#include <qi/log.hpp>
#include <boost/python.hpp>
//this allow displaying error raised in the python world
#define PY_CATCH_ERROR(DO) ... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/bn/i2c/earsdevicev3_2.hpp | <filename>old_aldebaran_cplusplus_sdk/include/bn/i2c/earsdevicev3_2.hpp
/*
** Author(s):
** - <NAME> <<EMAIL>>
**
** Copyright (C) 2008, 2010 Aldebaran Robotics
*/
#ifndef _EARSI2CV32_HPP_
# define _EARSI2CV32_HPP_
# include <bn/common.hpp>
# include <bn/i2c/devicei2c.hpp>
# include <bn/i2c/earsdevice.hpp>
n... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/bn/common/singleton.hxx | <filename>old_aldebaran_cplusplus_sdk/include/bn/common/singleton.hxx
/*
** singleton.hxx
** Login : <<EMAIL>>
** Started on Thu Apr 2 11:36:30 2009 <NAME>
** $Id$
**
** Author(s):
** - <NAME> <<EMAIL>>
**
** Copyright (C) 2009 Aldebaran Robotics
*/
#ifdef INCLUDE_HXX_TEMPLATE
# ifndef SINGLETON_HXX_
# define ... |
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/bn/spy.hpp | /*
** spy.hpp
** Login : <<EMAIL>>
** Started on Fri Mar 20 18:23:38 2009 <NAME>
** $Id$
**
** Author(s):
** - <NAME> <<EMAIL>>
**
** Copyright (C) 2009 Aldebaran Robotics
*/
#ifndef SPY_HPP_
# define SPY_HPP_
# include <bn/spy/spyusb.hpp>
# include <bn/spy/spyi2c.hpp>
#endif /* !SPY_PP_ */
|
fernandozuher/naoqi_webots | old_aldebaran_cplusplus_sdk/include/bn/common/msgexception.hpp | /* -*- Mode: C++; -*- */
/*
** Login : <<EMAIL>>
** Started on Tue Nov 18 15:04:21 2008 <NAME>
**
** Author(s):
** - <NAME> <<EMAIL>>
**
** Copyright (C) 2008 Aldebaran Robotics
*/
#ifndef MSGEXCEPTION_H_
# define MSGEXCEPTION_H_
# include <bn/common.hpp>
# include <exception>
namespace bn
{
/*
* simpl... |
fernandozuher/naoqi_webots | controllers/naoqi_webots/nao/03_others/util.cpp | /*
This file is part of naoqisim.
naoqisim is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
naoqisim is distributed ... |
fernandozuher/naoqi_webots | controllers/naoqi_webots/nao/02_actuators/Hip_Motor.hpp | // Description: Class for handling the special case of the hip HipYawPitch
// motors of the Nao robot. The LHipYawPitch and RHipYawPitch are in fact a
// single motor in the real Nao, but they are represented as two distinct
// Motors (motors) in the Webots models.
#ifndef HIP_MOTOR_HPP
#define HIP_MOTOR_HPP
#include... |
Wiz-IO/framework-wizio-gsm | arduino/libraries/m66/Ethernet/gprsUdp.cpp | ////////////////////////////////////////////////////////////////////////////////////////
//
// 2021 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://ww... |
Wiz-IO/framework-wizio-gsm | arduino/cores/m66/RilCLass.cpp | <gh_stars>1-10
////////////////////////////////////////////////////////////////////////////////////////
//
// 2021 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
/... |
Wiz-IO/framework-wizio-gsm | arduino/libraries/m66/EEPROM/EEPROM.cpp | ////////////////////////////////////////////////////////////////////////////////////////
//
// 2021 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://ww... |
Wiz-IO/framework-wizio-gsm | arduino/libraries/m66/SPI/SPI.cpp | <filename>arduino/libraries/m66/SPI/SPI.cpp
////////////////////////////////////////////////////////////////////////////////////////
//
// 2021 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a ... |
Wiz-IO/framework-wizio-gsm | arduino/cores/m66/arduino_main.cpp | ////////////////////////////////////////////////////////////////////////////////////////
//
// 2021 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://ww... |
Wiz-IO/framework-wizio-gsm | arduino/libraries/m66/Wire/Wire.cpp | <gh_stars>1-10
////////////////////////////////////////////////////////////////////////////////////////
//
// 2021 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
/... |
Wiz-IO/framework-wizio-gsm | arduino/libraries/m66/Bluetooth/BTD.cpp | /* Copyright (C) 2012 <NAME>, TKJ Electronics. All rights reserved.
This software may be distributed and modified under the terms of the GNU
General Public License version 2 (GPL2) as published by the Free Software
Foundation and appearing in the file GPL2.TXT included in the packaging of
this file. Please note th... |
Wiz-IO/framework-wizio-gsm | arduino/cores/m66/HardwareSerial.cpp | ////////////////////////////////////////////////////////////////////////////////////////
//
// 2021 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://ww... |
Wiz-IO/framework-wizio-gsm | arduino/cores/m66/GPRS.cpp | <filename>arduino/cores/m66/GPRS.cpp<gh_stars>1-10
////////////////////////////////////////////////////////////////////////////////////////
//
// 2021 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may ob... |
Wiz-IO/framework-wizio-gsm | arduino/cores/m66/cpp_helpers.cpp | ////////////////////////////////////////////////////////////////////////////////////////
//
// 2021 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://ww... |
SDurand7/AVLIT-Engine | Core/Renderer/OpenGL/include/OGLTexture.hpp | <filename>Core/Renderer/OpenGL/include/OGLTexture.hpp
#pragma once
#include "glad.h"
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
namespace AVLIT {
enum class TextureInternalFormat {
R = GL_RED,
R16F = GL_R16F,
R32F = GL_R32F,
RG = GL_RG,
RG16F = GL_RG16F,
... |
SDurand7/AVLIT-Engine | Core/Base/src/SceneBVHNode.cpp | #include "SceneBVHNode.hpp"
namespace AVLIT {
SceneBVHNode::SceneBVHNode(SceneObject *object) : m_children{}, m_sceneObject{object} {
if(m_sceneObject)
m_aabb = m_sceneObject->aabb();
}
SceneBVHNode::SceneBVHNode(SceneBVHNode &&node)
: m_children{std::move(node.m_children)}, m_parent{node.m_parent},... |
SDurand7/AVLIT-Engine | Core/Base/include/MaterialManager.hpp | <filename>Core/Base/include/MaterialManager.hpp
#pragma once
#include <unordered_map>
#include <string>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
#include <Core/Base/include/Material.hpp>
namespace AVLIT {
class MaterialManager {
public:
MaterialManager() = default;
Ma... |
SDurand7/AVLIT-Engine | Applications/Demo/src/CustomOpenGLWidget.cpp | <filename>Applications/Demo/src/CustomOpenGLWidget.cpp<gh_stars>0
#include "CustomOpenGLWidget.hpp"
#include <Applications/Demo/include/MainWindow.hpp>
#include <QOpenGLContext>
#include <Core/Base/include/Scene.hpp>
CustomOpenGLWidget::CustomOpenGLWidget(QWidget *parent) : QOpenGLWidget{parent} {}
CustomOpenGLWid... |
SDurand7/AVLIT-Engine | Core/Base/include/Engine.hpp | <filename>Core/Base/include/Engine.hpp
#pragma once
#ifdef OPENGL
#include <Core/Renderer/OpenGL/include/glad.h>
#else
#endif
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
namespace AVLIT {
class Engine {
public:
Engine(const Engine &) = delete;
void operator=(const Engine ... |
SDurand7/AVLIT-Engine | Core/Renderer/include/Shader.hpp | <reponame>SDurand7/AVLIT-Engine
#pragma once
#ifdef OPENGL
#include <Core/Renderer/OpenGL/include/OGLShader.hpp>
#else
/// Coming soon
#endif
|
SDurand7/AVLIT-Engine | Core/Base/src/Drawable.cpp | #include "Drawable.hpp"
#include <Core/Base/include/Model.hpp>
#include <Core/Base/include/Mesh.hpp>
namespace AVLIT {
Drawable::Drawable(const std::string &name, const Transform &transform, Model *model)
: SceneObject{name, transform}, m_model{model} {
m_aabb.compute(m_model, m_transform);
}
void Drawable... |
SDurand7/AVLIT-Engine | Core/Renderer/OpenGL/inline/OGLShader.inl | <filename>Core/Renderer/OpenGL/inline/OGLShader.inl
namespace AVLIT {
inline void OGLShader::bind() const { glUseProgram(m_programID); }
template <typename T> inline void OGLShader::setUniform(const std::string &name, T value) {
GLint location;
const auto it = m_uniforms.find(name);
if(it != m_uniforms.c... |
SDurand7/AVLIT-Engine | Core/Base/include/Types.hpp | #pragma once
#include <memory>
#include <Dependencies/glm/glm/glm.hpp>
#include <Dependencies/glm/glm/gtc/type_ptr.hpp>
namespace AVLIT {
using uint = unsigned int;
using ulong = unsigned long;
using ushort = unsigned short;
using uchar = unsigned char;
using Vec2 = glm::vec2;
using Vec3 = glm::vec3;
using Vec4 =... |
SDurand7/AVLIT-Engine | Core/Renderer/OpenGL/inline/OGLTexture.inl | <reponame>SDurand7/AVLIT-Engine<filename>Core/Renderer/OpenGL/inline/OGLTexture.inl
namespace AVLIT {
inline void OGLTexture::bind(GLint textureUnit) const {
glActiveTexture(GL_TEXTURE0 + textureUnit);
glBindTexture(m_textureType, m_textureID);
GL_CHECK_ERROR();
}
template <typename T> void OGLTexture::a... |
SDurand7/AVLIT-Engine | Core/Base/src/Scene.cpp | #include "Scene.hpp"
#include <Core/Base/include/SceneBVHNode.hpp>
#include <algorithm>
namespace AVLIT {
Scene::Scene() : m_graphRoot{std::make_unique<SceneBVHNode>(nullptr)}, m_drawables{}, m_lights{}, m_cameras{} {
Transform trf{1.f};
trf[3] = {0.f, 10.f, 0.f};
m_lights.emplace_back(std::make_unique... |
SDurand7/AVLIT-Engine | Applications/Demo/include/MainWindow.hpp | #pragma once
#include <Applications/Demo/include/CustomOpenGLWidget.hpp>
#include <Applications/Demo/include/EventManager.hpp>
#include <Applications/Demo/include/Application.hpp>
#include <QMainWindow>
#include <QTimer>
#include <QTreeWidgetItem>
#include <memory>
namespace Ui {
class MainWindow;
}
class MainWin... |
SDurand7/AVLIT-Engine | Core/Renderer/OpenGL/include/OGLShader.hpp | <reponame>SDurand7/AVLIT-Engine
#pragma once
#include "glad.h"
#include <string>
#include <vector>
#include <unordered_map>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
namespace AVLIT {
enum class OGLShaderStage {
COMPUTE = GL_COMPUTE_SHADER,
VERTEX = GL_VERTEX_SHADER,
... |
SDurand7/AVLIT-Engine | Core/Base/src/Camera.cpp | <gh_stars>0
#include "Camera.hpp"
#include <Core/Base/include/Model.hpp>
#include <Core/Base/include/Mesh.hpp>
namespace AVLIT {
Camera::Camera(const std::string &name, const Transform &transform, int width, int height, float fovy, float near,
float far)
: SceneObject{name, transform}, m_width{wi... |
SDurand7/AVLIT-Engine | Core/Base/include/AABB.hpp | <filename>Core/Base/include/AABB.hpp
#pragma once
#include <algorithm>
#include <array>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
namespace AVLIT {
using AABBVertices = std::array<Vec3, 8>;
class AABB {
public:
AABB() = default;
explicit AABB(const Vec3 &point);
ex... |
SDurand7/AVLIT-Engine | Core/Base/include/MeshManager.hpp | <filename>Core/Base/include/MeshManager.hpp
#pragma once
#include <unordered_map>
#include <vector>
#include <string>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
#include <Core/Base/include/Mesh.hpp>
namespace AVLIT {
class MeshManager {
// TODO: check if two meshes with the ... |
SDurand7/AVLIT-Engine | Applications/Demo/include/CustomOpenGLWidget.hpp | <reponame>SDurand7/AVLIT-Engine
#pragma once
#include <Core/Base/include/Engine.hpp>
#include <QOpenGLWidget>
class CustomOpenGLWidget : public QOpenGLWidget {
Q_OBJECT
public:
explicit CustomOpenGLWidget(QWidget *parent = nullptr);
~CustomOpenGLWidget();
signals:
void contextCreated();
protected... |
SDurand7/AVLIT-Engine | Applications/Demo/src/EventManager.cpp | <filename>Applications/Demo/src/EventManager.cpp
#include "EventManager.hpp"
EventManager::EventManager() {
std::fill(m_mouseCallbacks, m_mouseCallbacks + MOUSEBINDS, [](QPointF, QPointF) {});
std::fill(m_mouseReleaseCallbacks, m_mouseReleaseCallbacks + MOUSEBINDS, []() {});
}
void EventManager::addKey(Qt::K... |
SDurand7/AVLIT-Engine | Core/Renderer/include/Texture.hpp | <filename>Core/Renderer/include/Texture.hpp
#pragma once
#ifdef OPENGL
#include <Core/Renderer/OpenGL/include/OGLTexture.hpp>
#else
/// Coming soon
#endif
|
SDurand7/AVLIT-Engine | Core/Renderer/OpenGL/include/OGLShaderManager.hpp | #pragma once
#include "glad.h"
#include <string>
#include <vector>
#include <utility>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
#include <Core/Renderer/OpenGL/include/OGLShader.hpp>
namespace AVLIT {
enum class OGLShaderType {
GBUFFER = 0,
DEFERRED_LIGHTING = 1,
SH... |
SDurand7/AVLIT-Engine | Core/Base/src/MaterialManager.cpp | <filename>Core/Base/src/MaterialManager.cpp
#include "MaterialManager.hpp"
namespace AVLIT {
Material *MaterialManager::material(const std::string &name) const {
auto matIt = m_materials.find(name);
if(matIt == m_materials.cend())
return nullptr;
return matIt->second.get();
}
void MaterialManage... |
SDurand7/AVLIT-Engine | Core/Renderer/OpenGL/src/OGLShaderManager.cpp | #include "OGLShaderManager.hpp"
namespace AVLIT {
OGLShaderManager::OGLShaderManager(const OGLShaderSources &sources)
: m_shaders(static_cast<int>(OGLShaderType::COUNT)) {
for(const auto &source : sources) {
m_shaders[static_cast<int>(source.first)] = Shader(source.second);
}
}
} // namespace AV... |
SDurand7/AVLIT-Engine | Core/Base/src/Mesh.cpp | #include "Mesh.hpp"
#include <Core/Base/include/Material.hpp>
namespace AVLIT {
Mesh::Mesh(Material *material, std::vector<uint> &&indices, std::vector<Vec3> &&vertices, std::vector<Vec2> &&texCoords,
std::vector<Vec3> &&normals, std::vector<Vec3> &&tangents, std::vector<Vec3> &&bitangents)
: m_mater... |
SDurand7/AVLIT-Engine | Core/Base/src/AssetManager.cpp | #include "AssetManager.hpp"
#include <vector>
#include <Dependencies/assimp/include/assimp/scene.h>
#include <Dependencies/assimp/include/assimp/cimport.h>
#include <Dependencies/assimp/include/assimp/Importer.hpp>
#include <assimp/postprocess.h>
#define STB_IMAGE_IMPLEMENTATION
#include <Core/Base/include/stb_image... |
SDurand7/AVLIT-Engine | Core/Base/src/Engine.cpp | #include "Engine.hpp"
#include <Core/Base/include/Scene.hpp>
#include <Core/Base/include/AssetManager.hpp>
#include <Core/Base/include/ModelManager.hpp>
#include <Core/Base/include/MeshManager.hpp>
#include <Core/Base/include/MaterialManager.hpp>
#include <Core/Base/include/TextureManager.hpp>
namespace AVLIT {
Eng... |
SDurand7/AVLIT-Engine | Core/Renderer/include/RenderTarget.hpp | <gh_stars>0
#pragma once
#ifdef OPENGL
#include <Core/Renderer/OpenGL/include/OGLFramebuffer.hpp>
#else
/// Coming soon
#endif
|
SDurand7/AVLIT-Engine | Core/Base/include/TextureManager.hpp | #pragma once
#include <unordered_map>
#include <string>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
#include <Core/Renderer/include/Texture.hpp>
namespace AVLIT {
// Handle the creation/destruction of texture loaded in the AssetManager
class TextureManager {
public:
TextureMa... |
SDurand7/AVLIT-Engine | Core/Base/include/SceneObject.hpp | <filename>Core/Base/include/SceneObject.hpp
#pragma once
#include <vector>
#include <string>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
#include <Core/Base/include/AABB.hpp>
namespace AVLIT {
class SceneObject {
public:
SceneObject(const std::string &name, const Transform &t... |
SDurand7/AVLIT-Engine | Core/Base/src/Light.cpp | <filename>Core/Base/src/Light.cpp
#include "Light.hpp"
#include <Core/Base/include/Math.hpp>
#include <Core/Base/include/Model.hpp>
#include <Core/Base/include/Mesh.hpp>
namespace AVLIT {
const float nearZ = 0.85f;
/// Light base class
Light::Light(const std::string &name, const Transform &transform, uint shadowMa... |
SDurand7/AVLIT-Engine | Core/Base/inline/Light.inl | #include <Core/Renderer/include/Shader.hpp>
namespace AVLIT {
inline Mat4 Light::view() const {
Mat4 view;
const Vec3 &translation = m_transform[3];
const Mat3 &rotation = m_transform;
view = transpose(rotation);
view[3][0] = -dot(translation, rotation[0]);
view[3][1] = -dot(translation, ro... |
SDurand7/AVLIT-Engine | Core/Base/include/Drawable.hpp | <reponame>SDurand7/AVLIT-Engine<gh_stars>0
#pragma once
#include <Core/Base/include/SceneObject.hpp>
namespace AVLIT {
class Drawable : public SceneObject {
public:
Drawable(const std::string &name, const Transform &transform, Model *model);
virtual ~Drawable() = default;
AVLIT_API void scale(const Mat... |
SDurand7/AVLIT-Engine | Core/Base/inline/Mesh.inl | <gh_stars>0
namespace AVLIT {
inline const GPUBuffer &Mesh::buffer() const { return m_buffer; }
inline Material *Mesh::material() const { return m_material; }
inline const AABB &Mesh::aabb() const { return m_localAabb; }
inline int Mesh::size() const { return static_cast<int>(m_indices.size()); }
inline const std:... |
SDurand7/AVLIT-Engine | Core/Base/src/Material.cpp | #include "Material.hpp"
namespace AVLIT {
void Material::setAlbedo(Color3 albedo) { m_albedo = albedo; }
void Material::setAlpha(float alpha) { m_alpha = alpha; }
void Material::setNormalMap(const Texture *normalMap) { m_normalMap = normalMap; }
void Material::setAlbedoMap(const Texture *albedoMap) { m_albedoMap ... |
SDurand7/AVLIT-Engine | Core/Renderer/OpenGL/src/OGLShader.cpp | <gh_stars>0
#include "OGLShader.hpp"
#include <fstream>
#include <sstream>
#include <regex>
namespace AVLIT {
OGLShader::OGLShader(const OGLShaderStageFiles &sources) : m_programID{glCreateProgram()} {
for(const auto &shaderFile : sources) {
const GLuint id = parseGLSL(static_cast<GLenum>(shaderFile.fir... |
SDurand7/AVLIT-Engine | Core/Base/src/SceneObject.cpp | #include "SceneObject.hpp"
#include <Core/Base/include/Math.hpp>
namespace AVLIT {
SceneObject::SceneObject(const std::string &name, const Transform &transform)
: m_name{name}, m_transform{transform}, m_aabb{transform[3]}, m_visible{true} {}
void SceneObject::scale(const Mat3 &trf) {
if(m_graphNode)
... |
SDurand7/AVLIT-Engine | Core/Base/src/TextureManager.cpp | #include "TextureManager.hpp"
namespace AVLIT {
const Texture *TextureManager::addTexture(const std::string &name, uchar **data, uint width, uint height,
TextureType textureType, TextureInternalFormat internalFormat,
TextureFormat fo... |
SDurand7/AVLIT-Engine | Core/Base/inline/SceneObject.inl | <filename>Core/Base/inline/SceneObject.inl
#include <Core/Base/include/SceneBVHNode.hpp>
#include <Core/Base/include/Model.hpp>
namespace AVLIT {
inline void SceneObject::rotate(const Mat3 &rotation, Vec3 center) {
_rotate(rotation, center);
if(m_graphNode)
m_graphNode->updateParentsAABBs();
}
inli... |
SDurand7/AVLIT-Engine | Core/Renderer/OpenGL/include/OGLFramebuffer.hpp | <reponame>SDurand7/AVLIT-Engine<gh_stars>0
#pragma once
#include "glad.h"
#include <unordered_map>
#include <memory>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
#include <Core/Renderer/OpenGL/include/OGLShader.hpp>
#include <Core/Renderer/OpenGL/include/OGLTexture.hpp>
namespace ... |
SDurand7/AVLIT-Engine | Core/Base/inline/AABB.inl | namespace AVLIT {
inline const Vec3 &AABB::min() const { return m_min; }
inline const Vec3 &AABB::max() const { return m_max; }
inline AABBVertices AABB::vertices() const {
return {m_min,
m_max,
{m_min.x, m_max.y, m_min.z},
{m_max.x, m_max.y, m_min.z},
{m_max.x, m_... |
SDurand7/AVLIT-Engine | Core/Base/src/Model.cpp | #include "Model.hpp"
#include <algorithm>
#include <Core/Base/include/Mesh.hpp>
#include <Core/Base/include/Material.hpp>
namespace AVLIT {
void Model::addMesh(Mesh *mesh) {
auto material = mesh->material();
auto res = std::find_if(
m_meshesByMaterial.begin(), m_meshesByMaterial.end(),
[&m... |
SDurand7/AVLIT-Engine | Core/Base/include/Mesh.hpp | <gh_stars>0
#pragma once
#include <vector>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
#include <Core/Base/include/Math.hpp>
#include <Core/Base/include/AABB.hpp>
#include <Core/Base/include/Material.hpp>
#include <Core/Renderer/include/GPUBuffer.hpp>
namespace AVLIT {
class Mesh... |
SDurand7/AVLIT-Engine | Applications/Demo/include/EventManager.hpp | #pragma once
#define MOUSEBINDS 4
#include <QKeyEvent>
#include <QMouseEvent>
#include <bitset>
#include <array>
#include <functional>
#include <chrono>
#include <unordered_map>
// TODO: - Handle "released" events callbacks
// - Cleanup
enum class MouseEvent { LEFT_DRAGGED = 0, RIGHT_DRAGGED = 1, LEFT_CLICK... |
SDurand7/AVLIT-Engine | Core/Base/inline/Material.inl | <gh_stars>0
namespace AVLIT {
// TODO: handle the case where we have an alpha map
inline bool Material::isOpaque() const { return m_alpha > 0.99; }
inline bool Material::isTwoSided() const { return m_twoSided; }
inline Color3 Material::albedo() const { return m_albedo; }
inline float Material::alpha() const { retur... |
SDurand7/AVLIT-Engine | Core/Base/include/Model.hpp | <filename>Core/Base/include/Model.hpp
#pragma once
#include <vector>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
#include <Core/Base/include/AABB.hpp>
namespace AVLIT {
class Model {
public:
Model() = default;
void addMesh(Mesh *mesh);
const AABB &aabb() const;
... |
SDurand7/AVLIT-Engine | Core/Base/include/SceneBVHNode.hpp | #pragma once
#include <vector>
#include <string>
#include <Core/Base/include/Types.hpp>
#include <Core/Base/include/AABB.hpp>
namespace AVLIT {
class SceneBVHNode {
public:
SceneBVHNode() = delete;
SceneBVHNode(SceneObject *object);
SceneBVHNode(SceneBVHNode &&node);
AVLIT_API inline const std::... |
SDurand7/AVLIT-Engine | Core/Base/inline/Scene.inl | namespace AVLIT {
inline void Scene::render() { m_renderSystem->render(); }
inline const std::vector<LightUptr> &Scene::lights() const { return m_lights; }
inline const std::vector<CameraUptr> &Scene::cameras() const { return m_cameras; }
inline void Scene::setCurrentCamera(Camera *camera) {
if(!m_renderSystem)... |
SDurand7/AVLIT-Engine | Core/Renderer/OpenGL/include/OGLRenderSystem.hpp | #pragma once
#include "glad.h"
#include <vector>
#include <utility>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
#include <Core/Base/include/Camera.hpp>
#include <Core/Renderer/OpenGL/include/OGLShaderManager.hpp>
#include <Core/Renderer/OpenGL/include/OGLFramebuffer.hpp>
#include <... |
SDurand7/AVLIT-Engine | Core/Base/include/Camera.hpp | #pragma once
#include <Core/Base/include/SceneObject.hpp>
#include <Core/Base/include/Math.hpp>
namespace AVLIT {
class Camera : public SceneObject {
public:
// transform should be a composition of a rotation and a translation, debug models should be scaled on load
AVLIT_API Camera(const std::string &name, ... |
SDurand7/AVLIT-Engine | Core/Base/include/Scene.hpp | #pragma once
#include <vector>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
#include <Core/Base/include/Drawable.hpp>
#include <Core/Base/include/Camera.hpp>
#include <Core/Base/include/Light.hpp>
#include <Core/Renderer/include/RenderSystem.hpp>
namespace AVLIT {
class Scene {
pu... |
SDurand7/AVLIT-Engine | Core/Base/include/ModelManager.hpp | <reponame>SDurand7/AVLIT-Engine
#pragma once
#include <unordered_map>
#include <string>
#include <vector>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
#include <Core/Base/include/Model.hpp>
namespace AVLIT {
class ModelManager {
public:
ModelManager() = default;
const std... |
SDurand7/AVLIT-Engine | Core/Renderer/OpenGL/src/OGLTexture.cpp | #include "OGLTexture.hpp"
namespace AVLIT {
OGLTexture::OGLTexture(TextureInternalFormat internalFormat, TextureFormat format, TextureType textureType,
TextureDataType dataType, bool generateMipmap)
: m_internalFormat{static_cast<GLint>(internalFormat)}, m_format{static_cast<GLenum>(forma... |
SDurand7/AVLIT-Engine | Core/Base/src/ModelManager.cpp | #include "ModelManager.hpp"
namespace AVLIT {
const std::vector<std::string> &ModelManager::names() const { return m_names; }
Model *ModelManager::model(const std::string &name) const {
auto modelIt = m_models.find(name);
if(modelIt == m_models.cend())
return nullptr;
return modelIt->second.get(... |
SDurand7/AVLIT-Engine | Core/Base/inline/Camera.inl | <filename>Core/Base/inline/Camera.inl
namespace AVLIT {
inline Mat4 Camera::view() const {
Mat4 view;
const Vec3 &translation = m_transform[3];
const Mat3 &rotation = m_transform;
view = transpose(rotation);
view[3][0] = -dot(translation, rotation[0]);
view[3][1] = -dot(translation, rotation[... |
SDurand7/AVLIT-Engine | Core/Base/include/Macros.hpp | <reponame>SDurand7/AVLIT-Engine<filename>Core/Base/include/Macros.hpp
#pragma once
#include <iostream>
#define AT "\n --> at " << __FILE__ << " line " << __LINE__ << std::endl
#define AVLIT_LOG(msg) (std::cout << "[LOG]: " << msg << AT)
#define AVLIT_WARN(msg) (std::cout << "[WARN]: " << msg << AT)
#define AVLIT_... |
SDurand7/AVLIT-Engine | Core/Renderer/include/RenderSystem.hpp | #pragma once
#ifdef OPENGL
#include <Core/Renderer/OpenGL/include/OGLRenderSystem.hpp>
#else
/// Coming soon
#endif
|
SDurand7/AVLIT-Engine | Applications/Demo/src/MainWindow.cpp | <reponame>SDurand7/AVLIT-Engine<gh_stars>0
#include "MainWindow.hpp"
#include "ui_MainWindow.h"
#include <QKeyEvent>
#include <QFileDialog>
#include <QDrag>
#include <QMimeData>
#include <QOpenGLContext>
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), m_drawTimer(this) {
Q... |
SDurand7/AVLIT-Engine | Core/Renderer/include/GPUBuffer.hpp | <gh_stars>0
#pragma once
#ifdef OPENGL
#include <Core/Renderer/OpenGL/include/OGLVAO.hpp>
#else
/// Coming soon
#endif
|
SDurand7/AVLIT-Engine | Applications/Demo/src/Application.cpp | #include "Application.hpp"
#include <Core/Base/include/Engine.hpp>
#include <Core/Base/include/Scene.hpp>
#include <Core/Base/include/Math.hpp>
#include <Core/Base/include/Drawable.hpp>
#include <Core/Base/include/Light.hpp>
#include <Core/Base/include/AssetManager.hpp>
#include <Core/Base/include/ModelManager.hpp>
... |
SDurand7/AVLIT-Engine | Core/Renderer/OpenGL/src/OGLRenderSystem.cpp | #include "OGLRenderSystem.hpp"
#include <random>
#include <Core/Base/include/Math.hpp>
#include <Core/Base/include/Drawable.hpp>
#include <Core/Base/include/Light.hpp>
#include <Core/Base/include/Model.hpp>
#include <Core/Base/include/Mesh.hpp>
#include <Core/Base/include/Material.hpp>
#include <Core/Renderer/OpenGL/... |
SDurand7/AVLIT-Engine | Applications/Demo/include/Application.hpp | <filename>Applications/Demo/include/Application.hpp
#pragma once
#include <vector>
#include <string>
#include <Core/Base/include/Types.hpp>
class Application {
public:
Application() = delete;
Application(int width, int height);
void resize(int width, int height);
void translateCameraFront(float d... |
SDurand7/AVLIT-Engine | Applications/Demo/src/Main.cpp | #include <QApplication>
#include "MainWindow.hpp"
int main(int argc, char *argv[]) {
QApplication editor(argc, argv);
MainWindow window;
window.show();
return editor.exec();
} |
SDurand7/AVLIT-Engine | Core/Base/include/Math.hpp | #pragma once
#include <cmath>
#include <Dependencies/glm/glm/gtx/transform.hpp>
#include <Core/Base/include/Types.hpp>
namespace AVLIT {
using glm::cross;
using glm::dot;
using glm::epsilon;
using glm::inverse;
using glm::length;
using glm::lookAt;
using glm::normalize;
using glm::ortho;
using glm::perspective;
us... |
SDurand7/AVLIT-Engine | Core/Renderer/OpenGL/inline/OGLFramebuffer.inl | <filename>Core/Renderer/OpenGL/inline/OGLFramebuffer.inl
namespace AVLIT {
inline void OGLFramebuffer::operator=(OGLFramebuffer &&framebuffer) noexcept {
m_fboID = framebuffer.m_fboID;
framebuffer.m_fboID = 0;
m_rboID = framebuffer.m_rboID;
framebuffer.m_rboID = 0;
m_textures = std::move(framebuffe... |
SDurand7/AVLIT-Engine | Core/Renderer/OpenGL/src/OGLFramebuffer.cpp | #include "OGLFramebuffer.hpp"
#include <random>
#include <cmath>
#include <Core/Base/include/Math.hpp>
#include <Core/Renderer/OpenGL/include/OGLTexture.hpp>
#include "bluenoise.h"
namespace AVLIT {
GLint OGLFramebuffer::m_defaultID = -1;
OGLFramebuffer::OGLFramebuffer(GLuint textureCount) : m_textures(textu... |
SDurand7/AVLIT-Engine | Core/Base/include/AssetManager.hpp | #pragma once
#include <string>
#include <vector>
#include <Core/Base/include/Macros.hpp>
#include <Core/Base/include/Types.hpp>
struct aiScene;
struct aiMesh;
struct aiMaterial;
namespace AVLIT {
class AssetManager {
public:
AssetManager();
AVLIT_API std::string loadAssetFromFile(const std::string &filepa... |
SDurand7/AVLIT-Engine | Core/Base/src/AABB.cpp | #include "AABB.hpp"
#include <Core/Base/include/Model.hpp>
#include <Core/Base/include/Mesh.hpp>
#include <iostream>
namespace AVLIT {
AABB::AABB(const Vec3 &point) : m_min{point}, m_max{point} {}
AABB::AABB(const Vec3 &min, const Vec3 &max) : m_min{min}, m_max{max} {}
void AABB::compute(const Model *model, const ... |
SDurand7/AVLIT-Engine | Core/Base/src/MeshManager.cpp | <filename>Core/Base/src/MeshManager.cpp<gh_stars>0
#include "MeshManager.hpp"
namespace AVLIT {
Mesh *MeshManager::mesh(const std::string &name) const {
auto meshIt = m_meshes.find(name);
if(meshIt == m_meshes.cend())
return nullptr;
return meshIt->second.get();
}
Mesh *MeshManager::addMesh(cons... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.