4 #include <boost/algorithm/string.hpp> 5 #include <boost/lexical_cast.hpp> 66 std::ofstream file_stored(
m_fname.c_str());
197 , openGL[0] , openGL[1] , openGL[2] , openGL[3]
198 , openGL[4] , openGL[5] , openGL[6] , openGL[7]
199 , openGL[8] , openGL[9] , openGL[10] , openGL[11]
200 , openGL[12] , openGL[13] , openGL[14] , openGL[15]),_tag);
215 write(_s.getDiffuse(),root,
"diffuse");
216 write(_s.getSpecular(),root,
"specular");
217 write(_s.getAmbient(),root,
"ambient");
void writeToXML(const std::string &_s, const std::string &_tag)
Mat3 basic 3x3 matrix for certain glsl ops.
Generic Bezier Curve Class allowing the user to generate basic curves using a number of different con...
simple Vec2 encapsulates a 3 float object like glsl Vec2 but not maths use the Vec2 class for maths a...
rapidxml::xml_document m_doc
simple class to hold colour information and set the basic opengl colour state. also has overloaded me...
simple Vector class for OpenGL graphics, contains overloaded operators for most math functions...
Real m_r
red component of the colour tuple
Real m_b
blue component of the colour tuple
std::array< Real, 9 > m_openGL
The matrix in m_openGL 16 Real array format usefull for OpenGL fv formats mapped to m_m[][] elements ...
Ch * allocate_string(const Ch *source=0, std::size_t size=0)
Simple class to encapsulate OpenGL Light functions this will fill in the following structure...
std::string format(CStringRef format_str, ArgList args)
Real getZ() const noexcept
accesor for the z vector components
Real getNear() const noexcept
get the near clip value
An element node. Name contains element name. Value contains text of first data node.
virtual void read(AABB &_s)
read from an AABB must be overriden in child
Real getFar() const noexcept
get the far clip value
void append_attribute(xml_attribute< Ch > *attribute)
GLsizei const GLfloat * value
Real m_x
x component of the Vec2
Inherits from Camera and adds a path for both eye and look using two Bezier Curves.
simple Vec3 encapsulates a 3 float object like glsl vec3 but not maths use the Vec3 class for maths a...
Colour getSpecColour() const noexcept
returns the current light Specular colour
implementation files for RibExport class
Colour getColour() const noexcept
returns the current light colour
a simple mathmatical representation of a plane
Encapsulation of OpenGL spotlight inherits from the Light class.
PRECISION Real
create a variable called Real which is the main data type we use (GLfloat for most cases) ...
Real m_g
green component of the colour tuple
XMLSerializer(const std::string &_fname, ACCESSMODE _mode)
ctor, uses RAII to open the file, flag indicates if we have read or write mode
Vec4 getLook() const noexcept
get the look position
an encapsulation of an OpenGL Light
Real getX() const noexcept
accesor for the x vector components
Real m_y
y component of the Vec2
XML Serialization for NGL.
simple camera class to allow movement in an opengl scene. a lot of this stuff is from the HILL book C...
Real getS() const noexcept
accesor for the scalar part
Vec4 getUp() const noexcept
get the up vector
A declaration node. Name and value are empty. Declaration parameters (version, encoding and standalon...
void addNode(const std::string &_tag)
void append_node(xml_node< Ch > *child)
xml_node< Ch > * allocate_node(node_type type, const Ch *name=0, const Ch *value=0, std::size_t name_size=0, std::size_t value_size=0)
Real m_a
alpha the transparent element
Simple Bounding box class used in various parts of ngl and other example programs.
virtual ~XMLSerializer()
dtor will close the file
a simple camera class based on the Hill Book
virtual void write(const AABB &_s)
write from an AABB must be overriden in child
Matrix Class to do simple matrix operations included operator overloaded functions for maths and matr...
Vec4 getPos() const noexcept
returns the current light position as a Vector
Vec4 getEye() const noexcept
get the eye position
This file contains rapidxml printer implementation.
Real getY() const noexcept
accesor for the y vector components
Real m_w
w component 0 for vector 1 for point
xml_attribute< Ch > * allocate_attribute(const Ch *name=0, const Ch *value=0, std::size_t name_size=0, std::size_t value_size=0)
Real getFOV() const noexcept
get the fov value
rapidxml::xml_node * m_currentNode
GLsizei const GLchar *const * string
Real getAspect() const noexcept
get the aspect value
Real * openGL() noexcept
accesor to the openGL matrix