Initial integration of Mixer, Views and Source classes.

First tests with user interface and Mixing View
This commit is contained in:
brunoherbelin
2020-04-19 00:49:55 +02:00
parent c7a69c1ac8
commit 4f5a71970d
29 changed files with 1211 additions and 630 deletions

View File

@@ -206,6 +206,9 @@ set(VMIX_SRCS
Primitives.cpp Primitives.cpp
Mesh.cpp Mesh.cpp
SessionVisitor.cpp SessionVisitor.cpp
View.cpp
Source.cpp
Mixer.cpp
Settings.cpp Settings.cpp
Screenshot.cpp Screenshot.cpp
Resource.cpp Resource.cpp

View File

@@ -1,22 +1,26 @@
#include "FrameBuffer.h" #include "FrameBuffer.h"
#include "ImageShader.h" #include "ImageShader.h"
#include "Resource.h"
#include "Log.h" #include "Log.h"
#include <glad/glad.h> #include <glad/glad.h>
FrameBuffer::FrameBuffer(uint width, uint height, bool useDepthBuffer) FrameBuffer::FrameBuffer(uint width, uint height, bool useDepthBuffer): textureid_(0), framebufferid_(0), usedepth_(useDepthBuffer)
{ {
attrib_.viewport.x = width; attrib_.viewport.x = width;
attrib_.viewport.y = height; attrib_.viewport.y = height;
attrib_.clear_color = glm::vec3(0.f); attrib_.clear_color = glm::vec3(0.f);
}
void FrameBuffer::init()
{
// create a renderbuffer object to store depth info // create a renderbuffer object to store depth info
GLuint rboId; GLuint rboId;
if (useDepthBuffer){ if (usedepth_){
glGenRenderbuffers(1, &rboId); glGenRenderbuffers(1, &rboId);
glBindRenderbuffer(GL_RENDERBUFFER, rboId); glBindRenderbuffer(GL_RENDERBUFFER, rboId);
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, width, height); glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT, attrib_.viewport.x, attrib_.viewport.y);
glBindRenderbuffer(GL_RENDERBUFFER, 0); glBindRenderbuffer(GL_RENDERBUFFER, 0);
} }
@@ -27,7 +31,7 @@ FrameBuffer::FrameBuffer(uint width, uint height, bool useDepthBuffer)
// generate texture // generate texture
glGenTextures(1, &textureid_); glGenTextures(1, &textureid_);
glBindTexture(GL_TEXTURE_2D, textureid_); glBindTexture(GL_TEXTURE_2D, textureid_);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, attrib_.viewport.x, attrib_.viewport.y, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glBindTexture(GL_TEXTURE_2D, 0); glBindTexture(GL_TEXTURE_2D, 0);
@@ -37,19 +41,26 @@ FrameBuffer::FrameBuffer(uint width, uint height, bool useDepthBuffer)
GL_TEXTURE_2D, textureid_, 0); GL_TEXTURE_2D, textureid_, 0);
// attach the renderbuffer to depth attachment point // attach the renderbuffer to depth attachment point
if (useDepthBuffer){ if (usedepth_){
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
GL_RENDERBUFFER, rboId); GL_RENDERBUFFER, rboId);
} }
checkFramebufferStatus(); checkFramebufferStatus();
FrameBuffer::release();
} }
FrameBuffer::~FrameBuffer() FrameBuffer::~FrameBuffer()
{ {
glDeleteFramebuffers(1, &framebufferid_); if (framebufferid_)
glDeleteFramebuffers(1, &framebufferid_);
}
uint FrameBuffer::texture() const
{
if (framebufferid_ == 0)
return Resource::getTextureBlack();
return textureid_;
} }
float FrameBuffer::aspectRatio() const float FrameBuffer::aspectRatio() const
@@ -59,6 +70,9 @@ float FrameBuffer::aspectRatio() const
void FrameBuffer::bind() void FrameBuffer::bind()
{ {
if (!framebufferid_)
init();
glBindFramebuffer(GL_FRAMEBUFFER, framebufferid_); glBindFramebuffer(GL_FRAMEBUFFER, framebufferid_);
} }
@@ -86,6 +100,9 @@ void FrameBuffer::release()
bool FrameBuffer::blit(FrameBuffer *other) bool FrameBuffer::blit(FrameBuffer *other)
{ {
if (!framebufferid_)
return false;
if (attrib_.viewport.x != other->width() || attrib_.viewport.y != other->height()) if (attrib_.viewport.x != other->width() || attrib_.viewport.y != other->height())
return false; return false;

View File

@@ -23,14 +23,17 @@ public:
inline uint width() const { return attrib_.viewport.x; } inline uint width() const { return attrib_.viewport.x; }
inline uint height() const { return attrib_.viewport.y; } inline uint height() const { return attrib_.viewport.y; }
inline uint texture() const { return textureid_; } uint texture() const;
float aspectRatio() const; float aspectRatio() const;
private: private:
void init();
void checkFramebufferStatus(); void checkFramebufferStatus();
RenderingAttrib attrib_; RenderingAttrib attrib_;
uint textureid_; uint textureid_;
uint framebufferid_; uint framebufferid_;
bool usedepth_;
}; };

View File

@@ -9,6 +9,8 @@
namespace ImGuiToolkit namespace ImGuiToolkit
{ {
// Icons from resource icon.dds // Icons from resource icon.dds
void Icon(int i, int j); void Icon(int i, int j);
bool ButtonIcon(int i, int j); bool ButtonIcon(int i, int j);

View File

@@ -77,7 +77,7 @@ void ImGuiVisitor::visit(Primitive &n)
ImGui::PushID(n.id()); ImGui::PushID(n.id());
ImGui::Text("Primitive"); ImGui::Text("Primitive");
n.getShader()->accept(*this); n.shader()->accept(*this);
ImGui::PopID(); ImGui::PopID();
} }
@@ -89,7 +89,7 @@ void ImGuiVisitor::visit(ImageSurface &n)
void ImGuiVisitor::visit(MediaSurface &n) void ImGuiVisitor::visit(MediaSurface &n)
{ {
ImGui::Text("%s", n.getResource().c_str()); ImGui::Text("%s", n.getUri().c_str());
if (n.getMediaPlayer()) if (n.getMediaPlayer())
n.getMediaPlayer()->accept(*this); n.getMediaPlayer()->accept(*this);
@@ -152,7 +152,7 @@ void ImGuiVisitor::visit(Scene &n)
ImGui::SetNextItemOpen(true, ImGuiCond_Once); ImGui::SetNextItemOpen(true, ImGuiCond_Once);
if (ImGui::CollapsingHeader("Scene Property Tree")) if (ImGui::CollapsingHeader("Scene Property Tree"))
{ {
n.getRoot()->accept(*this); n.root()->accept(*this);
} }
} }

View File

