Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
Sphere.h
Go to the documentation of this file.
1#pragma once
2#include <xgl/TVertexArray.h>
3#include <xgl/global.h>
4
5namespace sf::xgl
6{
7
13class _XGL_CLASS Sphere final : public TVertexArray<VertexArrayBase::vmPosition | VertexArrayBase::vmNormal>
14{
15 public:
20 {
24 float radius;
26 unsigned stacks;
28 unsigned sectors;
32 bool triangles{true};
33 } parameters;
37 explicit Sphere(ShaderProgram* sp);
38
39 protected:
43 void generate() override;
44};
45
46}// namespace sf::xgl
Shader program having a default vertex and fragment shader.
Definition ShaderProgram.h:13
Class to render a sphere in OpenGL. Center of the sphere is in (0,0,0). Has a single color.
Definition Sphere.h:14
Sphere(ShaderProgram *sp)
Qt constructor only accepting a shader program.
void generate() override
Overridden from base class.
OpenGL base class and wrapper template for vertex arrays. Automates most of the things needed for pri...
Definition TVertexArray.h:20
Definition DemoRenderer.h:6
Parameters for generating the data.
Definition Sphere.h:20
float radius
Definition Sphere.h:24
int stacks_used
Definition Sphere.h:30
unsigned sectors
Definition Sphere.h:28
unsigned stacks
Definition Sphere.h:26
#define _XGL_CLASS
Definition xgl/global.h:35