Updated wrappers

This commit is contained in:
Robert Osfield 2006-12-27 23:19:37 +00:00
parent 11fef2d75e
commit d7e3ed3fb2
18 changed files with 293 additions and 152 deletions

View File

@ -39,9 +39,9 @@ int main( int argc, char **argv )
viewer.setUpViewAcrossAllScreens();
viewer.realize();
bool limitNumberOfFrames = false;
bool limitNumberOfFrames = true;
unsigned int numFrames = 0;
unsigned int maxFrames = 100;
unsigned int maxFrames = 10;
while(!viewer.done() && !(limitNumberOfFrames && numFrames>=maxFrames))
{

View File

@ -4,7 +4,7 @@ include $(TOPDIR)/Make/makedefs
CXXFILES =\
osgparticleeffects.cpp\
LIBS += -losgProducer -lProducer -losgParticle -losgSim -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
LIBS += -losgViewer -losgProducer -lProducer -losgParticle -losgSim -losgText -losgGA -losgDB -losgUtil -losg $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS)
INSTFILES = \
$(CXXFILES)\

View File

@ -67,13 +67,8 @@ class OSGDB_EXPORT ReadWriteMutex
ReadWriteMutex(const ReadWriteMutex&) {}
ReadWriteMutex& operator = (const ReadWriteMutex&) { return *(this); }
#if 1
ReentrantMutex _readWriteMutex;
ReentrantMutex _readCountMutex;
#else
OpenThreads::Mutex _readWriteMutex;
OpenThreads::Mutex _readCountMutex;
#endif
unsigned int _readCount;
};

View File

@ -74,10 +74,6 @@ class OSGSIM_EXPORT ElevationSlice
/** Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs.*/
DatabaseCacheReadCallback* getDatabaseCacheReadCallback() { return _dcrc.get(); }
/** Get the IntersectionVistor that does the intersection traversal over the scene.
* Note, if you want to customized the traversal then you can use the IntersectionVisitor's method to alter its behavior. */
osgUtil::IntersectionVisitor& getIntersectionVisitor() { return _intersectionVisitor; }
protected :

View File

@ -79,10 +79,6 @@ class OSGSIM_EXPORT HeightAboveTerrain
/** Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs.*/
DatabaseCacheReadCallback* getDatabaseCacheReadCallback() { return _dcrc.get(); }
/** Get the IntersectionVistor that does the intersection traversal over the scene.
* Note, if you want to customized the traversal then you can use the IntersectionVisitor's method to alter its behavior. */
osgUtil::IntersectionVisitor& getIntersectionVisitor() { return _intersectionVisitor; }
protected :
struct HAT

View File

@ -96,10 +96,6 @@ class OSGSIM_EXPORT LineOfSight
/** Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs.*/
DatabaseCacheReadCallback* getDatabaseCacheReadCallback() { return _dcrc.get(); }
/** Get the IntersectionVistor that does the intersection traversal over the scene.
* Note, if you want to customized the traversal then you can use the IntersectionVisitor's method to alter its behavior. */
osgUtil::IntersectionVisitor& getIntersectionVisitor() { return _intersectionVisitor; }
protected :
struct LOS

View File