@@ -67,11 +67,6 @@ void MediaPlayer::accept(Visitor& v) {
v.visit(*this); v.visit(*this);
} }
void MediaPlayer::bind()
{
glBindTexture(GL_TEXTURE_2D, texture());
}
guint MediaPlayer::texture() const guint MediaPlayer::texture() const
{ {
if (textureindex_ == 0) if (textureindex_ == 0)

View File

@@ -191,10 +191,9 @@ public:
* */ * */
double updateFrameRate() const; double updateFrameRate() const;
/** /**
* Bind / Get the OpenGL texture * Get the OpenGL texture
* Must be called in OpenGL context * Must be called in OpenGL context
* */ * */
void bind();
guint texture() const; guint texture() const;
/** /**
* Get Image properties * Get Image properties

View File

@@ -321,36 +321,31 @@ bool parsePLY(string ascii,
} }
Mesh::Mesh(const std::string& path, const std::string& texture) : Primitive(), resource_(path), texturefilename_(texture), textureindex_(0) Mesh::Mesh(const std::string& ply_path, const std::string& tex_path) : Primitive(), mesh_resource_(ply_path), texture_resource_(tex_path), textureindex_(0)
{ {
if ( !parsePLY( Resource::getText(resource_), points_, colors_, texCoords_, indices_, drawMode_) ) if ( !parsePLY( Resource::getText(mesh_resource_), points_, colors_, texCoords_, indices_, drawMode_) )
{ {
points_.clear(); points_.clear();
colors_.clear(); colors_.clear();
texCoords_.clear(); texCoords_.clear();
indices_.clear(); indices_.clear();
Log::Warning("Mesh could not be created from %s", path.c_str()); Log::Warning("Mesh could not be created from %s", ply_path.c_str());
} }
// selective creation of the shader (deleted in Primitive)
if (texture_resource_.empty())
shader_ = new Shader;
else
shader_ = new ImageShader;
} }
Mesh::~Mesh()
{
delete shader_;
}
void Mesh::init() void Mesh::init()
{ {
Primitive::init(); Primitive::init();
if (!texturefilename_.empty()) if (!texture_resource_.empty())
{ textureindex_ = Resource::getTextureImage(texture_resource_);
// create shader for textured image
textureindex_ = Resource::getTextureImage(texturefilename_);
shader_ = new ImageShader();
}
else {
shader_ = new Shader();
}
} }
@@ -372,3 +367,43 @@ void Mesh::accept(Visitor& v)
Primitive::accept(v); Primitive::accept(v);
v.visit(*this); v.visit(*this);
} }
Frame::Frame() : Node()
{
icon_ = new Mesh("mesh/icon_video.ply");
border_ = new Mesh("mesh/border.ply");
shadow_ = new Mesh("mesh/shadow.ply", "mesh/shadow.png");
color = glm::vec4( 0.8f, 0.8f, 0.f, 1.f);
}
void Frame::draw(glm::mat4 modelview, glm::mat4 projection)
{
if ( !initialized() ) {
icon_->init();
border_->init();
shadow_->init();
init();
}
// shadow
shadow_->draw( modelview * transform_, projection);
// right side
float ar = scale_.x / scale_.y;
glm::vec3 s(scale_.y, scale_.y, 1.0);
glm::vec3 t(translation_.x - 1.0 +ar, translation_.y, translation_.z);
glm::mat4 ctm = modelview * transform(t, rotation_, s);
border_->shader()->color = color;
border_->draw( ctm, projection );
icon_->shader()->color = color;
icon_->draw( ctm, projection );
// left side
t.x = -t.x;
s.x = -s.x;
ctm = modelview * transform(t, rotation_, s);
border_->draw( ctm, projection );
}

25
Mesh.h
View File

@@ -16,21 +16,34 @@
class Mesh : public Primitive { class Mesh : public Primitive {
public: public:
Mesh(const std::string& path, const std::string& texture = ""); Mesh(const std::string& ply_path, const std::string& tex_path = "");
~Mesh();
void init () override; void init () override;
void draw (glm::mat4 modelview, glm::mat4 projection) override; void draw (glm::mat4 modelview, glm::mat4 projection) override;
void accept (Visitor& v) override; void accept (Visitor& v) override;
inline std::string getResource() const { return resource_; } inline std::string meshPath() const { return mesh_resource_; }
inline std::string getTexture() const { return texturefilename_; } inline std::string texturePath() const { return texture_resource_; }
protected: protected:
std::string resource_; std::string mesh_resource_;
std::string texturefilename_; std::string texture_resource_;
uint textureindex_; uint textureindex_;
}; };
class Frame : public Node
{
Mesh *border_;
Mesh *icon_;
Mesh *shadow_;
public:
Frame();
void draw (glm::mat4 modelview, glm::mat4 projection) override;
glm::vec4 color;
};
#endif // MESH_H #endif // MESH_H

102
Mixer.cpp Normal file
View File

@@ -0,0 +1,102 @@
#include <algorithm>
#include "defines.h"
#include "View.h"
#include "Primitives.h"
#include "Mesh.h"
#include "FrameBuffer.h"
#include "Mixer.h"
Mixer::Mixer()
{
current_view_ = &mixing_;
current_source_ = Source::end();
update_time_ = GST_CLOCK_TIME_NONE;
}
void Mixer::update()
{
// compute dt
if (update_time_ == GST_CLOCK_TIME_NONE)
update_time_ = gst_util_get_timestamp ();
gint64 current_time = gst_util_get_timestamp ();
gint64 dt = current_time - update_time_;
update_time_ = current_time;
// render of all sources
for( SourceList::iterator it = Source::begin(); it != Source::end(); it++){
(*it)->render();
}
// recursive update of all views
mixing_.update( static_cast<float>( GST_TIME_AS_MSECONDS(dt)) * 0.001f );
// TODO other views
}
// draw render view and current view
void Mixer::draw()
{
// always draw render view
render_.draw();
// draw the current view in the window
current_view_->draw();
}
// manangement of sources
void Mixer::createSourceMedia(std::string uri)
{
}
void Mixer::setCurrentSource(std::string namesource)
{
current_source_ = std::find_if(Source::begin(), Source::end(), hasName(namesource)) ;
}
void Mixer::setcurrentSource(Source *s)
{
// current_source_ = Source::
}
Source *Mixer::currentSource()
{
if ( current_source_ == Source::end() )
return nullptr;
else {
return *(current_source_);
}
}
// management of view
void Mixer::setCurrentView(viewMode m)
{
switch (m) {
case MIXING:
current_view_ = &mixing_;
break;
default:
current_view_ = &mixing_;
break;
}
}
View *Mixer::getView(viewMode m)
{
switch (m) {
case RENDERING:
return &render_;
case MIXING:
return &mixing_;
default:
return nullptr;
}
}
View *Mixer::currentView()
{
return current_view_;
}

59
Mixer.h Normal file
View File

@@ -0,0 +1,59 @@
#ifndef MIXER_H
#define MIXER_H
#include <vector>
// GStreamer
#include <gst/gst.h>
#include "View.h"
#include "Source.h"
class Mixer
{
// Private Constructor
Mixer();
Mixer(Rendering const& copy); // Not Implemented
Mixer& operator=(Rendering const& copy); // Not Implemented
public:
static Mixer& manager()
{
// The only instance
static Mixer _instance;
return _instance;
}
// update all sources and all views
void update();
// draw render view and current view
void draw();
// manangement of sources
void createSourceMedia(std::string uri);
void setCurrentSource(std::string namesource);
void setcurrentSource(Source *s);
Source *currentSource();
// management of view
typedef enum {RENDERING = 0, MIXING=1, GEOMETRY=2, LAYER=3, INVALID=4 } viewMode;
View *getView(viewMode m);
void setCurrentView(viewMode m);
View *currentView();
inline FrameBuffer *frame() const { return render_.frameBuffer(); }
protected:
RenderView render_;
MixingView mixing_;
View *current_view_;
gint64 update_time_;
SourceList::iterator current_source_;
};
#endif // MIXER_H

View File

@@ -1,6 +1,7 @@
#include "Primitives.h" #include "Primitives.h"
#include "ImageShader.h" #include "ImageShader.h"
#include "Resource.h" #include "Resource.h"
#include "FrameBuffer.h"
#include "MediaPlayer.h" #include "MediaPlayer.h"
#include "Visitor.h" #include "Visitor.h"
#include "Log.h" #include "Log.h"
@@ -25,7 +26,7 @@ static const std::vector<glm::vec3> square_points {
}; };
ImageSurface::ImageSurface(const std::string& path) : Primitive(), resource_(path), textureindex_(0) Surface::Surface(Shader *s) : Primitive(s)
{ {
// geometry // geometry
points_ = std::vector<glm::vec3> { glm::vec3( -1.f, -1.f, 0.f ), glm::vec3( -1.f, 1.f, 0.f ), points_ = std::vector<glm::vec3> { glm::vec3( -1.f, -1.f, 0.f ), glm::vec3( -1.f, 1.f, 0.f ),
@@ -38,25 +39,9 @@ ImageSurface::ImageSurface(const std::string& path) : Primitive(), resource_(pat
drawMode_ = GL_TRIANGLE_STRIP; drawMode_ = GL_TRIANGLE_STRIP;
} }
ImageSurface::~ImageSurface()
{
if (shader_)
delete shader_;
}
void ImageSurface::init() void Surface::init()
{ {
// load image if specified
if ( resource_.empty())
textureindex_ = Resource::getTextureBlack();
else {
float ar = 1.0;
textureindex_ = Resource::getTextureImage(resource_, &ar);
scale_.x = ar;
}
// a new shader for a new image
shader_ = new ImageShader();
// use static unique vertex array object // use static unique vertex array object
static uint unique_vao_ = 0; static uint unique_vao_ = 0;
static uint unique_drawCount = 0; static uint unique_drawCount = 0;
@@ -77,6 +62,34 @@ void ImageSurface::init()
} }
} }
void Surface::accept(Visitor& v)
{
Primitive::accept(v);
v.visit(*this);
}
ImageSurface::ImageSurface(const std::string& path, Shader *s) : Surface(s), resource_(path), textureindex_(0)
{
}
void ImageSurface::init()
{
Surface::init();
// load image if specified (should always be the case)
if ( resource_.empty())
textureindex_ = Resource::getTextureBlack();
else {
float ar = 1.0;
textureindex_ = Resource::getTextureImage(resource_, &ar);
scale_.x = ar;
}
// a new shader for a new image
shader_ = new ImageShader();
}
void ImageSurface::draw(glm::mat4 modelview, glm::mat4 projection) void ImageSurface::draw(glm::mat4 modelview, glm::mat4 projection)
{ {
if ( !initialized() ) if ( !initialized() )
@@ -95,9 +108,9 @@ void ImageSurface::accept(Visitor& v)
v.visit(*this); v.visit(*this);
} }
MediaSurface::MediaSurface(const std::string& uri) : ImageSurface() MediaSurface::MediaSurface(const std::string& uri, Shader *s) : Surface(s)
{ {
resource_ = uri; uri_ = uri;
mediaplayer_ = new MediaPlayer; mediaplayer_ = new MediaPlayer;
} }
@@ -108,12 +121,9 @@ MediaSurface::~MediaSurface()
void MediaSurface::init() void MediaSurface::init()
{ {
std::string tmp = resource_; Surface::init();
resource_ = "";
ImageSurface::init();
resource_ = tmp;
mediaplayer_->open(resource_); mediaplayer_->open(uri_);
mediaplayer_->play(true); mediaplayer_->play(true);
} }
@@ -123,9 +133,9 @@ void MediaSurface::draw(glm::mat4 modelview, glm::mat4 projection)
init(); init();
if ( mediaplayer_->isOpen() ) if ( mediaplayer_->isOpen() )
mediaplayer_->bind(); glBindTexture(GL_TEXTURE_2D, mediaplayer_->texture());
else else
glBindTexture(GL_TEXTURE_2D, textureindex_); glBindTexture(GL_TEXTURE_2D, Resource::getTextureBlack());
Primitive::draw(modelview, projection); Primitive::draw(modelview, projection);
@@ -136,12 +146,6 @@ void MediaSurface::update( float dt )
{ {
if ( mediaplayer_->isOpen() ) { if ( mediaplayer_->isOpen() ) {
mediaplayer_->update(); mediaplayer_->update();
// if (parent_ != nullptr) {
// parent_->transform_ = parent_->transform_ * glm::scale(glm::identity<glm::mat4>(), glm::vec3(mediaplayer_->aspectRatio(), 1.f, 1.f));
// scale_.x = 1.0;
// }
// else
scale_.x = mediaplayer_->aspectRatio(); scale_.x = mediaplayer_->aspectRatio();
} }
@@ -150,12 +154,47 @@ void MediaSurface::update( float dt )
void MediaSurface::accept(Visitor& v) void MediaSurface::accept(Visitor& v)
{ {
ImageSurface::accept(v); Primitive::accept(v);
v.visit(*this); v.visit(*this);
} }
Points::Points(std::vector<glm::vec3> points, glm::vec4 color, uint pointsize) : Primitive() FrameBufferSurface::FrameBufferSurface(FrameBuffer *fb, Shader *s) : Surface(s), frame_buffer_(fb)
{
}
void FrameBufferSurface::init()
{
Surface::init();
// set aspect ratio
scale_.x = frame_buffer_->aspectRatio();
// a new shader for a new image
shader_ = new ImageShader();
}
void FrameBufferSurface::draw(glm::mat4 modelview, glm::mat4 projection)
{
if ( !initialized() )
init();
glBindTexture(GL_TEXTURE_2D, frame_buffer_->texture());
Primitive::draw(modelview, projection);
glBindTexture(GL_TEXTURE_2D, 0);
}
void FrameBufferSurface::accept(Visitor& v)
{
Primitive::accept(v);
v.visit(*this);
}
Points::Points(std::vector<glm::vec3> points, glm::vec4 color, uint pointsize) : Primitive(new Shader)
{ {
for(size_t i = 0; i < points.size(); ++i) for(size_t i = 0; i < points.size(); ++i)
{ {
@@ -168,17 +207,7 @@ Points::Points(std::vector<glm::vec3> points, glm::vec4 color, uint pointsize) :
pointsize_ = pointsize; pointsize_ = pointsize;
} }
Points::~Points()
{
if (shader_)
delete shader_;
}
void Points::init()
{
Primitive::init();
shader_ = new Shader();
}
void Points::draw(glm::mat4 modelview, glm::mat4 projection) void Points::draw(glm::mat4 modelview, glm::mat4 projection)
{ {
@@ -196,7 +225,7 @@ void Points::accept(Visitor& v)
v.visit(*this); v.visit(*this);
} }
LineStrip::LineStrip(std::vector<glm::vec3> points, glm::vec4 color, uint linewidth) : Primitive(), linewidth_(linewidth) LineStrip::LineStrip(std::vector<glm::vec3> points, glm::vec4 color, uint linewidth) : Primitive(new Shader), linewidth_(linewidth)
{ {
for(size_t i = 0; i < points.size(); ++i) for(size_t i = 0; i < points.size(); ++i)
{ {
@@ -208,18 +237,6 @@ LineStrip::LineStrip(std::vector<glm::vec3> points, glm::vec4 color, uint linewi
drawMode_ = GL_LINE_STRIP; drawMode_ = GL_LINE_STRIP;
} }
LineStrip::~LineStrip()
{
if (shader_)
delete shader_;
}
void LineStrip::init()
{
Primitive::init();
shader_ = new Shader();
}
void LineStrip::draw(glm::mat4 modelview, glm::mat4 projection) void LineStrip::draw(glm::mat4 modelview, glm::mat4 projection)
{ {
if ( !initialized() ) if ( !initialized() )
@@ -243,9 +260,6 @@ LineSquare::LineSquare(glm::vec4 color, uint linewidth) : LineStrip(square_point
void LineSquare::init() void LineSquare::init()
{ {
// a new shader for a new line
shader_ = new Shader();
// use static unique vertex array object // use static unique vertex array object
static uint unique_vao_ = 0; static uint unique_vao_ = 0;
static uint unique_drawCount = 0; static uint unique_drawCount = 0;
@@ -293,9 +307,6 @@ LineCircle::LineCircle(glm::vec4 color, uint linewidth) : LineStrip(std::vector<
void LineCircle::init() void LineCircle::init()
{ {
// a new shader for a new line
shader_ = new Shader();
// use static unique vertex array object // use static unique vertex array object
static uint unique_vao_ = 0; static uint unique_vao_ = 0;
static uint unique_drawCount = 0; static uint unique_drawCount = 0;

View File

@@ -4,21 +4,43 @@
#include <string> #include <string>
#include "Scene.h" #include "Scene.h"
#include "ImageShader.h"
class MediaPlayer; class MediaPlayer;
class FrameBuffer;
/** /**
* @brief The ImageSurface class is a Primitive to draw an image * @brief The Surface class is a Primitive to draw an flat square
* surface with texture coordinates.
*
* It uses a unique vertex array object to draw all surfaces.
* *
* Image is read from the Ressouces (not an external file)
* Height = 1.0, Width is set by the aspect ratio of the image
*/ */
class ImageSurface : public Primitive { class Surface : public Primitive {
void deleteGLBuffers_() override {} void deleteGLBuffers_() override {}
public: public:
ImageSurface(const std::string& path = "" ); Surface(Shader *s = new ImageShader);
~ImageSurface();
void init () override;
void accept (Visitor& v) override;
};
/**
* @brief The ImageSurface class is a Surface to draw an image
*
* It creates an ImageShader for rendering.
*
* Image is read from the Ressouces (not an external file)
* Height = 1.0, Width is set by the aspect ratio of the image
*/
class ImageSurface : public Surface {
public:
ImageSurface(const std::string& path, Shader *s = new ImageShader);
void init () override; void init () override;
void draw (glm::mat4 modelview, glm::mat4 projection) override; void draw (glm::mat4 modelview, glm::mat4 projection) override;
@@ -33,17 +55,15 @@ protected:
/** /**
* @brief The MediaSurface class is an ImageSurface to draw a video * @brief The MediaSurface class is a Surface to draw a video
* *
* URI is passed to a Media Player to handle the video playback * URI is passed to a Media Player to handle the video playback
* Height = 1.0, Width is set by the aspect ratio of the image * Height = 1.0, Width is set by the aspect ratio of the image
*/ */
class MediaSurface : public ImageSurface { class MediaSurface : public Surface {
MediaPlayer *mediaplayer_;
public: public:
MediaSurface(const std::string& uri); MediaSurface(const std::string& uri, Shader *s = new ImageShader);
~MediaSurface(); ~MediaSurface();
void init () override; void init () override;
@@ -51,9 +71,34 @@ public:
void accept (Visitor& v) override; void accept (Visitor& v) override;
void update (float dt) override; void update (float dt) override;
inline std::string getUri() const { return uri_; }
MediaPlayer *getMediaPlayer() { return mediaplayer_; } MediaPlayer *getMediaPlayer() { return mediaplayer_; }
protected:
std::string uri_;
MediaPlayer *mediaplayer_;
}; };
/**
* @brief The FrameBufferSurface class is a Surface to draw a framebuffer
*
* URI is passed to a Media Player to handle the video playback
* Height = 1.0, Width is set by the aspect ratio of the image
*/
class FrameBufferSurface : public Surface {
public:
FrameBufferSurface(FrameBuffer *fb, Shader *s = new ImageShader);
void init () override;
void draw (glm::mat4 modelview, glm::mat4 projection) override;
void accept (Visitor& v) override;
inline FrameBuffer *getFrameBuffer() const { return frame_buffer_; }
protected:
FrameBuffer *frame_buffer_;
};
/** /**
* @brief The Points class is a Primitive to draw Points * @brief The Points class is a Primitive to draw Points
@@ -64,9 +109,7 @@ class Points : public Primitive {
public: public:
Points(std::vector<glm::vec3> points, glm::vec4 color, uint pointsize = 10); Points(std::vector<glm::vec3> points, glm::vec4 color, uint pointsize = 10);
~Points();
virtual void init() override;
virtual void draw(glm::mat4 modelview, glm::mat4 projection) override; virtual void draw(glm::mat4 modelview, glm::mat4 projection) override;
virtual void accept(Visitor& v) override; virtual void accept(Visitor& v) override;
@@ -87,9 +130,7 @@ class LineStrip : public Primitive {
public: public:
LineStrip(std::vector<glm::vec3> points, glm::vec4 color, uint linewidth = 1); LineStrip(std::vector<glm::vec3> points, glm::vec4 color, uint linewidth = 1);
~LineStrip();
virtual void init() override;
virtual void draw(glm::mat4 modelview, glm::mat4 projection) override; virtual void draw(glm::mat4 modelview, glm::mat4 projection) override;
virtual void accept(Visitor& v) override; virtual void accept(Visitor& v) override;

View File

@@ -328,8 +328,8 @@ RenderingAttrib Rendering::currentAttrib()
glm::mat4 Rendering::Projection() glm::mat4 Rendering::Projection()
{ {
glm::mat4 projection = glm::ortho(-5.0, 5.0, -5.0, 5.0, -5.0, 5.0); static glm::mat4 projection = glm::ortho(-SCENE_UNIT, SCENE_UNIT, -SCENE_UNIT, SCENE_UNIT, SCENE_DEPTH, 0.f);
glm::mat4 scale = glm::scale(glm::mat4(1.0f), glm::vec3(1.f, AspectRatio(), 1.f)); glm::mat4 scale = glm::scale(glm::identity<glm::mat4>(), glm::vec3(1.f, AspectRatio(), 1.f));
return projection * scale; return projection * scale;
} }
@@ -337,11 +337,12 @@ glm::mat4 Rendering::Projection()
glm::vec3 Rendering::unProject(glm::vec2 screen_coordinate, glm::mat4 modelview) glm::vec3 Rendering::unProject(glm::vec2 screen_coordinate, glm::mat4 modelview)
{ {
glm::vec3 point; glm::vec3 coordinates = glm::vec3( screen_coordinate.x, -screen_coordinate.y, 0.f);
glm::vec3 coordinates = glm::vec3( glm::vec2(screen_coordinate), 0.f);
glm::vec4 viewport = glm::vec4( 0.f, 0.f, main_window_attributes_.viewport.x, main_window_attributes_.viewport.y); glm::vec4 viewport = glm::vec4( 0.f, 0.f, main_window_attributes_.viewport.x, main_window_attributes_.viewport.y);
point = glm::unProject(coordinates, modelview, Projection(), viewport); // glm::mat4 mv = glm::scale(modelview, glm::vec3(1.f, -1.f, 1.f));
// glm::mat4 mv = glm::inverse(modelview);
glm::vec3 point = glm::unProject(coordinates, modelview, Projection(), viewport);
return point; return point;
} }

View File

@@ -77,7 +77,7 @@ public:
// get projection matrix (for sharers) => Views // get projection matrix (for sharers) => Views
glm::mat4 Projection(); glm::mat4 Projection();
// unproject from window coordinate // unproject from window coordinate
glm::vec3 unProject(glm::vec2 screen_coordinate, glm::mat4 modelview); glm::vec3 unProject(glm::vec2 screen_coordinate, glm::mat4 modelview = glm::mat4(1.f));
// for opengl pipeline in gstreamer // for opengl pipeline in gstreamer
void LinkPipeline( GstPipeline *pipeline ); void LinkPipeline( GstPipeline *pipeline );

View File

@@ -57,6 +57,8 @@ void Node::accept(Visitor& v)
Primitive::~Primitive() Primitive::~Primitive()
{ {
deleteGLBuffers_(); deleteGLBuffers_();
if (shader_)
delete shader_;
} }
void Primitive::init() void Primitive::init()
@@ -153,6 +155,14 @@ void Primitive::accept(Visitor& v)
v.visit(*this); v.visit(*this);
} }
void Primitive::replaceShader( Shader *newshader )
{
if (newshader) {
if (shader_)
delete shader_;
shader_ = newshader;
}
}
void Primitive::deleteGLBuffers_() void Primitive::deleteGLBuffers_()
{ {

20
Scene.h
View File

@@ -6,6 +6,7 @@
#ifdef __APPLE__ #ifdef __APPLE__
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#include <set> #include <set>
#include <vector> #include <vector>
#include <glm/glm.hpp> #include <glm/glm.hpp>
@@ -89,15 +90,15 @@ public:
class Primitive : public Node { class Primitive : public Node {
public: public:
Primitive() : Node(), shader_(nullptr), vao_(0), drawMode_(0), drawCount_(0) {} Primitive(Shader *s = nullptr) : Node(), shader_(s), vao_(0), drawMode_(0), drawCount_(0) {}
virtual ~Primitive(); virtual ~Primitive();
virtual void init () override; virtual void init () override;
virtual void accept (Visitor& v) override; virtual void accept (Visitor& v) override;
virtual void draw (glm::mat4 modelview, glm::mat4 projection) override; virtual void draw (glm::mat4 modelview, glm::mat4 projection) override;
inline Shader *getShader() const { return shader_; } inline Shader *shader () const { return shader_; }
inline void setShader( Shader* e ) { shader_ = e; } void replaceShader (Shader* newshader);
protected: protected:
Shader* shader_; Shader* shader_;
@@ -120,6 +121,8 @@ struct z_comparator
return (a && b && a->translation_.z < b->translation_.z); return (a && b && a->translation_.z < b->translation_.z);
} }
}; };
typedef std::multiset<Node*, z_comparator> NodeSet;
struct hasId: public std::unary_function<Node*, bool> struct hasId: public std::unary_function<Node*, bool>
{ {
inline bool operator()(const Node* e) const inline bool operator()(const Node* e) const
@@ -130,7 +133,6 @@ struct hasId: public std::unary_function<Node*, bool>
private: private:
int _id; int _id;
}; };
typedef std::multiset<Node*, z_comparator> NodeSet;
/** /**
* @brief The Group class contains a list of pointers to Nodes. * @brief The Group class contains a list of pointers to Nodes.
@@ -227,14 +229,18 @@ protected:
// A scene contains a root node and gives a simplified API to add nodes // A scene contains a root node and gives a simplified API to add nodes
class Scene { class Scene {
Group root_;
public: public:
Scene() {} Scene() {}
Group *getRoot() { return &root_; } void accept (Visitor& v);
void accept(Visitor& v); Group *root() { return &root_; }
Group root_; // Node *find(int id);
// void remove(Node *n);
//
}; };

View File

@@ -69,7 +69,7 @@ void SessionVisitor::visit(Primitive &n)
XMLElement *Primitive = xmlCurrent_; XMLElement *Primitive = xmlCurrent_;
xmlCurrent_ = xmlDoc_->NewElement("Shader"); xmlCurrent_ = xmlDoc_->NewElement("Shader");
n.getShader()->accept(*this); n.shader()->accept(*this);
Primitive->InsertEndChild(xmlCurrent_); Primitive->InsertEndChild(xmlCurrent_);
// revert to primitive as current // revert to primitive as current
@@ -172,12 +172,12 @@ void SessionVisitor::visit(Mesh &n)
// Node of a different type // Node of a different type
xmlCurrent_->SetAttribute("type", "Mesh"); xmlCurrent_->SetAttribute("type", "Mesh");
XMLText *filename = xmlDoc_->NewText( n.getResource().c_str() ); XMLText *filename = xmlDoc_->NewText( n.meshPath().c_str() );
XMLElement *obj = xmlDoc_->NewElement("resource"); XMLElement *obj = xmlDoc_->NewElement("resource");
obj->InsertEndChild(filename); obj->InsertEndChild(filename);
xmlCurrent_->InsertEndChild(obj); xmlCurrent_->InsertEndChild(obj);
filename = xmlDoc_->NewText( n.getTexture().c_str() ); filename = xmlDoc_->NewText( n.texturePath().c_str() );
XMLElement *tex = xmlDoc_->NewElement("texture"); XMLElement *tex = xmlDoc_->NewElement("texture");
tex->InsertEndChild(filename); tex->InsertEndChild(filename);
xmlCurrent_->InsertEndChild(tex); xmlCurrent_->InsertEndChild(tex);
@@ -194,7 +194,7 @@ void SessionVisitor::visit(Scene &n)
// start recursive traverse from root node // start recursive traverse from root node
xmlCurrent_ = xmlRoot_; xmlCurrent_ = xmlRoot_;
n.getRoot()->accept(*this); n.root()->accept(*this);
} }
void SessionVisitor::save(std::string filename) void SessionVisitor::save(std::string filename)

63
Source.cpp Normal file
View File

@@ -0,0 +1,63 @@
#include <algorithm>
#include "Source.h"
// gobal static list of all sources
SourceList Source::sources_;
Source::Source(std::string name = "") : name_(""), buffer_(nullptr), shader_(nullptr), surface_(nullptr)
{
// set a name
rename(name);
// add source to the list
sources_.push_back(this);
}
Source::~Source()
{
sources_.remove(this);
}
std::string Source::rename (std::string newname)
{
// tentative new name
std::string tentativename = newname;
// refuse to rename to an empty name
if ( newname.empty() )
tentativename = "source";
// trivial case : same name as current
if ( tentativename == name_ )
return name_;
// search for a source of the name 'tentativename'
std::string basename = tentativename;
int count = 1;
while ( std::find_if(sources_.begin(), sources_.end(), hasName(tentativename)) != sources_.end() ) {
tentativename = basename + std::to_string(++count);
}
// ok to rename
name_ = tentativename;
return name_;
}
SourceList::iterator Source::begin()
{
return sources_.begin();
}
SourceList::iterator Source::end()
{
return sources_.end();
}
uint Source::numSource()
{
return sources_.size();
}

71
Source.h Normal file
View File

@@ -0,0 +1,71 @@
#ifndef SOURCE_H
#define SOURCE_H
#include <string>
#include <list>
#include "FrameBuffer.h"
#include "ImageShader.h"
#include "Primitives.h"
class Source;
// TODO : source set sorted by shader
// so that the render loop avoid switching
typedef std::list<Source *> SourceList;
class Source
{
public:
// create a source and add it to the list
Source(std::string name);
virtual ~Source();
// manipulate name of source
inline std::string name () const { return name_; }
std::string rename (std::string newname);
// void setCustomShader();
inline Shader *shader() const { return shader_; }
// for scene
inline FrameBufferSurface *surface() const { return surface_; }
// only subclasses of sources can actually be instanciated
virtual void render() = 0;
// global management of list of sources
static SourceList::iterator begin();
static SourceList::iterator end();
static uint numSource();
protected:
// name
std::string name_;
// a source draws in a frame buffer an input using a given shader
FrameBuffer *buffer_;
ImageShader *shader_;
// a surface is used to draw in the scenes
FrameBufferSurface *surface_;
// static global list of sources
static SourceList sources_;
};
struct hasName: public std::unary_function<Source*, bool>
{
inline bool operator()(const Source* elem) const
{
return (elem && elem->name() == _n);
}
hasName(std::string n) : _n(n) { }
private:
std::string _n;
};
#endif // SOURCE_H

View File

@@ -38,6 +38,7 @@
#include "FileDialog.h" #include "FileDialog.h"
#include "ImGuiToolkit.h" #include "ImGuiToolkit.h"
#include "GstToolkit.h" #include "GstToolkit.h"
#include "Mixer.h"
static std::thread loadThread; static std::thread loadThread;
static bool loadThreadDone = false; static bool loadThreadDone = false;
@@ -161,9 +162,25 @@ void UserInterface::handleMouse()
if ( !ImGui::IsAnyWindowHovered() && !ImGui::IsAnyWindowFocused() ) if ( !ImGui::IsAnyWindowHovered() && !ImGui::IsAnyWindowFocused() )
{ {
// Mouse wheel over background // Mouse wheel over background
if ( io.MouseWheel > 0) { if ( io.MouseWheel != 0) {
Mixer::manager().currentView()->zoom( io.MouseWheel );
Log::Info(" wheel %.1f", io.MouseWheel);
}
if ( ImGui::IsMouseDragging(ImGuiMouseButton_Right, 10.0f) )
{
// Log::Info("Mouse drag (%.1f,%.1f)(%.1f,%.1f)", io.MouseDelta.x, io.MouseDelta.y, io.MousePos.x, io.MousePos.y);
Mixer::manager().currentView()->drag( glm::vec2(io.MouseClickedPos[ImGuiMouseButton_Right].x, io.MouseClickedPos[ImGuiMouseButton_Right].y), glm::vec2(io.MousePos.x, io.MousePos.y));
ImGui::SetMouseCursor(ImGuiMouseCursor_ResizeAll);
}
else {
ImGui::SetMouseCursor(ImGuiMouseCursor_Arrow);
} }
if ( ImGui::IsMouseDown(ImGuiMouseButton_Left)) { if ( ImGui::IsMouseDown(ImGuiMouseButton_Left)) {

112
View.cpp Normal file
View File

@@ -0,0 +1,112 @@
// Opengl
#include <glad/glad.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include "defines.h"
#include "View.h"
#include "Primitives.h"
#include "Mesh.h"
#include "FrameBuffer.h"
#include "Log.h"
View::View()
{
}
void View::update(float dt)
{
// recursive update from root of scene
scene.root()->update( dt );
}
MixingView::MixingView() : View()
{
Mesh *disk = new Mesh("mesh/disk.ply", "images/transparencygrid.png");
backgound_.addChild(disk);
glm::vec4 pink( 0.8f, 0.f, 0.8f, 1.f );
LineCircle *circle = new LineCircle(pink, 5);
backgound_.addChild(circle);
scene.root()->addChild(&backgound_);
scene.root()->addChild(&foreground_);
// make sure there is no depth fight
// foreground.translation_ = glm::vec3(0.f, 0.f, 0.1f);
}
MixingView::~MixingView()
{
// delete background
for (NodeSet::iterator node = backgound_.begin(); node != backgound_.end(); node++) {
delete (*node);
}
}
void MixingView::draw()
{
// draw in main view
scene.root()->draw(glm::identity<glm::mat4>(), Rendering::manager().Projection());
}
void MixingView::zoom( float factor )
{
float z = scene.root()->scale_.x;
z = CLAMP( z + 0.1f * factor, 0.2f, 10.f);
scene.root()->scale_.x = z;
scene.root()->scale_.y = z;
}
void MixingView::drag (glm::vec2 from, glm::vec2 to)
{
static glm::vec3 start_translation = glm::vec3(0.f);
static glm::vec2 start_position = glm::vec2(0.f);
if ( start_position != from ) {
start_position = from;
start_translation = scene.root()->translation_;
}
// unproject
glm::vec3 gl_Position_from = Rendering::manager().unProject(from);
glm::vec3 gl_Position_to = Rendering::manager().unProject(to);
// compute delta translation
scene.root()->translation_ = start_translation + gl_Position_to - gl_Position_from;
}
RenderView::RenderView() : View(), frame_buffer_(nullptr)
{
setResolution(1280, 720);
}
RenderView::~RenderView()
{
if (frame_buffer_)
delete frame_buffer_;
}
void RenderView::setResolution(uint width, uint height)
{
if (frame_buffer_)
delete frame_buffer_;
frame_buffer_ = new FrameBuffer(width, height);
}
void RenderView::draw()
{
static glm::mat4 projection = glm::ortho(-SCENE_UNIT, SCENE_UNIT, -SCENE_UNIT, SCENE_UNIT, SCENE_DEPTH, 0.f);
glm::mat4 P = glm::scale( projection, glm::vec3(1.f, frame_buffer_->aspectRatio(), 1.f));
frame_buffer_->begin();
scene.root()->draw(glm::identity<glm::mat4>(), P);
frame_buffer_->end();
}

52
View.h Normal file
View File

@@ -0,0 +1,52 @@
#ifndef VIEW_H
#define VIEW_H
#include <glm/glm.hpp>
#include "Scene.h"
class FrameBuffer;
class View
{
public:
View();
virtual void update (float dt);
virtual void draw () = 0;
virtual void zoom (float) {}
virtual void drag (glm::vec2, glm::vec2) {}
Scene scene;
protected:
Group backgound_;
Group foreground_;
};
class MixingView : public View
{
public:
MixingView();
~MixingView();
void draw () override;
void zoom (float factor);
void drag (glm::vec2 from, glm::vec2 to);
};
class RenderView : public View
{
FrameBuffer *frame_buffer_;
public:
RenderView ();
~RenderView ();
void draw () override;
void setResolution (uint width, uint height);
inline FrameBuffer *frameBuffer () const { return frame_buffer_; }
};
#endif // VIEW_H

View File

@@ -16,7 +16,8 @@
#define EXP100(val) (exp(log(10.0)/50.0*(float)(val))-1.0) #define EXP100(val) (exp(log(10.0)/50.0*(float)(val))-1.0)
#define EUCLIDEAN(P1, P2) sqrt((P1.x() - P2.x()) * (P1.x() - P2.x()) + (P1.y() - P2.y()) * (P1.y() - P2.y())) #define EUCLIDEAN(P1, P2) sqrt((P1.x() - P2.x()) * (P1.x() - P2.x()) + (P1.y() - P2.y()) * (P1.y() - P2.y()))
#define SCENE_UNIT 10.0 #define SCENE_UNIT 5.f
#define SCENE_DEPTH -10.f
#define CIRCLE_SQUARE_DIST(x,y) ( (x*x + y*y) / (SCENE_UNIT * SCENE_UNIT * SCENE_UNIT * SCENE_UNIT) ) #define CIRCLE_SQUARE_DIST(x,y) ( (x*x + y*y) / (SCENE_UNIT * SCENE_UNIT * SCENE_UNIT * SCENE_UNIT) )
#define IMGUI_TITLE_MAINWINDOW ICON_FA_CIRCLE_NOTCH " v-mix" #define IMGUI_TITLE_MAINWINDOW ICON_FA_CIRCLE_NOTCH " v-mix"

106
main.cpp
View File

@@ -16,24 +16,27 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/gstbin.h> #include <gst/gstbin.h>
#include <gst/gl/gl.h> #include <gst/gl/gl.h>
#include "GstToolkit.h"
// imgui
#include "imgui.h"
#include "ImGuiToolkit.h"
#include "ImGuiVisitor.h"
// vmix // vmix
#include "defines.h" #include "defines.h"
#include "ImageShader.h"
#include "Settings.h" #include "Settings.h"
#include "Resource.h"
#include "FrameBuffer.h" // mixing
#include "Mixer.h"
#include "RenderingManager.h" #include "RenderingManager.h"
#include "UserInterfaceManager.h" #include "UserInterfaceManager.h"
#include "imgui.h"
#include "ImGuiToolkit.h"
#include "GstToolkit.h"
#include "MediaPlayer.h" #include "MediaPlayer.h"
#include "Scene.h" #include "Scene.h"
#include "Primitives.h" #include "Primitives.h"
#include "Mesh.h" #include "Mesh.h"
#include "ImGuiVisitor.h"
#include "SessionVisitor.h" #include "SessionVisitor.h"
#define PI 3.14159265358979323846 #define PI 3.14159265358979323846
@@ -50,9 +53,8 @@
//// ("file:///home/bhbn/Videos/iss.mov"); //// ("file:///home/bhbn/Videos/iss.mov");
//// ("file:///home/bhbn/Videos//iss.mov"); //// ("file:///home/bhbn/Videos//iss.mov");
//// ("file:///Users/Herbelin/Movies/mp2test.mpg"); //// ("file:///Users/Herbelin/Movies/mp2test.mpg");
///
Scene scene;
FrameBuffer *output;
MediaSurface testnode1("file:///home/bhbn/Videos/iss.mov"); MediaSurface testnode1("file:///home/bhbn/Videos/iss.mov");
MediaSurface testnode2("file:///home/bhbn/Videos/fish.mp4"); MediaSurface testnode2("file:///home/bhbn/Videos/fish.mp4");
ImageSurface testnode3("images/seed_512.jpg"); ImageSurface testnode3("images/seed_512.jpg");
@@ -170,35 +172,42 @@ void drawMediaPlayer()
void drawScene() void drawScene()
{ {
// compute dt // // compute dt
static gint64 last_time = gst_util_get_timestamp (); // static gint64 last_time = gst_util_get_timestamp ();
gint64 current_time = gst_util_get_timestamp (); // gint64 current_time = gst_util_get_timestamp ();
gint64 dt = current_time - last_time; // gint64 dt = current_time - last_time;
last_time = current_time; // last_time = current_time;
// recursive update from root of scene // // recursive update from root of scene
scene.root_.update( static_cast<float>( GST_TIME_AS_MSECONDS(dt)) * 0.001f ); // scene.root()->update( static_cast<float>( GST_TIME_AS_MSECONDS(dt)) * 0.001f );
// draw in output frame buffer // // draw in output frame buffer
glm::mat4 MV = glm::identity<glm::mat4>(); // glm::mat4 MV = glm::identity<glm::mat4>();
glm::mat4 P = glm::scale( glm::ortho(-5.f, 5.f, -5.f, 5.f), glm::vec3(1.f, output->aspectRatio(), 1.f));
output->begin();
scene.root_.draw(MV, P);
output->end();
// draw in main view // static glm::mat4 projection = glm::ortho(-SCENE_UNIT, SCENE_UNIT, -SCENE_UNIT, SCENE_UNIT, SCENE_DEPTH, 0.f);
scene.root_.draw(MV, Rendering::manager().Projection()); // glm::mat4 P = glm::scale( projection, glm::vec3(1.f, output->aspectRatio(), 1.f));
// output->begin();
// scene.root()->draw(MV, P);
// output->end();
// // draw in main view
// scene.root()->draw(MV, Rendering::manager().Projection());
Mixer::manager().update();
Mixer::manager().draw();
// draw GUI tree scene // draw GUI tree scene
ImGui::Begin(IMGUI_TITLE_MAINWINDOW); ImGui::Begin(IMGUI_TITLE_MAINWINDOW);
static ImGuiVisitor v; static ImGuiVisitor v;
scene.accept(v); Mixer::manager().currentView()->scene.accept(v);
ImGui::End(); ImGui::End();
} }
void drawPreview() void drawPreview()
{ {
FrameBuffer *output = Mixer::manager().frame();
if (output) if (output)
{ {
ImGui::SetNextWindowPos(ImVec2(100, 300), ImGuiCond_FirstUseEver); ImGui::SetNextWindowPos(ImVec2(100, 300), ImGuiCond_FirstUseEver);
@@ -246,6 +255,7 @@ int main(int, char**)
// UserInterface::manager().OpenTextEditor( Resource::getText("shaders/texture-shader.fs") ); // UserInterface::manager().OpenTextEditor( Resource::getText("shaders/texture-shader.fs") );
// init the scene // init the scene
Mixer::manager().setCurrentView(Mixer::MIXING);
Rendering::manager().PushFrontDrawCallback(drawScene); Rendering::manager().PushFrontDrawCallback(drawScene);
// init elements to the scene // init elements to the scene
@@ -256,53 +266,51 @@ int main(int, char**)
glm::vec4 pink( 0.8f, 0.f, 0.8f, 1.f ); glm::vec4 pink( 0.8f, 0.f, 0.8f, 1.f );
LineCircle circle(pink, 5); LineCircle circle(pink, 5);
glm::vec4 color( 0.8f, 0.8f, 0.f, 1.f); // glm::vec4 color( 0.8f, 0.8f, 0.f, 1.f);
LineSquare border(color, 5); // LineSquare border(color, 5);
Mesh shadow("mesh/shadow.ply", "mesh/shadow.png"); // Mesh shadow("mesh/shadow.ply", "mesh/shadow.png");
// Mesh meshicon("mesh/icon_video.ply");
Frame frame;
frame.scale_ = glm::vec3(1.7777778f, 1.f, 1.f);
Group g1; Group g1;
g1.translation_ = glm::vec3(1.f, 1.f, 0.2f); g1.translation_ = glm::vec3(1.f, 1.f, 1.f);
g1.scale_ = glm::vec3(0.8f, 0.8f, 1.f); g1.scale_ = glm::vec3(0.8f, 0.8f, 1.f);
Group g2; Group g2;
g2.translation_ = glm::vec3(-1.f, -1.f, 0.4f); g2.translation_ = glm::vec3(-1.f, -1.f, 2.f);
Animation A; Animation A;
A.speed_ = 0.05f; A.translation_ = glm::vec3(0.f, 0.f, 3.f);
A.speed_ = 0.1f;
A.axis_ = glm::vec3(1.f, 1.f, 1.f); A.axis_ = glm::vec3(1.f, 1.f, 1.f);
// std::vector<glm::vec3> pts = std::vector<glm::vec3> { glm::vec3( 0.f, 0.f, 0.f ) }; // std::vector<glm::vec3> pts = std::vector<glm::vec3> { glm::vec3( 0.f, 0.f, 0.f ) };
// Points P(pts, pink); // Points P(pts, pink);
// P.setPointSize(60); // P.setPointSize(60);
Mesh P("mesh/target.ply"); Mesh P("mesh/point.ply");
P.scale_ = glm::vec3(0.15f); P.scale_ = glm::vec3(0.15f);
Mesh meshicon("mesh/icon_video.ply");
// build tree // build tree
scene.root_.addChild(&disk); Mixer::manager().currentView()->scene.root()->addChild(&disk);
scene.root_.addChild(&circle); Mixer::manager().currentView()->scene.root()->addChild(&circle);
g1.addChild(&testnode3); g1.addChild(&testnode3);
g1.addChild(&border); Mixer::manager().currentView()->scene.root()->addChild(&g1);
g1.addChild(&shadow);
scene.root_.addChild(&g1);
g2.addChild(&testnode1); g2.addChild(&testnode1);
g2.addChild(&border); g2.addChild(&frame);
g2.addChild(&shadow); Mixer::manager().currentView()->scene.root()->addChild(&g2);
g2.addChild(&meshicon);
scene.root_.addChild(&g2);
A.addChild(&P); A.addChild(&P);
scene.root_.addChild(&A); Mixer::manager().currentView()->scene.root()->addChild(&A);
// init output FBO // init output FBO
output = new FrameBuffer(1280, 720);
Rendering::manager().PushBackDrawCallback(drawPreview); Rendering::manager().PushBackDrawCallback(drawPreview);
// add media player // add media player
Rendering::manager().PushBackDrawCallback(drawMediaPlayer); // Rendering::manager().PushBackDrawCallback(drawMediaPlayer);
/// ///
/// Main LOOP /// Main LOOP
@@ -313,10 +321,6 @@ int main(int, char**)
} }
SessionVisitor savetoxml;
scene.accept(savetoxml);
savetoxml.save("/home/bhbn/test.vmx");
UserInterface::manager().Terminate(); UserInterface::manager().Terminate();
Rendering::manager().Terminate(); Rendering::manager().Terminate();

View File

@@ -1,7 +1,7 @@
ply ply
format ascii 1.0 format ascii 1.0
comment Created by Blender 2.82 (sub 7) - www.blender.org, source file: 'border.blend' comment Created by Blender 2.82 (sub 7) - www.blender.org, source file: 'border.blend'
element vertex 72 element vertex 45
property float x property float x
property float y property float y
property float z property float z
@@ -9,174 +9,107 @@ property uchar red
property uchar green property uchar green
property uchar blue property uchar blue
property uchar alpha property uchar alpha
element face 96 element face 56
property list uchar uint vertex_indices property list uchar uint vertex_indices
end_header end_header
-1.026677 0.976163 0.000000 255 255 255 255 -0.950647 -1.000000 0.000000 255 255 255 255
-1.011723 0.988680 0.000000 255 255 255 255 -0.000071 -1.013523 0.000000 255 255 255 255
-1.013049 0.963196 0.000000 255 255 255 255 -0.000077 -1.000000 0.000000 255 255 255 255
-1.025333 1.001990 0.000000 255 255 255 255 -0.962557 -1.013523 0.000000 255 255 255 255
-1.002709 1.003049 0.000000 255 255 255 255 -0.000064 -1.027167 0.000000 255 255 255 255
-0.991672 0.992002 0.000000 255 255 255 255 0.963176 -1.013523 0.000000 255 255 255 255
-1.000587 0.977791 0.000000 255 255 255 255 0.951244 -1.000000 0.000000 255 255 255 255
-0.986586 1.010839 0.000000 255 255 255 255 0.971677 -1.000395 0.000000 255 255 255 255
-0.962045 1.013040 0.000000 255 255 255 255 0.982502 -1.011536 0.000000 255 255 255 255
-0.975727 0.999706 0.000000 255 255 255 255 0.991868 -0.991539 0.000000 255 255 255 255
-0.950140 1.000495 0.000000 255 255 255 255 1.011320 -0.981739 0.000000 255 255 255 255
-0.000007 1.013040 0.000000 255 255 255 255 1.002918 -1.002581 0.000000 255 255 255 255
-0.000013 1.000495 0.000000 255 255 255 255 1.013443 -0.963042 0.000000 255 255 255 255
0.000000 1.026677 0.000000 255 255 255 255 1.000178 -0.970926 0.000000 255 255 255 255
0.962791 1.013040 0.000000 255 255 255 255 1.027092 -0.976006 0.000000 255 255 255 255
0.950865 1.000495 0.000000 255 255 255 255 1.024939 -0.994955 0.000000 255 255 255 255
0.971288 0.999918 0.000000 255 255 255 255 1.016425 -1.016078 0.000000 255 255 255 255
0.982108 1.011054 0.000000 255 255 255 255 0.995733 -1.025153 0.000000 255 255 255 255
0.991471 0.991066 0.000000 255 255 255 255 0.976147 -1.027167 0.000000 255 255 255 255
1.010913 0.981270 0.000000 255 255 255 255 1.027092 -0.000011 0.000000 255 255 255 255
1.002515 1.002103 0.000000 255 255 255 255 1.013443 0.963025 0.000000 255 255 255 255
1.013035 0.962582 0.000000 255 255 255 255 1.013443 -0.000008 0.000000 255 255 255 255
0.999776 0.970463 0.000000 255 255 255 255 1.027092 0.975985 0.000000 255 255 255 255
1.026677 0.975541 0.000000 255 255 255 255 1.011158 0.987628 0.000000 255 255 255 255
1.024526 0.994481 0.000000 255 255 255 255 1.000017 0.976754 0.000000 255 255 255 255
1.016015 1.015594 0.000000 255 255 255 255 1.000000 0.951104 0.000000 255 255 255 255
0.995334 1.024665 0.000000 255 255 255 255 0.991530 0.992067 0.000000 255 255 255 255
0.975757 1.026677 0.000000 255 255 255 255 0.984469 1.011229 0.000000 255 255 255 255
-0.974986 1.026677 0.000000 255 255 255 255 1.002576 1.003111 0.000000 255 255 255 255
-0.999859 1.024447 0.000000 255 255 255 255 0.962232 1.013506 0.000000 255 255 255 255
-1.016198 1.016553 0.000000 255 255 255 255 0.973622 1.000095 0.000000 255 255 255 255
1.026677 0.000000 0.000000 255 255 255 255 0.975191 1.027145 0.000000 255 255 255 255
1.013035 -0.962588 0.000000 255 255 255 255 0.997727 1.024837 0.000000 255 255 255 255
1.013035 -0.000003 0.000000 255 255 255 255 1.016078 1.016610 0.000000 255 255 255 255
1.026677 -0.975541 0.000000 255 255 255 255 1.024775 1.000919 0.000000 255 255 255 255
1.010751 -0.987179 0.000000 255 255 255 255 1.000889 -0.951116 0.000000 255 255 255 255
0.999616 -0.976310 0.000000 255 255 255 255 -0.951593 1.000000 0.000000 255 255 255 255
1.000487 -0.950672 0.000000 255 255 255 255 -0.000071 1.013506 0.000000 255 255 255 255
0.991132 -0.991616 0.000000 255 255 255 255 -0.963515 1.013506 0.000000 255 255 255 255
0.984074 -1.010769 0.000000 255 255 255 255 0.950312 1.000000 0.000000 255 255 255 255
1.002173 -1.002655 0.000000 255 255 255 255 -0.000064 1.027145 0.000000 255 255 255 255
0.961848 -1.013045 0.000000 255 255 255 255 -0.975505 -1.027167 0.000000 255 255 255 255
0.973233 -0.999640 0.000000 255 255 255 255 1.000000 0.000000 0.000000 255 255 255 255
0.974801 -1.026677 0.000000 255 255 255 255 -0.000064 1.000000 0.000000 255 255 255 255
0.997326 -1.024371 0.000000 255 255 255 255 -0.976476 1.027145 0.000000 255 255 255 255
1.015669 -1.016148 0.000000 255 255 255 255
1.024362 -1.000464 0.000000 255 255 255 255
1.000487 0.950662 0.000000 255 255 255 255
-1.026677 -0.974622 0.000000 255 255 255 255
-1.011117 -0.987925 0.000000 255 255 255 255
-1.024719 -1.001219 0.000000 255 255 255 255
-1.013049 -0.961680 0.000000 255 255 255 255
-0.999987 -0.977048 0.000000 255 255 255 255
-0.992284 -0.992011 0.000000 255 255 255 255
-1.003327 -1.003055 0.000000 255 255 255 255
-1.002193 -1.025218 0.000000 255 255 255 255
-1.016824 -1.016553 0.000000 255 255 255 255
-0.988890 -1.011604 0.000000 255 255 255 255
-0.978005 -1.000466 0.000000 255 255 255 255
-0.963002 -1.013045 0.000000 255 255 255 255
-0.951086 -1.000505 0.000000 255 255 255 255
-0.000007 -1.013045 0.000000 255 255 255 255
0.949933 -1.000505 0.000000 255 255 255 255
0.000000 -1.026677 0.000000 255 255 255 255
-0.975957 -1.026677 0.000000 255 255 255 255
-1.026677 0.000000 0.000000 255 255 255 255
-1.013049 -0.000003 0.000000 255 255 255 255
-1.000513 0.951268 0.000000 255 255 255 255
-1.000513 -0.000005 0.000000 255 255 255 255
-1.000513 -0.949776 0.000000 255 255 255 255
1.000487 -0.000005 0.000000 255 255 255 255
-0.000013 -1.000505 0.000000 255 255 255 255
3 0 1 2 3 0 1 2
3 3 4 1 3 3 4 1
3 1 5 6 3 4 5 1
3 7 5 4 3 1 6 2
3 5 7 6
3 8 9 7 3 8 9 7
3 10 11 12 3 10 9 11
3 8 13 11 3 12 13 10
3 13 14 11 3 10 14 12
3 11 15 12 3 15 11 16
3 14 16 15 3 11 17 16
3 17 18 16 3 8 18 17
3 19 18 20 3 19 12 14
3 21 22 19 3 19 20 21
3 19 23 21 3 22 23 20
3 24 20 25 3 20 24 25
3 20 26 25 3 23 26 24
3 17 27 26 3 27 26 28
3 28 7 29 3 29 30 27
3 29 4 30 3 27 31 29
3 6 2 1 3 32 28 33
3 31 21 23 3 28 34 33
3 31 32 33 3 25 21 20
3 34 35 32 3 21 35 12
3 32 36 37 3 36 37 38
3 35 38 36 3 37 39 29
3 39 38 40 3 29 40 37
3 41 42 39 3 40 38 37
3 39 43 41
3 44 40 45
3 40 46 45
3 37 33 32
3 33 47 21
3 48 49 50
3 51 52 49
3 53 49 52
3 54 50 49
3 54 55 56
3 57 53 58
3 58 59 57
3 60 61 59
3 61 62 41
3 41 63 61
3 63 59 61
3 64 57 59
3 65 51 48
3 65 2 66
3 66 67 68
3 69 66 68
3 0 3 1 3 0 3 1
3 3 30 4 3 3 41 4
3 1 4 5 3 4 18 5
3 7 9 5 3 1 5 6
3 8 10 9 3 5 8 7
3 10 8 11 3 8 11 9
3 8 28 13 3 10 13 9
3 13 27 14 3 12 35 13
3 11 14 15 3 10 15 14
3 14 17 16 3 15 10 11
3 17 20 18 3 11 8 17
3 19 22 18 3 8 5 18
3 21 47 22 3 19 21 12
3 19 24 23 3 19 22 20
3 24 19 20 3 22 34 23
3 20 17 26 3 20 23 24
3 17 14 27 3 23 28 26
3 28 8 7 3 27 30 26
3 29 7 4 3 29 39 30
3 6 67 2 3 27 32 31
3 31 33 21 3 32 27 28
3 31 34 32 3 28 23 34
3 34 46 35 3 25 42 21
3 32 35 36 3 21 42 35
3 35 40 38 3 36 43 37
3 39 42 38 3 37 43 39
3 41 62 42 3 29 31 40
3 39 44 43 3 40 44 38
3 44 39 40
3 40 35 46
3 37 70 33
3 33 70 47
3 48 51 49
3 51 69 52
3 53 54 49
3 54 56 50
3 54 57 55
3 57 54 53
3 58 60 59
3 60 71 61
3 61 71 62
3 41 43 63
3 63 64 59
3 64 55 57
3 65 66 51
3 65 0 2
3 66 2 67
3 69 51 66

View File

@@ -12,67 +12,67 @@ property uchar alpha
element face 57 element face 57
property list uchar uint vertex_indices property list uchar uint vertex_indices
end_header end_header
-0.656711 -0.879600 0.000000 255 255 255 255 0.640531 -0.899390 0.000000 255 255 255 255
-0.677007 -0.717270 0.000000 255 255 255 255 0.662011 -0.727588 0.000000 255 255 255 255
-0.656711 -0.696979 0.000000 255 255 255 255 0.640531 -0.706113 0.000000 255 255 255 255
-0.900258 -0.696979 0.000000 255 255 255 255 0.898289 -0.706113 0.000000 255 255 255 255
-0.879962 -0.717270 0.000000 255 255 255 255 0.876809 -0.727588 0.000000 255 255 255 255
-0.900258 -0.879600 0.000000 255 255 255 255 0.898289 -0.899390 0.000000 255 255 255 255
-0.677007 -0.859309 0.000000 255 255 255 255 0.662011 -0.877915 0.000000 255 255 255 255
-0.879962 -0.859309 0.000000 255 255 255 255 0.876809 -0.877915 0.000000 255 255 255 255
-0.720607 -0.737700 0.000000 255 255 255 255 0.708155 -0.749211 0.000000 255 255 255 255
-0.724736 -0.737700 0.000000 255 255 255 255 0.712525 -0.749211 0.000000 255 255 255 255
-0.722672 -0.737561 0.000000 255 255 255 255 0.710340 -0.749063 0.000000 255 255 255 255
-0.726717 -0.738105 0.000000 255 255 255 255 0.714621 -0.749639 0.000000 255 255 255 255
-0.718627 -0.738105 0.000000 255 255 255 255 0.706059 -0.749639 0.000000 255 255 255 255
-0.728595 -0.738758 0.000000 255 255 255 255 0.716609 -0.750330 0.000000 255 255 255 255
-0.716749 -0.738758 0.000000 255 255 255 255 0.704072 -0.750330 0.000000 255 255 255 255
-0.730353 -0.739640 0.000000 255 255 255 255 0.718469 -0.751263 0.000000 255 255 255 255
-0.714991 -0.739640 0.000000 255 255 255 255 0.702211 -0.751263 0.000000 255 255 255 255
-0.731971 -0.740733 0.000000 255 255 255 255 0.720183 -0.752421 0.000000 255 255 255 255
-0.713372 -0.740733 0.000000 255 255 255 255 0.700498 -0.752421 0.000000 255 255 255 255
-0.733433 -0.742020 0.000000 255 255 255 255 0.721730 -0.753783 0.000000 255 255 255 255
-0.711910 -0.742020 0.000000 255 255 255 255 0.698951 -0.753783 0.000000 255 255 255 255
-0.734720 -0.743482 0.000000 255 255 255 255 0.723092 -0.755330 0.000000 255 255 255 255
-0.710623 -0.743482 0.000000 255 255 255 255 0.697589 -0.755330 0.000000 255 255 255 255
-0.735814 -0.745100 0.000000 255 255 255 255 0.724250 -0.757043 0.000000 255 255 255 255
-0.709529 -0.745100 0.000000 255 255 255 255 0.696431 -0.757043 0.000000 255 255 255 255
-0.736697 -0.746858 0.000000 255 255 255 255 0.725183 -0.758902 0.000000 255 255 255 255
-0.708647 -0.746858 0.000000 255 255 255 255 0.695497 -0.758902 0.000000 255 255 255 255
-0.737349 -0.748735 0.000000 255 255 255 255 0.725874 -0.760890 0.000000 255 255 255 255
-0.707994 -0.748735 0.000000 255 255 255 255 0.694806 -0.760890 0.000000 255 255 255 255
-0.737754 -0.750715 0.000000 255 255 255 255 0.726303 -0.762985 0.000000 255 255 255 255
-0.707589 -0.750715 0.000000 255 255 255 255 0.694378 -0.762985 0.000000 255 255 255 255
-0.737893 -0.752780 0.000000 255 255 255 255 0.726450 -0.765170 0.000000 255 255 255 255
-0.707450 -0.752780 0.000000 255 255 255 255 0.694230 -0.765170 0.000000 255 255 255 255
-0.707589 -0.754846 0.000000 255 255 255 255 0.694378 -0.767357 0.000000 255 255 255 255
-0.737754 -0.754846 0.000000 255 255 255 255 0.726303 -0.767357 0.000000 255 255 255 255
-0.707994 -0.756827 0.000000 255 255 255 255 0.694806 -0.769454 0.000000 255 255 255 255
-0.737349 -0.756827 0.000000 255 255 255 255 0.725874 -0.769454 0.000000 255 255 255 255
-0.708647 -0.758706 0.000000 255 255 255 255 0.695497 -0.771442 0.000000 255 255 255 255
-0.736697 -0.758706 0.000000 255 255 255 255 0.725183 -0.771442 0.000000 255 255 255 255
-0.773218 -0.798435 0.000000 255 255 255 255 0.763836 -0.813489 0.000000 255 255 255 255
-0.849519 -0.839018 0.000000 255 255 255 255 0.844589 -0.856440 0.000000 255 255 255 255
-0.798780 -0.757852 0.000000 255 255 255 255 0.790890 -0.770539 0.000000 255 255 255 255
-0.709529 -0.760463 0.000000 255 255 255 255 0.696431 -0.773302 0.000000 255 255 255 255
-0.735814 -0.760463 0.000000 255 255 255 255 0.724250 -0.773302 0.000000 255 255 255 255
-0.710623 -0.762082 0.000000 255 255 255 255 0.697589 -0.775015 0.000000 255 255 255 255
-0.734720 -0.762082 0.000000 255 255 255 255 0.723092 -0.775015 0.000000 255 255 255 255
-0.711910 -0.763543 0.000000 255 255 255 255 0.698951 -0.776561 0.000000 255 255 255 255
-0.733433 -0.763543 0.000000 255 255 255 255 0.721730 -0.776561 0.000000 255 255 255 255
-0.713372 -0.764829 0.000000 255 255 255 255 0.700498 -0.777922 0.000000 255 255 255 255
-0.731971 -0.764829 0.000000 255 255 255 255 0.720183 -0.777922 0.000000 255 255 255 255
-0.714991 -0.765922 0.000000 255 255 255 255 0.702211 -0.779079 0.000000 255 255 255 255
-0.730353 -0.765922 0.000000 255 255 255 255 0.718469 -0.779079 0.000000 255 255 255 255
-0.716749 -0.766803 0.000000 255 255 255 255 0.704072 -0.780011 0.000000 255 255 255 255
-0.728595 -0.766803 0.000000 255 255 255 255 0.716609 -0.780011 0.000000 255 255 255 255
-0.718627 -0.767455 0.000000 255 255 255 255 0.706059 -0.780701 0.000000 255 255 255 255
-0.726717 -0.767455 0.000000 255 255 255 255 0.714621 -0.780701 0.000000 255 255 255 255
-0.720607 -0.767859 0.000000 255 255 255 255 0.708155 -0.781129 0.000000 255 255 255 255
-0.724736 -0.767859 0.000000 255 255 255 255 0.712525 -0.781129 0.000000 255 255 255 255
-0.722672 -0.767998 0.000000 255 255 255 255 0.710340 -0.781276 0.000000 255 255 255 255
-0.707450 -0.839018 0.000000 255 255 255 255 0.694230 -0.856440 0.000000 255 255 255 255
-0.748041 -0.778550 0.000000 255 255 255 255 0.737190 -0.792443 0.000000 255 255 255 255
3 0 1 2 3 0 1 2
3 1 3 2 3 1 3 2
3 1 4 3 3 1 4 3

View File

@@ -1,7 +1,7 @@
ply ply
format ascii 1.0 format ascii 1.0
comment Created by Blender 2.82 (sub 7) - www.blender.org, source file: 'icons.blend' comment Created by Blender 2.82 (sub 7) - www.blender.org, source file: 'icons.blend'
element vertex 61 element vertex 64
property float x property float x
property float y property float y
property float z property float z
@@ -9,124 +9,150 @@ property uchar red
property uchar green property uchar green
property uchar blue property uchar blue
property uchar alpha property uchar alpha
element face 57 element face 80
property list uchar uint vertex_indices property list uchar uint vertex_indices
end_header end_header
0.656711 -0.879600 0.000000 255 255 255 255 0.658177 -0.900641 0.000000 255 255 255 255
0.677007 -0.717270 0.000000 255 255 255 255 0.678184 -0.680614 0.000000 255 255 255 255
0.656711 -0.696979 0.000000 255 255 255 255 0.658177 -0.680614 0.000000 255 255 255 255
0.900258 -0.696979 0.000000 255 255 255 255 0.678184 -0.700617 0.000000 255 255 255 255
0.879962 -0.717270 0.000000 255 255 255 255 0.698190 -0.700617 0.000000 255 255 255 255
0.900258 -0.879600 0.000000 255 255 255 255 0.718197 -0.680614 0.000000 255 255 255 255
0.677007 -0.859309 0.000000 255 255 255 255 0.698190 -0.680614 0.000000 255 255 255 255
0.879962 -0.859309 0.000000 255 255 255 255 0.718197 -0.720619 0.000000 255 255 255 255
0.720607 -0.737700 0.000000 255 255 255 255 0.838237 -0.720619 0.000000 255 255 255 255
0.724736 -0.737700 0.000000 255 255 255 255 0.858243 -0.680614 0.000000 255 255 255 255
0.722672 -0.737561 0.000000 255 255 255 255 0.838237 -0.680614 0.000000 255 255 255 255
0.726717 -0.738105 0.000000 255 255 255 255 0.858243 -0.700617 0.000000 255 255 255 255
0.718627 -0.738105 0.000000 255 255 255 255 0.878250 -0.700617 0.000000 255 255 255 255
0.728595 -0.738758 0.000000 255 255 255 255 0.898256 -0.680614 0.000000 255 255 255 255
0.716749 -0.738758 0.000000 255 255 255 255 0.878250 -0.680614 0.000000 255 255 255 255
0.730353 -0.739640 0.000000 255 255 255 255 0.898256 -0.900641 0.000000 255 255 255 255
0.714991 -0.739640 0.000000 255 255 255 255 0.678184 -0.720619 0.000000 255 255 255 255
0.731971 -0.740733 0.000000 255 255 255 255 0.858243 -0.720619 0.000000 255 255 255 255
0.713372 -0.740733 0.000000 255 255 255 255 0.878250 -0.720619 0.000000 255 255 255 255
0.733433 -0.742020 0.000000 255 255 255 255 0.678184 -0.740622 0.000000 255 255 255 255
0.711910 -0.742020 0.000000 255 255 255 255 0.698190 -0.720619 0.000000 255 255 255 255
0.734720 -0.743482 0.000000 255 255 255 255 0.698190 -0.740622 0.000000 255 255 255 255
0.710623 -0.743482 0.000000 255 255 255 255 0.858243 -0.740622 0.000000 255 255 255 255
0.735814 -0.745100 0.000000 255 255 255 255 0.878250 -0.740622 0.000000 255 255 255 255
0.709529 -0.745100 0.000000 255 255 255 255 0.678184 -0.760624 0.000000 255 255 255 255
0.736697 -0.746858 0.000000 255 255 255 255 0.718197 -0.750623 0.000000 255 255 255 255
0.708647 -0.746858 0.000000 255 255 255 255 0.838237 -0.750623 0.000000 255 255 255 255
0.737349 -0.748735 0.000000 255 255 255 255 0.878250 -0.760624 0.000000 255 255 255 255
0.707994 -0.748735 0.000000 255 255 255 255 0.698190 -0.760624 0.000000 255 255 255 255
0.737754 -0.750715 0.000000 255 255 255 255 0.718197 -0.830632 0.000000 255 255 255 255
0.707589 -0.750715 0.000000 255 255 255 255 0.838237 -0.830632 0.000000 255 255 255 255
0.737893 -0.752780 0.000000 255 255 255 255 0.858243 -0.760624 0.000000 255 255 255 255
0.707450 -0.752780 0.000000 255 255 255 255 0.678184 -0.780626 0.000000 255 255 255 255
0.707589 -0.754846 0.000000 255 255 255 255 0.698190 -0.780626 0.000000 255 255 255 255
0.737754 -0.754846 0.000000 255 255 255 255 0.858243 -0.780626 0.000000 255 255 255 255
0.707994 -0.756827 0.000000 255 255 255 255 0.878250 -0.780626 0.000000 255 255 255 255
0.737349 -0.756827 0.000000 255 255 255 255 0.678184 -0.800629 0.000000 255 255 255 255
0.708647 -0.758706 0.000000 255 255 255 255 0.698190 -0.800629 0.000000 255 255 255 255
0.736697 -0.758706 0.000000 255 255 255 255 0.858243 -0.800629 0.000000 255 255 255 255
0.773218 -0.798435 0.000000 255 255 255 255 0.878250 -0.800629 0.000000 255 255 255 255
0.849519 -0.839018 0.000000 255 255 255 255 0.678184 -0.820631 0.000000 255 255 255 255
0.798780 -0.757852 0.000000 255 255 255 255 0.698190 -0.820631 0.000000 255 255 255 255
0.709529 -0.760463 0.000000 255 255 255 255 0.858243 -0.820631 0.000000 255 255 255 255
0.735814 -0.760463 0.000000 255 255 255 255 0.878250 -0.820631 0.000000 255 255 255 255
0.710623 -0.762082 0.000000 255 255 255 255 0.678184 -0.840634 0.000000 255 255 255 255
0.734720 -0.762082 0.000000 255 255 255 255 0.878250 -0.840634 0.000000 255 255 255 255
0.711910 -0.763543 0.000000 255 255 255 255 0.678184 -0.860636 0.000000 255 255 255 255
0.733433 -0.763543 0.000000 255 255 255 255 0.698190 -0.840634 0.000000 255 255 255 255
0.713372 -0.764829 0.000000 255 255 255 255 0.698190 -0.860636 0.000000 255 255 255 255
0.731971 -0.764829 0.000000 255 255 255 255 0.858243 -0.840634 0.000000 255 255 255 255
0.714991 -0.765922 0.000000 255 255 255 255 0.858243 -0.860636 0.000000 255 255 255 255
0.730353 -0.765922 0.000000 255 255 255 255 0.878250 -0.860636 0.000000 255 255 255 255
0.716749 -0.766803 0.000000 255 255 255 255 0.678184 -0.880638 0.000000 255 255 255 255
0.728595 -0.766803 0.000000 255 255 255 255 0.718197 -0.860636 0.000000 255 255 255 255
0.718627 -0.767455 0.000000 255 255 255 255 0.698190 -0.880638 0.000000 255 255 255 255
0.726717 -0.767455 0.000000 255 255 255 255 0.718197 -0.900641 0.000000 255 255 255 255
0.720607 -0.767859 0.000000 255 255 255 255 0.838237 -0.860636 0.000000 255 255 255 255
0.724736 -0.767859 0.000000 255 255 255 255 0.838237 -0.900641 0.000000 255 255 255 255
0.722672 -0.767998 0.000000 255 255 255 255 0.858243 -0.880638 0.000000 255 255 255 255
0.707450 -0.839018 0.000000 255 255 255 255 0.878250 -0.880638 0.000000 255 255 255 255
0.748041 -0.778550 0.000000 255 255 255 255 0.678184 -0.900641 0.000000 255 255 255 255
0.698190 -0.900641 0.000000 255 255 255 255
0.858243 -0.900641 0.000000 255 255 255 255
0.878250 -0.900641 0.000000 255 255 255 255
3 0 1 2 3 0 1 2
3 1 3 2 3 0 3 1
3 1 4 3 3 4 5 6
3 4 5 3 3 4 7 5
3 0 6 1
3 7 5 4
3 8 9 10 3 8 9 10
3 8 11 9 3 8 11 9
3 12 11 8 3 12 13 14
3 12 13 11 3 12 15 13
3 14 13 12 3 0 16 3
3 14 15 13 3 16 4 3
3 16 15 14 3 16 7 4
3 16 17 15 3 8 12 11
3 18 17 16 3 8 17 12
3 18 19 17 3 17 18 12
3 20 19 18 3 18 15 12
3 20 21 19 3 0 19 16
3 22 21 20 3 20 7 16
3 22 23 21 3 21 7 20
3 24 23 22 3 21 8 7
3 24 25 23 3 21 17 8
3 26 25 24 3 21 22 17
3 26 27 25 3 23 15 18
3 28 27 26 3 0 24 19
3 28 29 27 3 24 21 19
3 30 29 28 3 24 25 21
3 30 31 29 3 25 22 21
3 32 31 30 3 25 23 22
3 33 31 32 3 25 26 23
3 33 34 31 3 26 27 23
3 35 34 33 3 27 15 23
3 35 36 34 3 24 28 25
3 37 36 35 3 28 29 25
3 37 38 36 3 30 31 26
3 39 40 41 3 31 27 26
3 42 38 37 3 0 32 24
3 42 43 38 3 33 29 28
3 44 43 42 3 30 34 31
3 44 45 43 3 35 15 27
3 46 45 44 3 0 36 32
3 46 47 45 3 36 33 32
3 48 47 46 3 36 37 33
3 37 29 33
3 30 38 34
3 38 35 34
3 38 39 35
3 39 15 35
3 0 40 36
3 41 29 37
3 30 42 38
3 43 15 39
3 0 44 40
3 44 41 40
3 44 29 41
3 30 43 42
3 30 45 43
3 45 15 43
3 44 30 29
3 44 45 30
3 0 46 44
3 47 45 44
3 48 49 47 3 48 49 47
3 50 49 48 3 49 45 47
3 50 51 49 3 48 50 49
3 52 51 50 3 51 15 45
3 52 53 51 3 0 52 46
3 54 53 52 3 52 48 46
3 52 53 48
3 53 50 48
3 52 54 53
3 54 55 53 3 54 55 53
3 56 55 54 3 56 50 53
3 56 57 55 3 57 50 56
3 58 57 56 3 57 58 50
3 59 39 60 3 58 51 50
3 59 40 39 3 58 59 51
3 0 7 6 3 59 15 51
3 0 5 7 3 0 60 52
3 61 55 54
3 57 62 58
3 63 15 59

View File

@@ -5,6 +5,11 @@ element vertex 97
property float x property float x
property float y property float y
property float z property float z
property float nx
property float ny
property float nz
property float s
property float t
property uchar red property uchar red
property uchar green property uchar green
property uchar blue property uchar blue
@@ -12,103 +17,103 @@ property uchar alpha
element face 160 element face 160
property list uchar uint vertex_indices property list uchar uint vertex_indices
end_header end_header
-0.828712 -0.553724 0.000000 255 255 255 255 0.828712 -0.553724 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.696734 -0.696731 0.000000 255 255 255 255 0.681950 -0.681947 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.819273 -0.547417 0.000000 255 255 255 255 0.801889 -0.535801 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.977535 0.194448 0.000000 255 255 255 255 -0.977535 0.194448 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.985334 0.000004 0.000000 255 255 255 255 -0.964426 0.000004 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.996686 0.000004 0.000000 255 255 255 255 -0.996686 0.000004 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.910327 -0.377066 0.000000 255 255 255 255 0.891011 -0.369065 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.920816 -0.381410 0.000000 255 255 255 255 0.920816 -0.381410 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.966401 -0.192225 0.000000 255 255 255 255 -0.945895 -0.188146 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.977535 -0.194439 0.000000 255 255 255 255 -0.977535 -0.194439 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.977532 -0.194439 0.000000 255 255 255 255 0.977532 -0.194439 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.966398 -0.192224 0.000000 255 255 255 255 0.945892 -0.188145 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.910330 -0.377066 0.000000 255 255 255 255 -0.891014 -0.369065 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.920818 -0.381411 0.000000 255 255 255 255 -0.920818 -0.381411 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.996683 0.000005 0.000000 255 255 255 255 0.996683 0.000005 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.985331 0.000005 0.000000 255 255 255 255 0.964423 0.000005 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.819275 -0.547417 0.000000 255 255 255 255 -0.801891 -0.535801 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.828714 -0.553724 0.000000 255 255 255 255 -0.828714 -0.553724 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.977532 0.194449 0.000000 255 255 255 255 0.977532 0.194449 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.966398 0.192234 0.000000 255 255 255 255 0.945892 0.188155 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.696737 -0.696731 0.000000 255 255 255 255 -0.681953 -0.681947 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.704764 -0.704759 0.000000 255 255 255 255 -0.704764 -0.704759 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.920815 0.381420 0.000000 255 255 255 255 0.920815 0.381420 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.910327 0.377075 0.000000 255 255 255 255 0.891010 0.369074 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.547423 -0.819270 0.000000 255 255 255 255 -0.535807 -0.801886 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.553730 -0.828709 0.000000 255 255 255 255 -0.553730 -0.828709 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.819272 0.547426 0.000000 255 255 255 255 0.801888 0.535811 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.828711 0.553733 0.000000 255 255 255 255 0.828711 0.553733 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.377072 -0.910325 0.000000 255 255 255 255 -0.369071 -0.891008 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.381416 -0.920813 0.000000 255 255 255 255 -0.381416 -0.920813 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.194445 0.977538 0.000000 255 255 255 255 -0.194445 0.977538 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.000002 0.985337 0.000000 255 255 255 255 -0.000002 0.964428 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.192230 0.966404 0.000000 255 255 255 255 -0.188151 0.945897 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.704760 0.704768 0.000000 255 255 255 255 0.704760 0.704768 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.696733 0.696740 0.000000 255 255 255 255 0.681949 0.681956 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.192230 -0.966396 0.000000 255 255 255 255 -0.188151 -0.945889 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.194445 -0.977530 0.000000 255 255 255 255 -0.194445 -0.977530 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.377072 0.910332 0.000000 255 255 255 255 -0.369071 0.891016 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.381416 0.920821 0.000000 255 255 255 255 -0.381416 0.920821 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.553726 0.828718 0.000000 255 255 255 255 0.553726 0.828718 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.547419 0.819279 0.000000 255 255 255 255 0.535803 0.801894 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.000001 -0.985329 0.000000 255 255 255 255 -0.000001 -0.964421 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.000001 -0.996681 0.000000 255 255 255 255 -0.000001 -0.996681 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.547423 0.819278 0.000000 255 255 255 255 -0.535807 0.801894 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.553730 0.828717 0.000000 255 255 255 255 -0.553730 0.828717 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.381412 0.920821 0.000000 255 255 255 255 0.381412 0.920821 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.377068 0.910333 0.000000 255 255 255 255 0.369066 0.891017 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.192228 -0.966396 0.000000 255 255 255 255 0.188149 -0.945889 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.194442 -0.977530 0.000000 255 255 255 255 0.194442 -0.977530 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.704764 0.704767 0.000000 255 255 255 255 -0.704764 0.704767 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.696737 0.696740 0.000000 255 255 255 255 -0.681953 0.681955 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.194441 0.977538 0.000000 255 255 255 255 0.194441 0.977538 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.192226 0.966404 0.000000 255 255 255 255 0.188147 0.945897 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.381414 -0.920812 0.000000 255 255 255 255 0.381414 -0.920812 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.377069 -0.910324 0.000000 255 255 255 255 0.369068 -0.891008 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.819275 0.547425 0.000000 255 255 255 255 -0.801891 0.535810 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.828714 0.553732 0.000000 255 255 255 255 -0.828714 0.553732 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.000001 0.996689 0.000000 255 255 255 255 -0.000001 0.996689 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.547421 -0.819269 0.000000 255 255 255 255 0.535805 -0.801885 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.553728 -0.828709 0.000000 255 255 255 255 0.553728 -0.828709 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.910330 0.377075 0.000000 255 255 255 255 -0.891014 0.369073 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.920818 0.381419 0.000000 255 255 255 255 -0.920818 0.381419 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.704762 -0.704758 0.000000 255 255 255 255 0.704762 -0.704758 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 255
0.966401 0.192233 0.000000 255 255 255 255 -0.945895 0.188154 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 255
-0.802883 -0.536465 0.000000 255 255 255 64 0.785846 -0.525082 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.892116 -0.369522 0.000000 255 255 255 64 0.873186 -0.361681 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.947068 -0.188379 0.000000 255 255 255 64 -0.926972 -0.184382 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.947065 -0.188378 0.000000 255 255 255 64 0.926969 -0.184381 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.892119 -0.369523 0.000000 255 255 255 64 -0.873189 -0.361682 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.965619 0.000005 0.000000 255 255 255 64 0.945129 0.000005 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.802886 -0.536466 0.000000 255 255 255 64 -0.785849 -0.525082 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.947065 0.188388 0.000000 255 255 255 64 0.926968 0.184391 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.682798 -0.682793 0.000000 255 255 255 64 -0.668310 -0.668304 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.892115 0.369532 0.000000 255 255 255 64 0.873185 0.361691 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.536471 -0.802880 0.000000 255 255 255 64 -0.525088 -0.785844 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.802882 0.536475 0.000000 255 255 255 64 0.785845 0.525092 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.369528 -0.892113 0.000000 255 255 255 64 -0.361687 -0.873183 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.000002 0.965624 0.000000 255 255 255 64 -0.000002 0.945134 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.188385 0.947070 0.000000 255 255 255 64 -0.184387 0.926974 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.682795 0.682802 0.000000 255 255 255 64 0.668306 0.668313 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.188385 -0.947062 0.000000 255 255 255 64 -0.184387 -0.926966 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.369528 0.892121 0.000000 255 255 255 64 -0.361687 0.873191 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.536467 0.802889 0.000000 255 255 255 64 0.525084 0.785852 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.000001 -0.965616 0.000000 255 255 255 64 -0.000001 -0.945127 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.536472 0.802888 0.000000 255 255 255 64 -0.525088 0.785852 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.369524 0.892122 0.000000 255 255 255 64 0.361683 0.873192 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.188382 -0.947062 0.000000 255 255 255 64 0.184385 -0.926966 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.682798 0.682801 0.000000 255 255 255 64 -0.668310 0.668312 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.188380 0.947071 0.000000 255 255 255 64 0.184383 0.926975 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.369526 -0.892113 0.000000 255 255 255 64 0.361685 -0.873183 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.802886 0.536474 0.000000 255 255 255 64 -0.785849 0.525090 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.536469 -0.802880 0.000000 255 255 255 64 0.525085 -0.785843 0.000000 -0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.892119 0.369531 0.000000 255 255 255 64 -0.873189 0.361690 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
-0.682796 -0.682792 0.000000 255 255 255 64 0.668307 -0.668304 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.947068 0.188387 0.000000 255 255 255 64 -0.926972 0.184390 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.965622 0.000004 0.000000 255 255 255 64 -0.945132 0.000004 0.000000 0.000000 0.000000 -1.000000 0.000000 0.000000 255 255 255 65
0.000002 0.000004 0.000000 255 255 255 64 -0.000002 0.000004 0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 255 255 255 65
3 0 1 2 3 0 1 2
3 3 4 5 3 3 4 5
3 0 6 7 3 0 6 7