Ogre Procedural  0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
Classes | Public Member Functions | List of all members
Procedural::SvgLoader Class Reference

Load shapes from an SVG file. More...

#include <ProceduralSVG.h>

Public Member Functions

void parseSvgFile (MultiShape &out, const Ogre::String &fileName, const Ogre::String &groupName=Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, int segmentsNumber=8)
 Parses a SVG file. More...
 

Detailed Description

Load shapes from an SVG file.

Example:

// -- Extrude SVG primitive shapes
p.addPoint(0, 0, 0);
p.addPoint(0, 100, 0);
int nr = 1;
Procedural::SvgLoader svg("test.svg", "Essential", 16);
for(Procedural::SvgLoader::iterator svgShape = svg.begin(); svgShape != svg.end(); svgShape++)
{
putMesh2(svgShape->id, Ogre::Vector3(svgShape->position.x, 10, svgShape->position.y));
}

Member Function Documentation

◆ parseSvgFile()

void Procedural::SvgLoader::parseSvgFile ( MultiShape out,
const Ogre::String fileName,
const Ogre::String groupName = Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
int  segmentsNumber = 8 
)

Parses a SVG file.

Parameters
outMultiShape object where to store shapes from svg file
fileNameFilename of svg file
groupNameResource group where svg file is listed
segmentsNumberNumber of segments for curves

The documentation for this class was generated from the following file:
Procedural::Path
Definition: ProceduralPath.h:53
Procedural::SvgLoader
Load shapes from an SVG file.
Definition: ProceduralSVG.h:67
Procedural::MeshGenerator::setScale
T & setScale(const Ogre::Vector3 &scale)
Sets a scale baked into the resulting mesh.
Definition: ProceduralMeshGenerator.h:218
Procedural::Extruder::setExtrusionPath
Extruder & setExtrusionPath(const Path *extrusionPath)
Sets the extrusion path.
Definition: ProceduralExtruder.h:94
Procedural::Extruder::setShapeToExtrude
Extruder & setShapeToExtrude(const Shape *shapeToExtrude)
Sets the shape to extrude.
Definition: ProceduralExtruder.h:78
Procedural::Extruder
Extrudes a 2D shape along a path to build an extruded mesh.
Definition: ProceduralExtruder.h:50
Procedural::Path::addPoint
Path & addPoint(const Ogre::Vector3 &pt)
Adds a point to the path, as a Vector3.
Definition: ProceduralPath.h:62
Procedural::MeshGenerator::realizeMesh
Ogre::MeshPtr realizeMesh(const std::string &name="", const Ogre::String &group="General")
Builds a mesh.
Definition: ProceduralMeshGenerator.h:110
Vector< 3, Real >