vrecko
virtual reality framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
vrecko
Vrecko - the Virtual Reality Engine
Dynamic Art module
L-system plant modeler - module for Vrecko
Head Up Display module
Space Partitioning - module for Vrecko
Todo List
Deprecated List
Namespaces
Classes
Files
File List
include
base
helpers
vrecko
vreckoAP
ArtificialWorld
behindO
Boids
CableEditor
CameraMovement
CameraPath
CarSim
ConnectEditor
ConstrainedMovement
DynamicArt
EditorController
EditorQAbilities
FFDEditor
AP_FFDEditor.h
EditorLogic.h
GeometryLoader.h
GeometryLoaderBase.h
Grid.h
Filter
games
Garden
GUI
HeadTracking
HelloWorld
HUD
InputConnector
LightsEditor
Menu
Nature
navigation
ObjectUtils
ODE
RoomEdit
ShootingSimulation
SpacePartitioning
TextOutput
vreckoDP
vreckoUtils
src
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
GeometryLoader.h
Go to the documentation of this file.
1
#ifndef GEOMETRY_LOADER_H
2
#define GEOMETRY_LOADER_H
3
#include <
vrecko/Ability.h
>
4
#include <osg/Node>
5
#include <osg/Geode>
6
#include <osg/Geometry>
7
8
using namespace
vrecko;
9
10
/*
11
This class load vertexarrays from osg node into structure
12
*/
13
14
namespace
APFFDEditor {
15
16
class
GeometryLoader
{
17
public
:
18
GeometryLoader
();
19
~
GeometryLoader
();
20
struct
Geometry
{
21
osg::Geometry *
SetNode
;
22
//osg::Vec3Array* pVertexArray;
23
osg::Vec3Array*
pVertexStartArray
;
24
osg::Vec3*
pVertexRelposition
;
25
osg::Matrix
transformMatrix
;
26
};
27
inline
Geometry
*
getGeometry
(
unsigned
long
index){
if
(geometryArray)
return
(&geometryArray[index]);
else
return
NULL;}
28
virtual
bool
loadGeometry(osg::Node *pNode);
29
unsigned
long
getGeometriesCount
(
void
){
return
geometries_count;}
30
protected
:
31
32
inline
void
allocateGeometryArray
(
int
count) {
33
geometryArray =
new
Geometry
[count]; geometries_count = count;
34
}
35
inline
void
deallocateGeometryArray
() {
if
(geometryArray) {
delete
[] (geometryArray); } }
36
Geometry
*
geometryArray
;
37
bool
loadGeometryHelper(osg::Node *pNode, osg::Matrix &transform,
unsigned
long
&geometry_pos);
38
bool
getOSGInitCounts(osg::Node *pNode,
unsigned
long
&pGeometriesCount);
39
virtual
void
destroyGeometry();
40
unsigned
long
geometries_count
;
41
42
};
43
44
}
45
46
#endif
include
vreckoAP
FFDEditor
GeometryLoader.h
Generated on Tue Feb 19 2013 10:23:43 for vrecko by
1.8.3.1