Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
Cone.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
12class _XGL_CLASS Cone final : public TVertexArray<VertexArrayBase::vmPosition | VertexArrayBase::vmNormal>
13{
14 public:
15 // Use the constructors from the base class.
16 using TVertexArray::TVertexArray;
17
22 {
24 float height;
26 float angle;
28 int lines;
30 int slices;
31 } parameters{0.5f, 30, 40, 10};
32
33 protected:
37 void generate() override;
38};
39
40}// namespace sf::xgl
Class to render a cone in OpenGL. Height of the cone is along the Z-axis where the tip is at (0,...
Definition Cone.h:13
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 Cone.h:22
int slices
Definition Cone.h:30
int lines
Definition Cone.h:28
float height
Definition Cone.h:24
float angle
Definition Cone.h:26
#define _XGL_CLASS
Definition xgl/global.h:35