shattered_ogrerb 0.5.0.1 → 0.5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shattered_ogrerb/mesh_instance.rb +9 -0
- data/vendor/Navi/js3250.dll +0 -0
- data/vendor/Navi/nspr4.dll +0 -0
- data/vendor/Navi/plc4.dll +0 -0
- data/vendor/Navi/plds4.dll +0 -0
- data/vendor/Navi/xpcom.dll +0 -0
- data/vendor/Navi/xul.dll +0 -0
- data/vendor/ogrerb/CHANGELOG +7 -0
- data/vendor/ogrerb/README +7 -2
- data/vendor/ogrerb/Rakefile +98 -10
- data/vendor/ogrerb/build/ogre/extconf.rb +6 -0
- data/vendor/ogrerb/build/ois/extconf.rb +8 -1
- data/vendor/ogrerb/doc_src/ogre.rb +97 -3
- data/vendor/ogrerb/lib/OIS.so +0 -0
- data/vendor/ogrerb/{samples → lib}/application.rb +0 -0
- data/vendor/ogrerb/{samples → lib}/application_frame_listener.rb +1 -1
- data/vendor/ogrerb/{samples → lib}/application_loading_bar.rb +12 -12
- data/vendor/ogrerb/lib/constants.rb +16 -0
- data/vendor/ogrerb/lib/method_fixes.rb +42 -0
- data/vendor/ogrerb/lib/navi.dll +0 -0
- data/vendor/ogrerb/lib/ogre.dll +0 -0
- data/vendor/ogrerb/lib/ogre.so +0 -0
- data/vendor/ogrerb/lib/ruby_ois.dll +0 -0
- data/vendor/ogrerb/lib/ruby_ois.so +0 -0
- data/vendor/ogrerb/ogre/OgreAxisAlignedBox.i +6 -0
- data/vendor/ogrerb/ogre/OgreHardwareIndexBuffer.i +14 -0
- data/vendor/ogrerb/ogre/OgreHardwareVertexBuffer.i +33 -1
- data/vendor/ogrerb/ogre/OgreMaterialManager.i +1 -1
- data/vendor/ogrerb/ogre/OgreMesh.i +32 -0
- data/vendor/ogrerb/ogre/OgreQuaternion.i +5 -0
- data/vendor/ogrerb/ogre/OgreRenderSystemCapabilities.i +4 -0
- data/vendor/ogrerb/ogre/OgreShadowTextureManager.i +6 -1
- data/vendor/ogrerb/ogre/OgreStaticGeometry.i +272 -0
- data/vendor/ogrerb/ogre/OgreStringVector.i +20 -0
- data/vendor/ogrerb/ogre/OgreSubMesh.i +4 -0
- data/vendor/ogrerb/ogre/OgreTextureUnitState.i +3 -0
- data/vendor/ogrerb/ogre/OgreVector4.i +4 -0
- data/vendor/ogrerb/ogre/ogre_rb.i +26 -18
- data/vendor/ogrerb/ogre.rb +5 -3
- data/vendor/ogrerb/samples/bsp.rb +2 -0
- data/vendor/ogrerb/samples/cel_shading.rb +85 -0
- data/vendor/ogrerb/samples/grass.rb +325 -0
- data/vendor/ogrerb/samples/lighting.rb +2 -0
- data/vendor/ogrerb/samples/media/materials/programs/CelShading.cg +63 -0
- data/vendor/ogrerb/samples/media/materials/programs/Grass.cg +30 -0
- data/vendor/ogrerb/samples/media/materials/programs/OffsetMapping.cg +97 -0
- data/vendor/ogrerb/samples/media/materials/programs/OffsetMapping.hlsl +135 -0
- data/vendor/ogrerb/samples/media/materials/programs/OffsetMappingFp.glsl +69 -0
- data/vendor/ogrerb/samples/media/materials/programs/OffsetMappingVp.glsl +54 -0
- data/vendor/ogrerb/samples/media/materials/programs/OffsetMapping_specular.asm +44 -0
- data/vendor/ogrerb/samples/media/materials/scripts/CelShading.material +68 -0
- data/vendor/ogrerb/samples/media/materials/scripts/CubeMapping.material +34 -0
- data/vendor/ogrerb/samples/media/materials/scripts/Grass.material +63 -0
- data/vendor/ogrerb/samples/media/materials/scripts/Offset.material +124 -0
- data/vendor/ogrerb/samples/media/materials/scripts/RZR-002.material +15 -0
- data/vendor/ogrerb/samples/media/materials/textures/RZR-002.png +0 -0
- data/vendor/ogrerb/samples/media/materials/textures/cel_shading_diffuse.png +0 -0
- data/vendor/ogrerb/samples/media/materials/textures/cel_shading_edge.png +0 -0
- data/vendor/ogrerb/samples/media/materials/textures/cel_shading_specular.png +0 -0
- data/vendor/ogrerb/samples/media/materials/textures/gras_02.png +0 -0
- data/vendor/ogrerb/samples/media/materials/textures/grass_1024.jpg +0 -0
- data/vendor/ogrerb/samples/media/materials/textures/rockwall.tga +0 -0
- data/vendor/ogrerb/samples/media/materials/textures/rockwall_NH.tga +0 -0
- data/vendor/ogrerb/samples/media/models/RZR-002.mesh +0 -0
- data/vendor/ogrerb/samples/media/models/geosphere4500.mesh +0 -0
- data/vendor/ogrerb/samples/media/models/geosphere8000.mesh +0 -0
- data/vendor/ogrerb/samples/media/models/sphere.mesh +0 -0
- data/vendor/ogrerb/samples/media/overlays/CubeMapping.overlay +139 -0
- data/vendor/ogrerb/samples/media.cfg +22 -0
- data/vendor/ogrerb/samples/plugins.cfg +1 -0
- data/vendor/ogrerb/samples/render_to_texture.rb +2 -0
- data/vendor/ogrerb/samples/resources.cfg +2 -0
- data/vendor/ogrerb/samples/sky_box.rb +2 -0
- data/vendor/ogrerb/samples/sky_dome.rb +2 -0
- data/vendor/ogrerb/samples/sky_plane.rb +3 -0
- data/vendor/ogrerb/samples/smoke.rb +2 -0
- data/vendor/ogrerb/samples/work/cube_mapping.rb +686 -0
- data/vendor/ogrerb/src_headers/wrappers/IndexBufferProxy.h +49 -0
- data/vendor/ogrerb/src_headers/wrappers/StaticGeometryProxies.h +867 -0
- data/vendor/ogrerb/src_headers/wrappers/VertexBufferProxy.h +245 -0
- data/vendor/ogrerb/website/index.html +9 -0
- metadata +54 -6
@@ -2,6 +2,11 @@
|
|
2
2
|
#include "OgreShadowTextureManager.h"
|
3
3
|
%}
|
4
4
|
|
5
|
-
|
5
|
+
namespace Ogre {
|
6
|
+
%template() Singleton<Ogre::ShadowTextureManager>;
|
7
|
+
|
8
|
+
%ignore ShadowTextureManager::operator==;
|
9
|
+
%ignore ShadowTextureManager::operator!=;
|
10
|
+
}
|
6
11
|
|
7
12
|
%include "OgreShadowTextureManager.h"
|
@@ -1,5 +1,277 @@
|
|
1
1
|
%{
|
2
2
|
#include "OgreStaticGeometry.h"
|
3
|
+
#include "StaticGeometryProxies.h"
|
3
4
|
%}
|
4
5
|
|
6
|
+
namespace Ogre {
|
7
|
+
// Custom wrapped below
|
8
|
+
%ignore StaticGeometry::RegionIterator;
|
9
|
+
%ignore StaticGeometry::getRegionIterator;
|
10
|
+
}
|
11
|
+
|
5
12
|
%include "OgreStaticGeometry.h"
|
13
|
+
|
14
|
+
namespace Ogre {
|
15
|
+
|
16
|
+
/****************************************************/
|
17
|
+
/* Many thanks to OgreDotNet for the following code */
|
18
|
+
/****************************************************/
|
19
|
+
|
20
|
+
class SGSubMeshLodGeometryLink;
|
21
|
+
class SGSubMeshLodGeometryLinkList;
|
22
|
+
class SGQueuedSubMesh;
|
23
|
+
class SGQueuedGeometry;
|
24
|
+
|
25
|
+
class SGLODBucketVectorIterator;
|
26
|
+
class SGMaterialBucketMapIterator;
|
27
|
+
class SGGeometryBucketVectorIterator;
|
28
|
+
|
29
|
+
class SGGeometryBucket;
|
30
|
+
class SGMaterialBucket;
|
31
|
+
class SGLODBucket;
|
32
|
+
class SGRegion;
|
33
|
+
|
34
|
+
class SGSubMeshLodGeometryLink
|
35
|
+
{
|
36
|
+
public:
|
37
|
+
SGSubMeshLodGeometryLink();
|
38
|
+
virtual ~SGSubMeshLodGeometryLink();
|
39
|
+
|
40
|
+
VertexData* getVertexData();
|
41
|
+
void setVertexData(VertexData* value);
|
42
|
+
IndexData* getIndexData();
|
43
|
+
void setIndexData(IndexData* value);
|
44
|
+
};
|
45
|
+
|
46
|
+
|
47
|
+
class SGSubMeshLodGeometryLinkList
|
48
|
+
{
|
49
|
+
public:
|
50
|
+
SGSubMeshLodGeometryLinkList();
|
51
|
+
virtual ~SGSubMeshLodGeometryLinkList();
|
52
|
+
|
53
|
+
size_t size();
|
54
|
+
void addItem(SGSubMeshLodGeometryLink *pnewItem);
|
55
|
+
SGSubMeshLodGeometryLink *getFirst();
|
56
|
+
SGSubMeshLodGeometryLink *getLast();
|
57
|
+
SGSubMeshLodGeometryLink *getByIndex(int index);
|
58
|
+
};
|
59
|
+
|
60
|
+
|
61
|
+
//----------------------------------------------------------------
|
62
|
+
// custom code to handle StaticGeometry::QueuedSubMesh
|
63
|
+
class SGQueuedSubMesh
|
64
|
+
{
|
65
|
+
public:
|
66
|
+
SGQueuedSubMesh();
|
67
|
+
virtual ~SGQueuedSubMesh();
|
68
|
+
|
69
|
+
SubMesh* getSubmesh();
|
70
|
+
void setSubmesh(SubMesh* value);
|
71
|
+
SGSubMeshLodGeometryLinkList* getGeometryLodList();
|
72
|
+
void setGeometryLodList(SGSubMeshLodGeometryLinkList* value);
|
73
|
+
const String& getMaterialName();
|
74
|
+
void setMaterialName(const String& value);
|
75
|
+
const Vector3& getPosition();
|
76
|
+
void setPosition(const Vector3& value);
|
77
|
+
const Quaternion& getOrientation();
|
78
|
+
void setOrientation(const Quaternion& value);
|
79
|
+
const Vector3& getScale();
|
80
|
+
void setScale(const Vector3& value);
|
81
|
+
AxisAlignedBox* getWorldBounds();
|
82
|
+
};
|
83
|
+
|
84
|
+
|
85
|
+
/// Structure recording a queued geometry for low level builds
|
86
|
+
class SGQueuedGeometry
|
87
|
+
{
|
88
|
+
public:
|
89
|
+
SGQueuedGeometry();
|
90
|
+
virtual ~SGQueuedGeometry();
|
91
|
+
|
92
|
+
SGSubMeshLodGeometryLink* getGeometry();
|
93
|
+
void setGeometry(SGSubMeshLodGeometryLink* value);
|
94
|
+
const Vector3& getPosition();
|
95
|
+
void setPosition(const Vector3& value);
|
96
|
+
const Quaternion& getOrientation();
|
97
|
+
void setOrientation(const Quaternion& value);
|
98
|
+
const Vector3& getScale();
|
99
|
+
void setScale(const Vector3& value);
|
100
|
+
};
|
101
|
+
|
102
|
+
|
103
|
+
class SGLODBucketVectorIterator
|
104
|
+
{
|
105
|
+
public:
|
106
|
+
//SGLODBucketVectorIterator();
|
107
|
+
virtual ~SGLODBucketVectorIterator();
|
108
|
+
bool hasMoreElements(void) const;
|
109
|
+
void moveNext(void);
|
110
|
+
SGLODBucket *peekNext(void);
|
111
|
+
SGLODBucket *getNext(void);
|
112
|
+
SGLODBucket *next();
|
113
|
+
};
|
114
|
+
|
115
|
+
|
116
|
+
class SGMaterialBucketMapIterator
|
117
|
+
{
|
118
|
+
public:
|
119
|
+
//SGMaterialBucketMapIterator();
|
120
|
+
virtual ~SGMaterialBucketMapIterator();
|
121
|
+
bool hasMoreElements(void) const;
|
122
|
+
void moveNext(void);
|
123
|
+
const String& peekNextKey(void);
|
124
|
+
SGMaterialBucket* peekNextValue(void);
|
125
|
+
SGMaterialBucket* getNext(void);
|
126
|
+
SGMaterialBucket* next();
|
127
|
+
};
|
128
|
+
|
129
|
+
|
130
|
+
class SGGeometryBucketVectorIterator
|
131
|
+
{
|
132
|
+
public:
|
133
|
+
//SGGeometryBucketVectorIterator();
|
134
|
+
virtual ~SGGeometryBucketVectorIterator();
|
135
|
+
bool hasMoreElements(void) const;
|
136
|
+
void moveNext(void);
|
137
|
+
SGGeometryBucket *peekNext(void);
|
138
|
+
SGGeometryBucket *getNext(void);
|
139
|
+
SGGeometryBucket *next();
|
140
|
+
};
|
141
|
+
|
142
|
+
|
143
|
+
//----------------------------------------------------------------
|
144
|
+
// custom code to handle StaticGeometry::GeometryBucket
|
145
|
+
class SGGeometryBucket //StaticGeometry::GeometryBucket is a Renderable
|
146
|
+
{
|
147
|
+
public:
|
148
|
+
SGGeometryBucket(SGMaterialBucket* parent, const String& formatString, const VertexData* vData, const IndexData* iData);
|
149
|
+
virtual ~SGGeometryBucket();
|
150
|
+
|
151
|
+
Ogre::Renderable * asRenderable();
|
152
|
+
SGMaterialBucket* getParent(void);
|
153
|
+
const VertexData* getVertexData(void) const;
|
154
|
+
const IndexData* getIndexData(void) const;
|
155
|
+
const MaterialPtr& getMaterial(void) const;
|
156
|
+
Technique* getTechnique(void) const;
|
157
|
+
|
158
|
+
//########## RenderOperation access
|
159
|
+
//because RenderOperation is not exported use these to access its fields
|
160
|
+
const Renderable * GetRO_Renderable();
|
161
|
+
IndexData * GetRO_IndexData();
|
162
|
+
void SetRO_IndexData(IndexData * v);
|
163
|
+
bool GetRO_UseIndexes();
|
164
|
+
void SetRO_UseIndexes(bool v);
|
165
|
+
int GetRO_OperationType();
|
166
|
+
void SetRO_OperationType(int v);
|
167
|
+
VertexData * GetRO_VertexData();
|
168
|
+
void SetRO_VertexData(VertexData * v);
|
169
|
+
//########## RenderOperation access
|
170
|
+
|
171
|
+
void getWorldTransforms(Matrix4* xform) const;
|
172
|
+
const Quaternion& getWorldOrientation(void) const;
|
173
|
+
const Vector3& getWorldPosition(void) const;
|
174
|
+
Real getSquaredViewDepth(const Camera* cam) const;
|
175
|
+
const LightList& getLights(void) const;
|
176
|
+
bool getCastsShadows(void) const;
|
177
|
+
bool assign(SGQueuedGeometry* qsm);
|
178
|
+
void build(bool stencilShadows);
|
179
|
+
};
|
180
|
+
|
181
|
+
|
182
|
+
// class _OgreExport MaterialBucket
|
183
|
+
class SGMaterialBucket
|
184
|
+
{
|
185
|
+
public:
|
186
|
+
SGMaterialBucket(SGLODBucket* parent, const String& materialName);
|
187
|
+
virtual ~SGMaterialBucket();
|
188
|
+
|
189
|
+
SGLODBucket* getParent(void);
|
190
|
+
const String& getMaterialName(void) const;
|
191
|
+
void assign(SGQueuedGeometry* qsm);
|
192
|
+
void build(bool stencilShadows);
|
193
|
+
void addRenderables(RenderQueue* queue, RenderQueueGroupID group, Real camSquaredDist);
|
194
|
+
const MaterialPtr& getMaterial(void) const;
|
195
|
+
SGGeometryBucketVectorIterator* getGeometryIterator(void);
|
196
|
+
Technique* getCurrentTechnique(void) const;
|
197
|
+
};
|
198
|
+
|
199
|
+
|
200
|
+
// class _OgreExport LODBucket
|
201
|
+
class SGLODBucket
|
202
|
+
{
|
203
|
+
public:
|
204
|
+
SGLODBucket(SGRegion* parent, unsigned short lod, Real lodDist);
|
205
|
+
virtual ~SGLODBucket();
|
206
|
+
|
207
|
+
SGRegion* getParent(void);
|
208
|
+
|
209
|
+
SGMaterialBucketMapIterator* getMaterialIterator(void);
|
210
|
+
unsigned short getLod(void) const;
|
211
|
+
Real getSquaredDistance(void) const;
|
212
|
+
void assign(SGQueuedSubMesh* qsm, unsigned short atLod);
|
213
|
+
void build(bool stencilShadows);
|
214
|
+
void addRenderables(RenderQueue* queue, RenderQueueGroupID group, Real camSquaredDistance);
|
215
|
+
};
|
216
|
+
|
217
|
+
|
218
|
+
//----------------------------------------------------------------
|
219
|
+
// custom code to handle StaticGeometry::Region
|
220
|
+
class SGRegion //StaticGeometry::Region is a MovableObject
|
221
|
+
{
|
222
|
+
public:
|
223
|
+
SGRegion(StaticGeometry* parent, const String& name, SceneManager* mgr, uint32 regionID, const Vector3& centre);
|
224
|
+
virtual ~SGRegion();
|
225
|
+
|
226
|
+
Ogre::MovableObject * asMovableObject();
|
227
|
+
|
228
|
+
StaticGeometry* getParent(void) const;
|
229
|
+
void assign(SGQueuedSubMesh* qmesh);
|
230
|
+
void build(bool stencilShadows);
|
231
|
+
uint32 getID(void) const;
|
232
|
+
const Vector3& getCentre(void) const;
|
233
|
+
const String& getName(void) const;
|
234
|
+
const String& getMovableType(void) const;
|
235
|
+
void _notifyCurrentCamera(Camera* cam);
|
236
|
+
const AxisAlignedBox& getBoundingBox(void) const;
|
237
|
+
Real getBoundingRadius(void) const;
|
238
|
+
void _updateRenderQueue(RenderQueue* queue);
|
239
|
+
bool isVisible(void) const;
|
240
|
+
SGLODBucketVectorIterator * getLodIterator(void);
|
241
|
+
|
242
|
+
Ogre::ShadowCaster::ShadowRenderableListIterator getShadowVolumeRenderableIterator(
|
243
|
+
ShadowTechnique shadowTechnique, const Light* light,
|
244
|
+
HardwareIndexBufferSharedPtr* indexBuffer,
|
245
|
+
bool extrudeVertices, Real extrusionDistance, unsigned long flags = 0 );
|
246
|
+
};
|
247
|
+
|
248
|
+
|
249
|
+
class SGRegionMapIterator
|
250
|
+
{
|
251
|
+
public:
|
252
|
+
//SGRegionMapIterator();
|
253
|
+
virtual ~SGRegionMapIterator();
|
254
|
+
bool hasMoreElements(void) const;
|
255
|
+
void moveNext(void);
|
256
|
+
uint32 peekNextKey(void);
|
257
|
+
SGRegion* peekNextValue(void);
|
258
|
+
SGRegion* getNext(void);
|
259
|
+
SGRegion* next();
|
260
|
+
};
|
261
|
+
}
|
262
|
+
|
263
|
+
%extend Ogre::StaticGeometry {
|
264
|
+
Ogre::SGRegionMapIterator* get_region_iterator() {
|
265
|
+
Ogre::StaticGeometry::RegionIterator * jresult;
|
266
|
+
|
267
|
+
//typedef std::map<uint32, Region*> RegionMap;
|
268
|
+
//typedef MapIterator<RegionMap> RegionIterator;
|
269
|
+
SwigValueWrapper<Ogre::MapIterator<std::map<Ogre::uint32, Ogre::StaticGeometry::Region * > > > result;
|
270
|
+
|
271
|
+
result = self->getRegionIterator();
|
272
|
+
jresult = new Ogre::StaticGeometry::RegionIterator((Ogre::StaticGeometry::RegionIterator &)result);
|
273
|
+
|
274
|
+
return new Ogre::SGRegionMapIterator( jresult );
|
275
|
+
}
|
276
|
+
};
|
277
|
+
|
@@ -2,4 +2,24 @@
|
|
2
2
|
#include "OgreStringVector.h"
|
3
3
|
%}
|
4
4
|
|
5
|
+
%{
|
6
|
+
typedef std::vector<String> StringVector;
|
7
|
+
%}
|
8
|
+
|
9
|
+
%template(StringVector) std::vector<String>;
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Turn StringVectors into normal Ruby arrays
|
13
|
+
*/
|
14
|
+
%typemap(out) Ogre::StringVector {
|
15
|
+
VALUE arr = rb_ary_new();
|
16
|
+
|
17
|
+
int size = $1.size();
|
18
|
+
for(int i = 0; i < size; i++) {
|
19
|
+
rb_ary_push(arr, rb_str_new2($1[i].c_str()));
|
20
|
+
}
|
21
|
+
|
22
|
+
$result = arr;
|
23
|
+
}
|
24
|
+
|
5
25
|
%include "OgreStringVector.h"
|
@@ -7,6 +7,9 @@
|
|
7
7
|
namespace Ogre {
|
8
8
|
%ignore TextureUnitState::addEffect;
|
9
9
|
%ignore TextureUnitState::removeEffect;
|
10
|
+
|
11
|
+
// Weird arguments here
|
12
|
+
%ignore TextureUnitState::setCubicTextureName( const String* const names, bool forUVW = false );
|
10
13
|
}
|
11
14
|
|
12
15
|
%include "OgreTextureUnitState.h"
|
@@ -56,7 +56,6 @@ using namespace Ogre;
|
|
56
56
|
$1 = new Ogre::UTFString(STR2CSTR($input));
|
57
57
|
}
|
58
58
|
|
59
|
-
|
60
59
|
// Ignore operators
|
61
60
|
%ignore *::operator=;
|
62
61
|
%ignore *::operator[];
|
@@ -65,11 +64,16 @@ using namespace Ogre;
|
|
65
64
|
%ignore *::operator/=;
|
66
65
|
%ignore *::operator*=;
|
67
66
|
%ignore *::operator-=;
|
67
|
+
// These sneak in from ShadowTextureManager, and are a
|
68
|
+
// part of the Ogre namespace. If you do not ignore them it will
|
69
|
+
// not work on POSIX systems like the mac.
|
70
|
+
%ignore Ogre::operator==;
|
71
|
+
%ignore Ogre::operator!=;
|
68
72
|
|
69
73
|
// we know that "Nested struct not currently supported (ignored)."
|
70
74
|
//#pragma SWIG nowarn=312
|
71
75
|
|
72
|
-
// std library typemaps
|
76
|
+
// std library typemaps
|
73
77
|
%include std_string.i
|
74
78
|
%include std_vector.i
|
75
79
|
%include std_pair.i
|
@@ -79,6 +83,7 @@ using namespace Ogre;
|
|
79
83
|
/** Templates, iterators, etc */
|
80
84
|
%include OgreSingleton.i
|
81
85
|
%include OgreIteratorWrappers.i
|
86
|
+
//%include OgreTypemaps.i
|
82
87
|
%include OgreBlendMode.i
|
83
88
|
|
84
89
|
/** Base classes */
|
@@ -89,6 +94,7 @@ using namespace Ogre;
|
|
89
94
|
// %include OgreStdHeaders.i
|
90
95
|
%include OgreString.i
|
91
96
|
%include OgreStringInterface.i
|
97
|
+
%include OgreStringVector.i
|
92
98
|
%include OgreConfigFile.i
|
93
99
|
%include OgreController.i
|
94
100
|
%include OgreSharedPtr.i
|
@@ -100,28 +106,40 @@ using namespace Ogre;
|
|
100
106
|
// %include OgreNumerics.i
|
101
107
|
// %include OgreVector2.i
|
102
108
|
%include OgreVector3.i
|
103
|
-
|
104
|
-
|
109
|
+
%include OgreVector4.i
|
110
|
+
%include OgreQuaternion.i
|
105
111
|
// %include OgreRadixSort.i
|
106
112
|
// %include OgreRotationalSpline.i
|
107
113
|
// %include OgreSimpleSpline.i
|
114
|
+
%include OgreAxisAlignedBox.i
|
108
115
|
%include OgreColourValue.i
|
109
116
|
|
110
|
-
/** Resource
|
117
|
+
/** Resource Management */
|
111
118
|
%include OgreScriptLoader.i
|
112
119
|
%include OgreResource.i
|
113
120
|
%include OgreResourceManager.i
|
114
121
|
%include OgreResourceGroupManager.i
|
115
122
|
%include OgreShadowTextureManager.i
|
116
123
|
%include OgreMeshManager.i
|
124
|
+
%include OgreDataStream.i
|
117
125
|
%include OgreMaterial.i
|
118
126
|
%include OgreMaterialManager.i
|
119
127
|
|
128
|
+
/** Hardware buffers */
|
129
|
+
%include OgreHardwareBuffer.i
|
130
|
+
%include OgreHardwareIndexBuffer.i
|
131
|
+
%include OgreHardwareOcclusionQuery.i
|
132
|
+
%include OgreHardwarePixelBuffer.i
|
133
|
+
%include OgreHardwareVertexBuffer.i
|
134
|
+
%include OgreHardwareBufferManager.i
|
135
|
+
|
120
136
|
/** Mesh */
|
137
|
+
%include OgreVertexIndexData.i
|
121
138
|
%include OgreMesh.i
|
122
139
|
%include OgrePatchMesh.i
|
123
|
-
%include
|
140
|
+
%include OgreSubMesh.i
|
124
141
|
%include OgreAnimable.i
|
142
|
+
%include OgreStaticGeometry.i
|
125
143
|
|
126
144
|
/** Animation */
|
127
145
|
%include OgreKeyFrame.i
|
@@ -141,6 +159,7 @@ using namespace Ogre;
|
|
141
159
|
%include OgreSceneManager.i
|
142
160
|
%include OgreSceneManagerEnumerator.i
|
143
161
|
// %include OgreAny.i
|
162
|
+
%include OgreSubEntity.i
|
144
163
|
%include OgreEntity.i
|
145
164
|
%include OgreFrustum.i
|
146
165
|
%include OgreCamera.i
|
@@ -165,7 +184,6 @@ using namespace Ogre;
|
|
165
184
|
// %include OgreProfiler.i
|
166
185
|
%include OgreTimer.i
|
167
186
|
// %include OgreStringConverter.i
|
168
|
-
// %include OgreStringVector.i
|
169
187
|
// %include OgreZip.i
|
170
188
|
%include OgreViewport.i
|
171
189
|
%include OgreRoot.i
|
@@ -215,12 +233,6 @@ using namespace Ogre;
|
|
215
233
|
%include OgreRenderSystem.i
|
216
234
|
%include OgreRenderTargetListener.i
|
217
235
|
%include OgreRenderTexture.i
|
218
|
-
%include OgreHardwareBuffer.i
|
219
|
-
%include OgreHardwareBufferManager.i
|
220
|
-
%include OgreHardwareIndexBuffer.i
|
221
|
-
%include OgreHardwareOcclusionQuery.i
|
222
|
-
%include OgreHardwarePixelBuffer.i
|
223
|
-
%include OgreHardwareVertexBuffer.i
|
224
236
|
|
225
237
|
/** Overlays */
|
226
238
|
%include OgreWindowEventUtilities.i
|
@@ -252,15 +264,11 @@ using namespace Ogre;
|
|
252
264
|
// %include OgreSkeletonManager.i
|
253
265
|
// %include OgreSkeletonSerializer.i
|
254
266
|
// %include OgreProgressiveMesh.i
|
255
|
-
// %include OgreSubEntity.i
|
256
|
-
// %include OgreSubMesh.i
|
257
267
|
// %include OgreTagPoint.i
|
258
268
|
// %include OgreVertexBoneAssignment.i
|
259
|
-
// %include OgreVertexIndexData.i
|
260
269
|
// %include OgreWireBoundingBox.i
|
261
270
|
|
262
271
|
/** Scene objects */
|
263
|
-
// %include OgreAxisAlignedBox.i
|
264
272
|
// %include OgreConvexBody.i
|
265
273
|
// %include OgreInstancedGeometry.i
|
266
274
|
// %include OgrePolygon.i
|
@@ -280,7 +288,6 @@ using namespace Ogre;
|
|
280
288
|
// %include OgreArchive.i
|
281
289
|
// %include OgreArchiveManager.i
|
282
290
|
// %include OgreCodec.i
|
283
|
-
%include OgreDataStream.i
|
284
291
|
// %include OgreDDSCodec.i
|
285
292
|
// %include OgreDynLib.i
|
286
293
|
// %include OgreDynLibManager.i
|
@@ -341,3 +348,4 @@ using namespace Ogre;
|
|
341
348
|
|
342
349
|
|
343
350
|
|
351
|
+
|
data/vendor/ogrerb/ogre.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
require File.dirname(__FILE__)+'/platform'
|
2
2
|
|
3
|
-
# Ruby always looks for .so first, instead of .dll if on windows.
|
4
|
-
# So, force .dll on windows environments
|
5
3
|
$LOAD_PATH << File.expand_path(File.dirname(__FILE__))
|
4
|
+
$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/lib")
|
6
5
|
|
6
|
+
# Ruby always looks for .so first, instead of .dll if on windows.
|
7
|
+
# So, force .dll on windows environments
|
7
8
|
if Platform.windows?
|
8
9
|
require 'lib/ogre.dll'
|
9
10
|
require 'lib/ruby_ois.dll'
|
@@ -20,4 +21,5 @@ module OIS
|
|
20
21
|
include Ruby_ois
|
21
22
|
end
|
22
23
|
|
23
|
-
require '
|
24
|
+
require 'constants'
|
25
|
+
require 'method_fixes'
|
@@ -0,0 +1,85 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
|
3
|
+
$: << File.dirname(__FILE__) + "/.."
|
4
|
+
require 'ogre'
|
5
|
+
require 'application'
|
6
|
+
include Ogre
|
7
|
+
|
8
|
+
CUSTOM_SHININESS = 1
|
9
|
+
CUSTOM_DIFFUSE = 2
|
10
|
+
CUSTOM_SPECULAR = 3
|
11
|
+
|
12
|
+
class SkyDomeListener < ApplicationFrameListener
|
13
|
+
def initialize(root, window, camera, scene_manager)
|
14
|
+
super(root, window, camera)
|
15
|
+
@scene_manager = scene_manager
|
16
|
+
@curvature = 1
|
17
|
+
@tiling = 15
|
18
|
+
|
19
|
+
@time_delay = 0
|
20
|
+
end
|
21
|
+
|
22
|
+
def frame_started(event)
|
23
|
+
return false unless super(event)
|
24
|
+
|
25
|
+
$rot_node.yaw(Degree.new(event.time_since_last_frame * 30))
|
26
|
+
|
27
|
+
true
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
class SkyDomeApplication < Ogre::Application
|
32
|
+
|
33
|
+
def create_scene
|
34
|
+
caps = root.get_render_system.get_capabilities
|
35
|
+
if !caps.has_capability?(RSC_VERTEX_PROGRAM) || !caps.has_capability?(RSC_FRAGMENT_PROGRAM)
|
36
|
+
raise "Your card does not support vertex or fragmet programs, so we cannot run this demo. Sorry"
|
37
|
+
end
|
38
|
+
|
39
|
+
light = scene_manager.create_light("MainLight")
|
40
|
+
$rot_node = scene_manager.root_scene_node.create_child_scene_node
|
41
|
+
$rot_node.create_child_scene_node(Vector3.new(20, 40, 50)).attach_object(light)
|
42
|
+
|
43
|
+
ent = scene_manager.create_entity("head", "ogrehead.mesh")
|
44
|
+
|
45
|
+
camera.set_position(20, 0, 100)
|
46
|
+
camera.look_at(0,0,0)
|
47
|
+
|
48
|
+
# eyes
|
49
|
+
sub = ent.get_sub_entity(0)
|
50
|
+
sub.set_material_name("CelShading")
|
51
|
+
sub.set_custom_parameter(CUSTOM_SHININESS, Vector4.new(35.0, 0.0, 0.0, 0.0))
|
52
|
+
sub.set_custom_parameter(CUSTOM_DIFFUSE, Vector4.new(1.0, 0.3, 0.3, 1.0))
|
53
|
+
sub.set_custom_parameter(CUSTOM_SPECULAR, Vector4.new(1.0, 0.6, 0.6, 1.0))
|
54
|
+
# skin
|
55
|
+
sub = ent.get_sub_entity(1)
|
56
|
+
sub.set_material_name("CelShading")
|
57
|
+
sub.set_custom_parameter(CUSTOM_SHININESS, Vector4.new(10.0, 0.0, 0.0, 0.0))
|
58
|
+
sub.set_custom_parameter(CUSTOM_DIFFUSE, Vector4.new(0.0, 0.5, 0.0, 1.0))
|
59
|
+
sub.set_custom_parameter(CUSTOM_SPECULAR, Vector4.new(0.3, 0.5, 0.3, 1.0))
|
60
|
+
# earring
|
61
|
+
sub = ent.get_sub_entity(2)
|
62
|
+
sub.set_material_name("CelShading")
|
63
|
+
sub.set_custom_parameter(CUSTOM_SHININESS, Vector4.new(25.0, 0.0, 0.0, 0.0))
|
64
|
+
sub.set_custom_parameter(CUSTOM_DIFFUSE, Vector4.new(1.0, 1.0, 0.0, 1.0))
|
65
|
+
sub.set_custom_parameter(CUSTOM_SPECULAR, Vector4.new(1.0, 1.0, 0.7, 1.0))
|
66
|
+
# teeth
|
67
|
+
sub = ent.get_sub_entity(3)
|
68
|
+
sub.set_material_name("CelShading")
|
69
|
+
sub.set_custom_parameter(CUSTOM_SHININESS, Vector4.new(20.0, 0.0, 0.0, 0.0))
|
70
|
+
sub.set_custom_parameter(CUSTOM_DIFFUSE, Vector4.new(1.0, 1.0, 0.7, 1.0))
|
71
|
+
sub.set_custom_parameter(CUSTOM_SPECULAR, Vector4.new(1.0, 1.0, 1.0, 1.0))
|
72
|
+
|
73
|
+
# Add entity to the root scene node
|
74
|
+
scene_manager.root_scene_node.create_child_scene_node.attach_object(ent)
|
75
|
+
|
76
|
+
window.get_viewport(0).set_background_colour(ColourValue.White)
|
77
|
+
end
|
78
|
+
|
79
|
+
def create_frame_listener
|
80
|
+
self.frame_listener = SkyDomeListener.new(root, window, camera, scene_manager)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
app = SkyDomeApplication.new
|
85
|
+
app.go
|