@ -24,6 +24,26 @@
BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext)
I_BaseType(osg::Referenced);
I_Method1(void, add, IN, osg::GraphicsOperation *, operation,
__void__add__GraphicsOperation_P1,
"Add operation to end of OperationQueue. ",
"");
I_Method1(void, remove, IN, osg::GraphicsOperation *, operation,
__void__remove__GraphicsOperation_P1,
"Remove operation from OperationQueue. ",
"");
I_Method1(void, remove, IN, const std::string &, name,
__void__remove__C5_std_string_R1,
"Remove named operation from OperationQueue. ",
"");
I_Method0(void, removeAllOperations,
__void__removeAllOperations,
"Remove all operations from OperationQueue. ",
"");
I_Method0(void, runOperations,
__void__runOperations,
"Run the operations. ",
"");
I_Method0(const osg::GraphicsContext::Traits *, getTraits,
__C5_Traits_P1__getTraits,
"Get the traits of the GraphicsContext. ",
@ -40,6 +60,10 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext)
__C5_State_P1__getState,
"Get the const State object which tracks the current OpenGL state for this graphics context. ",
"");
I_Method0(bool, valid,
__bool__valid,
"Return whether a valid and usable GraphicsContext has been created. ",
"");
I_Method0(bool, realize,
__bool__realize,
"Realise the GraphicsContext. ",
@ -159,17 +183,21 @@ BEGIN_VALUE_REFLECTOR(osg::GraphicsContext::ScreenIdentifier)
I_Constructor0(____ScreenIdentifier,
"",
"");
I_Constructor1(IN, unsigned int, screenNum,
I_Constructor1(IN, unsigned int, in_screenNum,
____ScreenIdentifier__unsigned_int,
"",
"");
I_Constructor3(IN, const std::string &, hostName, IN, unsigned int, displayNum, IN, unsigned int, screenNum,
I_Constructor3(IN, const std::string &, in_hostName, IN, unsigned int, in_displayNum, IN, unsigned int, in_screenNum,
____ScreenIdentifier__C5_std_string_R1__unsigned_int__unsigned_int,
"",
"");
I_PublicMemberProperty(std::string, _hostName);
I_PublicMemberProperty(unsigned int, _displayNum);
I_PublicMemberProperty(unsigned int, _screenNum);
I_Method0(std::string, displayName,
__std_string__displayName,
"",
"");
I_PublicMemberProperty(std::string, hostName);
I_PublicMemberProperty(unsigned int, displayNum);
I_PublicMemberProperty(unsigned int, screenNum);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::GraphicsContext::Traits)
@ -178,27 +206,29 @@ BEGIN_OBJECT_REFLECTOR(osg::GraphicsContext::Traits)
I_Constructor0(____Traits,
"",
"");
I_PublicMemberProperty(unsigned int, _x);
I_PublicMemberProperty(unsigned int, _y);
I_PublicMemberProperty(unsigned int, _width);
I_PublicMemberProperty(unsigned int, _height);
I_PublicMemberProperty(std::string, _windowName);
I_PublicMemberProperty(bool, _windowDecoration);
I_PublicMemberProperty(bool, _supportsResize);
I_PublicMemberProperty(unsigned int, _red);
I_PublicMemberProperty(unsigned int, _blue);
I_PublicMemberProperty(unsigned int, _green);
I_PublicMemberProperty(unsigned int, _alpha);
I_PublicMemberProperty(unsigned int, _depth);
I_PublicMemberProperty(unsigned int, _stencil);
I_PublicMemberProperty(bool, _pbuffer);
I_PublicMemberProperty(bool, _quadBufferStereo);
I_PublicMemberProperty(bool, _doubleBuffer);
I_PublicMemberProperty(GLenum, _target);
I_PublicMemberProperty(unsigned int, _level);
I_PublicMemberProperty(unsigned int, _face);
I_PublicMemberProperty(unsigned int, _mipMapGeneration);
I_PublicMemberProperty(osg::GraphicsContext *, _sharedContext);
I_PublicMemberProperty(unsigned int, x);
I_PublicMemberProperty(unsigned int, y);
I_PublicMemberProperty(unsigned int, width);
I_PublicMemberProperty(unsigned int, height);
I_PublicMemberProperty(std::string, windowName);
I_PublicMemberProperty(bool, windowDecoration);
I_PublicMemberProperty(bool, supportsResize);
I_PublicMemberProperty(unsigned int, red);
I_PublicMemberProperty(unsigned int, blue);
I_PublicMemberProperty(unsigned int, green);
I_PublicMemberProperty(unsigned int, alpha);
I_PublicMemberProperty(unsigned int, depth);
I_PublicMemberProperty(unsigned int, stencil);
I_PublicMemberProperty(unsigned int, sampleBuffers);
I_PublicMemberProperty(unsigned int, samples);
I_PublicMemberProperty(bool, pbuffer);
I_PublicMemberProperty(bool, quadBufferStereo);
I_PublicMemberProperty(bool, doubleBuffer);
I_PublicMemberProperty(GLenum, target);
I_PublicMemberProperty(unsigned int, level);
I_PublicMemberProperty(unsigned int, face);
I_PublicMemberProperty(unsigned int, mipMapGeneration);
I_PublicMemberProperty(osg::GraphicsContext *, sharedContext);
END_REFLECTOR
BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext::WindowingSystemInterface)

View File

@ -28,7 +28,7 @@ BEGIN_ENUM_REFLECTOR(osg::BarrierOperation::PreBlockOp)
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::BarrierOperation)
I_BaseType(osg::GraphicsThread::Operation);
I_BaseType(osg::GraphicsOperation);
I_ConstructorWithDefaults2(IN, int, numThreads, , IN, osg::BarrierOperation::PreBlockOp, op, osg::BarrierOperation::NO_OPERATION,
____BarrierOperation__int__PreBlockOp,
"",
@ -63,59 +63,10 @@ BEGIN_OBJECT_REFLECTOR(osg::Block)
"");
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::GraphicsThread)
I_BaseType(osg::Referenced);
I_Constructor0(____GraphicsThread,
"",
"");
I_MethodWithDefaults2(void, add, IN, osg::GraphicsThread::Operation *, operation, , IN, bool, waitForCompletion, false,
__void__add__Operation_P1__bool,
"Add operation to end of OperationQueue, this will be executed by the graphics thread once this operation gets to the head of the queue. ",
"");
I_Method1(void, remove, IN, osg::GraphicsThread::Operation *, operation,
__void__remove__Operation_P1,
"Remove operation from OperationQueue. ",
"");
I_Method1(void, remove, IN, const std::string &, name,
__void__remove__C5_std_string_R1,
"Remove named operation from OperationQueue. ",
"");
I_Method0(void, removeAllOperations,
__void__removeAllOperations,
"Remove all operations from OperationQueue. ",
"");
I_Method0(osg::ref_ptr< osg::GraphicsThread::Operation >, getCurrentOperation,
__osg_ref_ptrT1_Operation___getCurrentOperation,
"Get the operation currently being run. ",
"");
I_Method0(void, run,
__void__run,
"Run does the graphics thread run loop. ",
"");
I_Method1(void, setDone, IN, bool, done,
__void__setDone__bool,
"",
"");
I_Method0(bool, getDone,
__bool__getDone,
"",
"");
I_Method0(int, cancel,
__int__cancel,
"Cancel this graphics thread. ",
"");
I_SimpleProperty(osg::ref_ptr< osg::GraphicsThread::Operation >, CurrentOperation,
__osg_ref_ptrT1_Operation___getCurrentOperation,
0);
I_SimpleProperty(bool, Done,
__bool__getDone,
__void__setDone__bool);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::GraphicsThread::Operation)
BEGIN_OBJECT_REFLECTOR(osg::GraphicsOperation)
I_VirtualBaseType(osg::Referenced);
I_Constructor2(IN, const std::string &, name, IN, bool, keep,
____Operation__C5_std_string_R1__bool,
____GraphicsOperation__C5_std_string_R1__bool,
"",
"");
I_Method1(void, setName, IN, const std::string &, name,
@ -148,8 +99,57 @@ BEGIN_OBJECT_REFLECTOR(osg::GraphicsThread::Operation)
I_PublicMemberProperty(bool, _keep);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::GraphicsThread)
I_BaseType(osg::Referenced);
I_Constructor0(____GraphicsThread,
"",
"");
I_MethodWithDefaults2(void, add, IN, osg::GraphicsOperation *, operation, , IN, bool, waitForCompletion, false,
__void__add__GraphicsOperation_P1__bool,
"Add operation to end of OperationQueue, this will be executed by the graphics thread once this operation gets to the head of the queue. ",
"");
I_Method1(void, remove, IN, osg::GraphicsOperation *, operation,
__void__remove__GraphicsOperation_P1,
"Remove operation from OperationQueue. ",
"");
I_Method1(void, remove, IN, const std::string &, name,
__void__remove__C5_std_string_R1,
"Remove named operation from OperationQueue. ",
"");
I_Method0(void, removeAllOperations,
__void__removeAllOperations,
"Remove all operations from OperationQueue. ",
"");
I_Method0(osg::ref_ptr< osg::GraphicsOperation >, getCurrentOperation,
__osg_ref_ptrT1_GraphicsOperation___getCurrentOperation,
"Get the operation currently being run. ",
"");
I_Method0(void, run,
__void__run,
"Run does the graphics thread run loop. ",
"");
I_Method1(void, setDone, IN, bool, done,
__void__setDone__bool,
"",
"");
I_Method0(bool, getDone,
__bool__getDone,
"",
"");
I_Method0(int, cancel,
__int__cancel,
"Cancel this graphics thread. ",
"");
I_SimpleProperty(osg::ref_ptr< osg::GraphicsOperation >, CurrentOperation,
__osg_ref_ptrT1_GraphicsOperation___getCurrentOperation,
0);
I_SimpleProperty(bool, Done,
__bool__getDone,
__void__setDone__bool);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::ReleaseContext_Block_MakeCurrentOperation)
I_BaseType(osg::GraphicsThread::Operation);
I_BaseType(osg::GraphicsOperation);
I_BaseType(osg::Block);
I_Constructor0(____ReleaseContext_Block_MakeCurrentOperation,
"",
@ -161,25 +161,25 @@ BEGIN_OBJECT_REFLECTOR(osg::ReleaseContext_Block_MakeCurrentOperation)
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::SwapBuffersOperation)
I_BaseType(osg::GraphicsThread::Operation);
I_BaseType(osg::GraphicsOperation);
I_Constructor0(____SwapBuffersOperation,
"",
"");
END_REFLECTOR
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osg::GraphicsThread::Operation >)
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osg::GraphicsOperation >)
I_Constructor0(____ref_ptr,
"",
"");
I_Constructor1(IN, osg::GraphicsThread::Operation *, ptr,
I_Constructor1(IN, osg::GraphicsOperation *, ptr,
____ref_ptr__T_P1,
"",
"");
I_Constructor1(IN, const osg::ref_ptr< osg::GraphicsThread::Operation > &, rp,
I_Constructor1(IN, const osg::ref_ptr< osg::GraphicsOperation > &, rp,
____ref_ptr__C5_ref_ptr_R1,
"",
"");
I_Method0(osg::GraphicsThread::Operation *, get,
I_Method0(osg::GraphicsOperation *, get,
__T_P1__get,
"",
"");
@ -187,15 +187,15 @@ BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osg::GraphicsThread::Operation >)
__bool__valid,
"",
"");
I_Method0(osg::GraphicsThread::Operation *, release,
I_Method0(osg::GraphicsOperation *, release,
__T_P1__release,
"",
"");
I_Method1(void, swap, IN, osg::ref_ptr< osg::GraphicsThread::Operation > &, rp,
I_Method1(void, swap, IN, osg::ref_ptr< osg::GraphicsOperation > &, rp,
__void__swap__ref_ptr_R1,
"",
"");
I_SimpleProperty(osg::GraphicsThread::Operation *, ,
I_SimpleProperty(osg::GraphicsOperation *, ,
__T_P1__get,
0);
END_REFLECTOR

View File

@ -26,35 +26,66 @@ BEGIN_VALUE_REFLECTOR(osg::Timer)
"");
I_Method0(osg::Timer_t, tick,
__Timer_t__tick,
"Get the timers tick value. ",
"");
I_Method0(void, setStartTick,
__void__setStartTick,
"Set the start. ",
"");
I_Method1(void, setStartTick, IN, osg::Timer_t, t,
__void__setStartTick__Timer_t,
"",
"");
I_Method0(osg::Timer_t, getStartTick,
__Timer_t__getStartTick,
"",
"");
I_Method0(double, time_s,
__double__time_s,
"Get elapsed time in seconds. ",
"");
I_Method0(double, time_m,
__double__time_m,
"Get elapsed time in milliseconds. ",
"");
I_Method0(double, time_u,
__double__time_u,
"Get elapsed time in micoseconds. ",
"");
I_Method0(double, time_n,
__double__time_n,
"Get elapsed time in nanoseconds. ",
"");
I_Method2(double, delta_s, IN, osg::Timer_t, t1, IN, osg::Timer_t, t2,
__double__delta_s__Timer_t__Timer_t,
"",
"Get the time in seconds between timer ticks t1 and t2. ",
"");
I_Method2(double, delta_m, IN, osg::Timer_t, t1, IN, osg::Timer_t, t2,
__double__delta_m__Timer_t__Timer_t,
"",
"Get the time in milliseconds between timer ticks t1 and t2. ",
"");
I_Method2(double, delta_u, IN, osg::Timer_t, t1, IN, osg::Timer_t, t2,
__double__delta_u__Timer_t__Timer_t,
"",
"Get the time in microseconds between timer ticks t1 and t2. ",
"");
I_Method2(double, delta_n, IN, osg::Timer_t, t1, IN, osg::Timer_t, t2,
__double__delta_n__Timer_t__Timer_t,
"",
"Get the time in nanoseconds between timer ticks t1 and t2. ",
"");
I_Method0(double, getSecondsPerTick,
__double__getSecondsPerTick,
"",
"Get the the numer of ticks per second. ",
"");
I_StaticMethod0(const osg::Timer *, instance,
__C5_Timer_P1__instance_S,
I_StaticMethod0(osg::Timer *, instance,
__Timer_P1__instance_S,
"",
"");
I_SimpleProperty(double, SecondsPerTick,
__double__getSecondsPerTick,
0);
I_SimpleProperty(osg::Timer_t, StartTick,
__Timer_t__getStartTick,
__void__setStartTick__Timer_t);
END_REFLECTOR
TYPE_NAME_ALIAS(unsigned long long, osg::Timer_t);

View File

@ -20,6 +20,28 @@
#undef OUT
#endif
BEGIN_VALUE_REFLECTOR(osgDB::ReadWriteMutex)
I_Constructor0(____ReadWriteMutex,
"",
"");
I_Method0(int, readLock,
__int__readLock,
"",
"");
I_Method0(int, readUnlock,
__int__readUnlock,
"",
"");
I_Method0(int, writeLock,
__int__writeLock,
"",
"");
I_Method0(int, writeUnlock,
__int__writeUnlock,
"",
"");
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osgDB::ReentrantMutex)
I_Constructor0(____ReentrantMutex,
"",
@ -38,3 +60,17 @@ BEGIN_OBJECT_REFLECTOR(osgDB::ReentrantMutex)
"");
END_REFLECTOR
BEGIN_VALUE_REFLECTOR(osgDB::ScopedReadLock)
I_Constructor1(IN, osgDB::ReadWriteMutex &, mutex,
____ScopedReadLock__ReadWriteMutex_R1,
"",
"");
END_REFLECTOR
BEGIN_VALUE_REFLECTOR(osgDB::ScopedWriteLock)
I_Constructor1(IN, osgDB::ReadWriteMutex &, mutex,
____ScopedWriteLock__ReadWriteMutex_R1,
"",
"");
END_REFLECTOR

View File

@ -66,51 +66,95 @@ BEGIN_OBJECT_REFLECTOR(osgGA::EventQueue)
__void__windowResize__int__int__unsigned_int__unsigned_int,
"Method for adapting window resize event, placing this event on the back of the event queue. ",
"");
I_Method5(void, windowResize, IN, int, x, IN, int, y, IN, unsigned int, width, IN, unsigned int, height, IN, double, time,
__void__windowResize__int__int__unsigned_int__unsigned_int__double,
"Method for adapting window resize event, placing this event on the back of the event queue, with specified time. ",
"");
I_Method1(void, mouseScroll, IN, osgGA::GUIEventAdapter::ScrollingMotion, sm,
__void__mouseScroll__GUIEventAdapter_ScrollingMotion,
"Method for adapting mouse scroll wheel events, placing this event on the back of the event queue. ",
"");
I_Method2(void, mouseScroll, IN, osgGA::GUIEventAdapter::ScrollingMotion, sm, IN, double, time,
__void__mouseScroll__GUIEventAdapter_ScrollingMotion__double,
"Method for adapting mouse scroll wheel events, placing this event on the back of the event queue, with specified time. ",
"");
I_Method2(void, mouseScroll2D, IN, float, x, IN, float, y,
__void__mouseScroll2D__float__float,
"Method for adapting mouse scroll wheel events, placing this event on the back of the event queue. ",
"");
I_Method3(void, mouseScroll2D, IN, float, x, IN, float, y, IN, double, time,
__void__mouseScroll2D__float__float__double,
"Method for adapting mouse scroll wheel events, placing this event on the back of the event queue. ",
"");
I_Method1(void, penPressure, IN, float, pressure,
__void__penPressure__float,
"Method for adapting pen pressure events, placing this event on the back og the event queue. ",
"Method for adapting pen pressure events, placing this event on the back of the event queue. ",
"");
I_Method2(void, penPressure, IN, float, pressure, IN, double, time,
__void__penPressure__float__double,
"Method for adapting pen pressure events, placing this event on the back of the event queue, with specified time. ",
"");
I_Method2(void, penProximity, IN, osgGA::GUIEventAdapter::TabletPointerType, pt, IN, bool, isEntering,
__void__penProximity__GUIEventAdapter_TabletPointerType__bool,
"Method for adapting pen proximity events, placing this event on the back og the event queue. ",
"Method for adapting pen proximity events, placing this event on the back of the event queue. ",
"");
I_Method2(void, mouseWarp, IN, float, x, IN, float, y,
__void__mouseWarp__float__float,
I_Method3(void, penProximity, IN, osgGA::GUIEventAdapter::TabletPointerType, pt, IN, bool, isEntering, IN, double, time,
__void__penProximity__GUIEventAdapter_TabletPointerType__bool__double,
"Method for adapting pen proximity events, placing this event on the back of the event queue, with specified time. ",
"");
I_Method2(void, mouseWarped, IN, float, x, IN, float, y,
__void__mouseWarped__float__float,
"Method for updating in response to a mouse warp. ",
"Note, just moves the mouse position without creating a new event for it. ");
I_Method2(void, mouseMotion, IN, float, x, IN, float, y,
__void__mouseMotion__float__float,
"Method for adapting mouse motion events, placing this event on the back of the event queue. ",
"");
I_Method3(void, mouseMotion, IN, float, x, IN, float, y, IN, double, time,
__void__mouseMotion__float__float__double,
"Method for adapting mouse motion events, placing this event on the back of the event queue, with specified time. ",
"");
I_Method3(void, mouseButtonPress, IN, float, x, IN, float, y, IN, unsigned int, button,
__void__mouseButtonPress__float__float__unsigned_int,
"Method for adapting mouse button pressed events, placing this event on the back of the event queue. ",
"Button numbering is 1 for left mouse button, 2 for middle, 3 for right. ");
I_Method4(void, mouseButtonPress, IN, float, x, IN, float, y, IN, unsigned int, button, IN, double, time,
__void__mouseButtonPress__float__float__unsigned_int__double,
"Method for adapting mouse button pressed events, placing this event on the back of the event queue, with specified time. ",
"Button numbering is 1 for left mouse button, 2 for middle, 3 for right. ");
I_Method3(void, mouseDoubleButtonPress, IN, float, x, IN, float, y, IN, unsigned int, button,
__void__mouseDoubleButtonPress__float__float__unsigned_int,
"Method for adapting mouse button pressed events, placing this event on the back of the event queue. ",
"Button numbering is 1 for left mouse button, 2 for middle, 3 for right. ");
I_Method4(void, mouseDoubleButtonPress, IN, float, x, IN, float, y, IN, unsigned int, button, IN, double, time,
__void__mouseDoubleButtonPress__float__float__unsigned_int__double,
"Method for adapting mouse button pressed events, placing this event on the back of the event queue, with specified time. ",
"Button numbering is 1 for left mouse button, 2 for middle, 3 for right. ");
I_Method3(void, mouseButtonRelease, IN, float, x, IN, float, y, IN, unsigned int, button,
__void__mouseButtonRelease__float__float__unsigned_int,
"Method for adapting mouse button release events, placing this event on the back of the event queue. ",
"Button numbering is 1 for left mouse button, 2 for middle, 3 for right. ");
I_Method4(void, mouseButtonRelease, IN, float, x, IN, float, y, IN, unsigned int, button, IN, double, time,
__void__mouseButtonRelease__float__float__unsigned_int__double,
"Method for adapting mouse button release events, placing this event on the back of the event queue, with specified time. ",
"Button numbering is 1 for left mouse button, 2 for middle, 3 for right. ");
I_Method1(void, keyPress, IN, int, key,
__void__keyPress__int,
"Method for adapting keyboard press events. ",
"Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings. ");
I_Method2(void, keyPress, IN, int, key, IN, double, time,
__void__keyPress__int__double,
"Method for adapting keyboard press events. ",
"Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings, with specified time. ");
I_Method1(void, keyRelease, IN, int, key,
__void__keyRelease__int,
"Method for adapting keyboard press events. ",
"Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings. ");
I_Method1(void, frame, IN, double, t,
I_Method2(void, keyRelease, IN, int, key, IN, double, time,
__void__keyRelease__int__double,
"Method for adapting keyboard press events. ",
"Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings, with specified time. ");
I_Method1(void, frame, IN, double, time,
__void__frame__double,
"Method for adapting frame events. ",
"");

View File

@ -15,6 +15,7 @@
#include <osg/Object>
#include <osg/State>
#include <osg/Vec3>
#include <osgDB/ReentrantMutex>
#include <osgParticle/Particle>
#include <osgParticle/ParticleSystem>
@ -192,6 +193,10 @@ BEGIN_OBJECT_REFLECTOR(osgParticle::ParticleSystem)
__osg_BoundingBox__computeBound,
"Compute the bounding box around Drawables's geometry. ",
"");
I_Method0(osgDB::ReadWriteMutex *, getReadWriteMutex,
__osgDB_ReadWriteMutex_P1__getReadWriteMutex,
"",
"");
I_SimpleProperty(const osg::Vec3 &, AlignVectorX,
__C5_osg_Vec3_R1__getAlignVectorX,
__void__setAlignVectorX__C5_osg_Vec3_R1);
@ -222,5 +227,8 @@ BEGIN_OBJECT_REFLECTOR(osgParticle::ParticleSystem)
I_SimpleProperty(osgParticle::ParticleSystem::Alignment, ParticleAlignment,
__Alignment__getParticleAlignment,
__void__setParticleAlignment__Alignment);
I_SimpleProperty(osgDB::ReadWriteMutex *, ReadWriteMutex,
__osgDB_ReadWriteMutex_P1__getReadWriteMutex,
0);
END_REFLECTOR

View File

@ -14,7 +14,6 @@
#include <osg/Vec3d>
#include <osgSim/ElevationSlice>
#include <osgSim/LineOfSight>
#include <osgUtil/IntersectionVisitor>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
@ -74,10 +73,6 @@ BEGIN_VALUE_REFLECTOR(osgSim::ElevationSlice)
__DatabaseCacheReadCallback_P1__getDatabaseCacheReadCallback,
"Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs. ",
"");
I_Method0(osgUtil::IntersectionVisitor &, getIntersectionVisitor,
__osgUtil_IntersectionVisitor_R1__getIntersectionVisitor,
"Get the IntersectionVistor that does the intersection traversal over the scene. ",
"Note, if you want to customized the traversal then you can use the IntersectionVisitor's method to alter its behavior. ");
I_StaticMethodWithDefaults4(osgSim::ElevationSlice::Vec3dList, computeElevationSlice, IN, osg::Node *, scene, , IN, const osg::Vec3d &, startPoint, , IN, const osg::Vec3d &, endPoint, , IN, osg::Node::NodeMask, traversalMask, 0xffffffff,
__Vec3dList__computeElevationSlice__osg_Node_P1__C5_osg_Vec3d_R1__C5_osg_Vec3d_R1__osg_Node_NodeMask_S,
"Compute the vertical distance between the specified scene graph and a single HAT point. ",
@ -91,9 +86,6 @@ BEGIN_VALUE_REFLECTOR(osgSim::ElevationSlice)
I_SimpleProperty(const osg::Vec3d &, EndPoint,
__C5_osg_Vec3d_R1__getEndPoint,
__void__setEndPoint__C5_osg_Vec3d_R1);
I_SimpleProperty(osgUtil::IntersectionVisitor &, IntersectionVisitor,
__osgUtil_IntersectionVisitor_R1__getIntersectionVisitor,
0);
I_SimpleProperty(const osgSim::ElevationSlice::Vec3dList &, Intersections,
__C5_Vec3dList_R1__getIntersections,
0);

View File

@ -14,7 +14,6 @@
#include <osg/Vec3d>
#include <osgSim/HeightAboveTerrain>
#include <osgSim/LineOfSight>
#include <osgUtil/IntersectionVisitor>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
@ -76,10 +75,6 @@ BEGIN_VALUE_REFLECTOR(osgSim::HeightAboveTerrain)
__DatabaseCacheReadCallback_P1__getDatabaseCacheReadCallback,
"Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs. ",
"");
I_Method0(osgUtil::IntersectionVisitor &, getIntersectionVisitor,
__osgUtil_IntersectionVisitor_R1__getIntersectionVisitor,
"Get the IntersectionVistor that does the intersection traversal over the scene. ",
"Note, if you want to customized the traversal then you can use the IntersectionVisitor's method to alter its behavior. ");
I_StaticMethodWithDefaults3(double, computeHeightAboveTerrain, IN, osg::Node *, scene, , IN, const osg::Vec3d &, point, , IN, osg::Node::NodeMask, traversalMask, 0xffffffff,
__double__computeHeightAboveTerrain__osg_Node_P1__C5_osg_Vec3d_R1__osg_Node_NodeMask_S,
"Compute the vertical distance between the specified scene graph and a single HAT point. ",
@ -87,9 +82,6 @@ BEGIN_VALUE_REFLECTOR(osgSim::HeightAboveTerrain)
I_SimpleProperty(osgSim::DatabaseCacheReadCallback *, DatabaseCacheReadCallback,
__DatabaseCacheReadCallback_P1__getDatabaseCacheReadCallback,
__void__setDatabaseCacheReadCallback__DatabaseCacheReadCallback_P1);
I_SimpleProperty(osgUtil::IntersectionVisitor &, IntersectionVisitor,
__osgUtil_IntersectionVisitor_R1__getIntersectionVisitor,
0);
I_SimpleProperty(double, LowestHeight,
__double__getLowestHeight,
__void__setLowestHeight__double);

View File

@ -13,7 +13,6 @@
#include <osg/Node>
#include <osg/Vec3d>
#include <osgSim/LineOfSight>
#include <osgUtil/IntersectionVisitor>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
@ -107,10 +106,6 @@ BEGIN_VALUE_REFLECTOR(osgSim::LineOfSight)
__DatabaseCacheReadCallback_P1__getDatabaseCacheReadCallback,
"Get the ReadCallback that does the reading of external PagedLOD models, and caching of loaded subgraphs. ",
"");
I_Method0(osgUtil::IntersectionVisitor &, getIntersectionVisitor,
__osgUtil_IntersectionVisitor_R1__getIntersectionVisitor,
"Get the IntersectionVistor that does the intersection traversal over the scene. ",
"Note, if you want to customized the traversal then you can use the IntersectionVisitor's method to alter its behavior. ");
I_StaticMethodWithDefaults4(osgSim::LineOfSight::Intersections, computeIntersections, IN, osg::Node *, scene, , IN, const osg::Vec3d &, start, , IN, const osg::Vec3d &, end, , IN, osg::Node::NodeMask, traversalMask, 0xffffffff,
__Intersections__computeIntersections__osg_Node_P1__C5_osg_Vec3d_R1__C5_osg_Vec3d_R1__osg_Node_NodeMask_S,
"Compute the intersection between the specified scene graph and a single LOS start,end pair. ",
@ -122,9 +117,6 @@ BEGIN_VALUE_REFLECTOR(osgSim::LineOfSight)
__C5_osg_Vec3d_R1__getEndPoint__unsigned_int,
__void__setEndPoint__unsigned_int__C5_osg_Vec3d_R1,
0);
I_SimpleProperty(osgUtil::IntersectionVisitor &, IntersectionVisitor,
__osgUtil_IntersectionVisitor_R1__getIntersectionVisitor,
0);
I_IndexedProperty(const osg::Vec3d &, StartPoint,
__C5_osg_Vec3d_R1__getStartPoint__unsigned_int,
__void__setStartPoint__unsigned_int__C5_osg_Vec3d_R1,

View File

@ -10,7 +10,7 @@ CXXFILES =\
View.cpp\
Viewer.cpp\
LIBS += -losgViewer -losg -losgIntrospection $(GL_LIBS) $(OTHER_LIBS)
LIBS += -losgViewer -losg -losgIntrospection -losgUtil -losgDB -losgGA $(GL_LIBS) $(OTHER_LIBS)
OPTF = -O

View File

@ -44,6 +44,18 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::GraphicsWindow)
__void__checkEvents,
"",
"");
I_Method1(void, setWindowDecoration, IN, bool, x,
__void__setWindowDecoration__bool,
"Set Window decoration. ",
"");
I_Method0(void, grabFocus,
__void__grabFocus,
"Get focus. ",
"");
I_Method0(void, grabFocusIfPointerInWindow,
__void__grabFocusIfPointerInWindow,
"Get focus on if the pointer is in this window. ",
"");
I_Method0(bool, realizeImplementation,
__bool__realizeImplementation,
"Realise the GraphicsContext implementation, Pure virtual - must be implemented by concrate implementations of GraphicsContext. ",
@ -87,5 +99,8 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::GraphicsWindow)
I_SimpleProperty(osgGA::EventQueue *, EventQueue,
__osgGA_EventQueue_P1__getEventQueue,
__void__setEventQueue__osgGA_EventQueue_P1);
I_SimpleProperty(bool, WindowDecoration,
0,
__void__setWindowDecoration__bool);
END_REFLECTOR

View File

@ -20,6 +20,8 @@
#undef OUT
#endif
TYPE_NAME_ALIAS(std::vector< osg::GraphicsContext * >, osgViewer::Viewer::Contexts);
BEGIN_OBJECT_REFLECTOR(osgViewer::Viewer)
I_BaseType(osgViewer::View);
I_Constructor0(____Viewer,
@ -29,10 +31,18 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::Viewer)
__void__realize,
"set up windows and associated threads. ",
"");
I_Method1(void, setDone, IN, bool, done,
__void__setDone__bool,
"",
"");
I_Method0(bool, done,
__bool__done,
"",
"");
I_Method0(void, frame,
__void__frame,
"Render a complete new frame. ",
"Calls frameAdvance(), frameEventTraversal(), frameUpateTraversal(), frameCullTraversal() and frameDrawTraversal(). Note, no internal makeCurrent() is issued before, or swap buffers called after frame(), these operations are the responsibility of the calling code. ");
"Calls frameAdvance(), frameEventTraversal(), frameUpateTraversal(), frameRenderingTraversals(). ");
I_Method0(void, frameAdvance,
__void__frameAdvance,
"",
@ -45,12 +55,8 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::Viewer)
__void__frameUpdateTraversal,
"",
"");
I_Method0(void, frameCullTraversal,
__void__frameCullTraversal,
"",
"");
I_Method0(void, frameDrawTraversal,
__void__frameDrawTraversal,
I_Method0(void, frameRenderingTraversals,
__void__frameRenderingTraversals,
"",
"");
I_Method0(void, releaseAllGLObjects,
@ -60,11 +66,23 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::Viewer)
I_Method0(void, cleanup,
__void__cleanup,
"Clean up all OpenGL objects associated with this viewer's scenegraph. ",
"Note, must only be called from the graphics context associated with this viewer. ");
"");
I_Method0(void, init,
__void__init,
"",
"");
I_Method1(void, getContexts, IN, osgViewer::Viewer::Contexts &, contexts,
__void__getContexts__Contexts_R1,
"",
"");
I_SimpleProperty(bool, Done,
0,
__void__setDone__bool);
I_PublicMemberProperty(bool, _firstFrame);
I_PublicMemberProperty(bool, _done);
I_PublicMemberProperty(osg::ref_ptr< osg::BarrierOperation >, _startRenderingBarrier);
I_PublicMemberProperty(osg::ref_ptr< osg::BarrierOperation >, _endRenderingDispatchBarrier);
END_REFLECTOR
STD_VECTOR_REFLECTOR(std::vector< osg::GraphicsContext * >);