Ogre-0.60/0000755000175000017500000000000012162410433012533 5ustar slanningslanningOgre-0.60/PerlOGREWindowEventListener.h0000644000175000017500000000137112146460465020201 0ustar slanningslanning#ifndef _PERLOGRE_WINDOWEVENTLISTENER_H_ #define _PERLOGRE_WINDOWEVENTLISTENER_H_ #include "PerlOGRECallback.h" using namespace std; // this class implements Ogre::WindowEventListener, // so it can be passed to WindowEventUtilities::addWindowEventListener // but still allowing implementing the callbacks from Perl class PerlOGREWindowEventListener : public PerlOGRECallback, public Ogre::WindowEventListener { public: PerlOGREWindowEventListener(SV *pobj); // WindowEventListener interface void windowMoved(Ogre::RenderWindow *win); void windowResized(Ogre::RenderWindow *win); void windowClosed(Ogre::RenderWindow *win); void windowFocusChange(Ogre::RenderWindow *win); }; #endif /* define _PERLOGRE_WINDOWEVENTLISTENER_H_ */ Ogre-0.60/typemap0000644000175000017500000006064512146460465014164 0ustar slanningslanningTYPEMAP ## BEGIN NORMAL TYPEMAPS AnimableObject * O_ANIMABLEOBJECT AnimableValue * O_ANIMABLEVALUE Animation * O_ANIMATION AnimationControllerFunction * O_ANIMATIONCONTROLLERFUNCTION AnimationState * O_ANIMATIONSTATE AnimationStateSet * O_ANIMATIONSTATESET AnimationTrack * O_ANIMATIONTRACK AxisAlignedBox * O_AXISALIGNEDBOX AxisAlignedBoxSceneQuery * O_AXISALIGNEDBOXSCENEQUERY Billboard * O_BILLBOARD BillboardChain * O_BILLBOARDCHAIN BillboardSet * O_BILLBOARDSET Bone * O_BONE BorderPanelOverlayElement * O_BORDERPANELOVERLAYELEMENT Camera * O_CAMERA ColourValue * O_COLOURVALUE ConfigFile * O_CONFIGFILE ControllerFunctionReal * O_CONTROLLERFUNCTIONREAL ControllerManager * O_CONTROLLERMANAGER ControllerReal * O_CONTROLLERREAL ControllerValueReal * O_CONTROLLERVALUEREAL DataStream * O_DATASTREAM DegRad * O_DEGRAD Degree * O_DEGREE EdgeData * O_EDGEDATA Entity * O_ENTITY FrameEvent * O_FRAMEEVENT Frustum * O_FRUSTUM GpuProgram * O_GPUPROGRAM GpuProgramParameters * O_GPUPROGRAMPARAMETERS HardwareBuffer * O_HARDWAREBUFFER HardwareBufferManager * O_HARDWAREBUFFERMANAGER HardwareIndexBuffer * O_HARDWAREINDEXBUFFER HardwareOcclusionQuery * O_HARDWAREOCCLUSIONQUERY HardwarePixelBuffer * O_HARDWAREPIXELBUFFER HardwareVertexBuffer * O_HARDWAREVERTEXBUFFER IndexData * O_INDEXDATA InstancedGeometry * O_INSTANCEDGEOMETRY IntersectionSceneQuery * O_INTERSECTIONSCENEQUERY KeyFrame * O_KEYFRAME Light * O_LIGHT Log * O_LOG LogManager * O_LOGMANAGER ManualObject * O_MANUALOBJECT ManualResourceLoader * O_MANUALRESOURCELOADER Material * O_MATERIAL MaterialManager * O_MATERIALMANAGER Matrix3 * O_MATRIX3 Matrix4 * O_MATRIX4 Mesh * O_MESH MeshManager * O_MESHMANAGER MeshPtr * O_MESHPTR MovableObject * O_MOVABLEOBJECT MultiRenderTarget * O_MULTIRENDERTARGET Node * O_NODE NodeAnimationTrack * O_NODEANIMATIONTRACK NumericAnimationTrack * O_NUMERICANIMATIONTRACK Overlay * O_OVERLAY OverlayContainer * O_OVERLAYCONTAINER OverlayElement * O_OVERLAYELEMENT OverlayManager * O_OVERLAYMANAGER PanelOverlayElement * O_PANELOVERLAYELEMENT Particle * O_PARTICLE ParticleAffector * O_PARTICLEAFFECTOR ParticleEmitter * O_PARTICLEEMITTER ParticleSystem * O_PARTICLESYSTEM ParticleSystemRenderer * O_PARTICLESYSTEMRENDERER Pass * O_PASS PassthroughControllerFunction * O_PASSTHROUGHCONTROLLERFUNCTION PatchMesh * O_PATCHMESH Plane * O_PLANE PlaneBoundedVolume * O_PLANEBOUNDEDVOLUME PlaneBoundedVolumeListSceneQuery * O_PLANEBOUNDEDVOLUMELISTSCENEQUERY Pose * O_POSE Quaternion * O_QUATERNION Radian * O_RADIAN Ray * O_RAY RaySceneQuery * O_RAYSCENEQUERY RegionSceneQuery * O_REGIONSCENEQUERY RenderOperation * O_RENDEROPERATION RenderQueue * O_RENDERQUEUE RenderSystem * O_RENDERSYSTEM RenderSystemCapabilities * O_RENDERSYSTEMCAPABILITIES RenderTarget * O_RENDERTARGET RenderTexture * O_RENDERTEXTURE RenderWindow * O_RENDERWINDOW Renderable * O_RENDERABLE Resource * O_RESOURCE ResourceGroupManager * O_RESOURCEGROUPMANAGER ResourceManager * O_RESOURCEMANAGER RibbonTrail * O_RIBBONTRAIL Root * O_ROOT ScaleControllerFunction * O_SCALECONTROLLERFUNCTION SceneManager * O_SCENEMANAGER SceneNode * O_SCENENODE SceneQuery * O_SCENEQUERY ScriptLoader * O_SCRIPTLOADER ShadowCaster * O_SHADOWCASTER Skeleton * O_SKELETON SkeletonInstance * O_SKELETONINSTANCE SkeletonManager * O_SKELETONMANAGER Sphere * O_SPHERE SphereSceneQuery * O_SPHERESCENEQUERY StaticGeometry * O_STATICGEOMETRY StringInterface * O_STRINGINTERFACE SubEntity * O_SUBENTITY SubMesh * O_SUBMESH TagPoint * O_TAGPOINT Technique * O_TECHNIQUE TextAreaOverlayElement * O_TEXTAREAOVERLAYELEMENT Texture * O_TEXTURE TextureManager * O_TEXTUREMANAGER TextureUnitState * O_TEXTUREUNITSTATE TimeIndex * O_TIMEINDEX Timer * O_TIMER TransformKeyFrame * O_TRANSFORMKEYFRAME Vector2 * O_VECTOR2 Vector3 * O_VECTOR3 Vector4 * O_VECTOR4 VertexAnimationTrack * O_VERTEXANIMATIONTRACK VertexBufferBinding * O_VERTEXBUFFERBINDING VertexData * O_VERTEXDATA VertexDeclaration * O_VERTEXDECLARATION VertexElement * O_VERTEXELEMENT Viewport * O_VIEWPORT WaveformControllerFunction * O_WAVEFORMCONTROLLERFUNCTION WindowEventListener * O_WINDOWEVENTLISTENER const AnimationControllerFunction * O_ANIMATIONCONTROLLERFUNCTION const AnimationStateSet * O_ANIMATIONSTATESET const AnimationTrack * O_ANIMATIONTRACK const AxisAlignedBox * O_AXISALIGNEDBOX const Billboard * O_BILLBOARD const Bone * O_BONE const BorderPanelOverlayElement * O_BORDERPANELOVERLAYELEMENT const Camera * O_CAMERA const Camera * O_CAMERA const ColourValue * O_COLOURVALUE const ControllerFunctionReal * O_CONTROLLERFUNCTIONREAL const ControllerManager * O_CONTROLLERMANAGER const ControllerReal * O_CONTROLLERREAL const ControllerValueReal * O_CONTROLLERVALUEREAL const DataStream * O_DATASTREAM const HardwareVertexBuffer * O_HARDWAREVERTEXBUFFER const Light * O_LIGHT const Material * O_MATERIAL const Matrix4 * O_MATRIX4 const Mesh * O_MESH const Node * O_NODE const NodeAnimationTrack * O_NODEANIMATIONTRACK const NumericAnimationTrack * O_NUMERICANIMATIONTRACK const OverlayElement * O_OVERLAYELEMENT const PanelOverlayElement * O_PANELOVERLAYELEMENT const Pass * O_PASS const PassthroughControllerFunction * O_PASSTHROUGHCONTROLLERFUNCTION const Plane * O_PLANE const PlaneBoundedVolume * O_PLANEBOUNDEDVOLUME const Quaternion * O_QUATERNION const Radian * O_RADIAN const Ray * O_RAY const RenderSystemCapabilities * O_RENDERSYSTEMCAPABILITIES const Renderable * O_RENDERABLE const Resource * O_RESOURCE const ScaleControllerFunction * O_SCALECONTROLLERFUNCTION const SkeletonManager * O_SKELETONMANAGER const Sphere * O_SPHERE const SubEntity * O_SUBENTITY const SubMesh * O_SUBMESH const Technique * O_TECHNIQUE const TextAreaOverlayElement * O_TEXTAREAOVERLAYELEMENT const Texture * O_TEXTURE const TextureUnitState * O_TEXTUREUNITSTATE const TimeIndex * O_TIMEINDEX const Timer * O_TIMER const Vector3 * O_VECTOR3 const Vector4 * O_VECTOR4 const VertexAnimationTrack * O_VERTEXANIMATIONTRACK const VertexElement * O_VERTEXELEMENT const WaveformControllerFunction * O_WAVEFORMCONTROLLERFUNCTION ## END NORMAL TYPEMAPS String STRING const String STRING uint32 T_U_LONG uint16 T_U_SHORT uint8 T_UV uint T_UV uchar T_U_CHAR Real T_REAL ResourceHandle T_UV WorldFragment * S_WORLDFRAGMENT const WorldFragment * S_WORLDFRAGMENT ManualObjectSection * S_MANUALOBJECTSECTION const ManualObjectSection * S_MANUALOBJECTSECTION NameValuePairList T_MAPSTRSTR INPUT STRING char * xstmpchr_$var = (char *) SvPV_nolen($arg); $var = xstmpchr_$var; T_REAL $var = (Real)SvNV($arg); ## set a NameValuePairList from a hashref input ## this is not working yet, or at least not used anywhere T_MAPSTRSTR const char *key; I32 klen; SV *hval; HV *paramsHash = (HV *)SvRV($arg); hv_iterinit(paramsHash); while ((hval = hv_iternextsv(paramsHash, (char **)&key, &klen))) { // xxx: not sure if this checking is sufficient if (SvPOK(hval)) $var[key] = SvPV(hval, klen); } S_WORLDFRAGMENT TMOGRE_IN($arg, $var, $type, $Package, $func_name, SceneQuery::WorldFragment) S_MANUALOBJECTSECTION TMOGRE_IN($arg, $var, $type, $Package, $func_name, ManualObject::ManualObjectSection) O_DEGRAD TMOGRE_DEGRAD_IN($arg, $var, $Package, $func_name) O_CONTROLLERFUNCTIONREAL TMOGRE_CONTFUNC_IN($arg, $var) O_CONTROLLERVALUEREAL TMOGRE_CONTVAL_IN($arg, $var) O_ANIMABLEOBJECT TMOGRE_IN($arg, $var, $type, $Package, $func_name, AnimableObject) O_ANIMABLEVALUE TMOGRE_IN($arg, $var, $type, $Package, $func_name, AnimableValue) O_ANIMATION TMOGRE_IN($arg, $var, $type, $Package, $func_name, Animation) O_ANIMATIONCONTROLLERFUNCTION TMOGRE_IN($arg, $var, $type, $Package, $func_name, AnimationControllerFunction) O_ANIMATIONSTATE TMOGRE_IN($arg, $var, $type, $Package, $func_name, AnimationState) O_ANIMATIONSTATESET TMOGRE_IN($arg, $var, $type, $Package, $func_name, AnimationStateSet) O_ANIMATIONTRACK TMOGRE_IN($arg, $var, $type, $Package, $func_name, AnimationTrack) O_AXISALIGNEDBOX TMOGRE_IN($arg, $var, $type, $Package, $func_name, AxisAlignedBox) O_AXISALIGNEDBOXSCENEQUERY TMOGRE_IN($arg, $var, $type, $Package, $func_name, AxisAlignedBoxSceneQuery) O_BILLBOARD TMOGRE_IN($arg, $var, $type, $Package, $func_name, Billboard) O_BILLBOARDCHAIN TMOGRE_IN($arg, $var, $type, $Package, $func_name, BillboardChain) O_BILLBOARDSET TMOGRE_IN($arg, $var, $type, $Package, $func_name, BillboardSet) O_BONE TMOGRE_IN($arg, $var, $type, $Package, $func_name, Bone) O_BORDERPANELOVERLAYELEMENT TMOGRE_IN($arg, $var, $type, $Package, $func_name, BorderPanelOverlayElement) O_CAMERA TMOGRE_IN($arg, $var, $type, $Package, $func_name, Camera) O_COLOURVALUE TMOGRE_IN($arg, $var, $type, $Package, $func_name, ColourValue) O_CONFIGFILE TMOGRE_IN($arg, $var, $type, $Package, $func_name, ConfigFile) O_CONTROLLERMANAGER TMOGRE_IN($arg, $var, $type, $Package, $func_name, ControllerManager) O_CONTROLLERREAL TMOGRE_IN($arg, $var, $type, $Package, $func_name, ControllerReal) O_DATASTREAM TMOGRE_IN($arg, $var, $type, $Package, $func_name, DataStream) O_DEGREE TMOGRE_IN($arg, $var, $type, $Package, $func_name, Degree) O_EDGEDATA TMOGRE_IN($arg, $var, $type, $Package, $func_name, EdgeData) O_ENTITY TMOGRE_IN($arg, $var, $type, $Package, $func_name, Entity) O_FRUSTUM TMOGRE_IN($arg, $var, $type, $Package, $func_name, Frustum) O_FRAMEEVENT TMOGRE_IN($arg, $var, $type, $Package, $func_name, FrameEvent) O_GPUPROGRAM TMOGRE_IN($arg, $var, $type, $Package, $func_name, GpuProgram) O_GPUPROGRAMPARAMETERS TMOGRE_IN($arg, $var, $type, $Package, $func_name, GpuProgramParameters) O_HARDWAREBUFFER TMOGRE_IN($arg, $var, $type, $Package, $func_name, HardwareBuffer) O_HARDWAREBUFFERMANAGER TMOGRE_IN($arg, $var, $type, $Package, $func_name, HardwareBufferManager) O_HARDWAREINDEXBUFFER TMOGRE_IN($arg, $var, $type, $Package, $func_name, HardwareIndexBuffer) O_HARDWAREOCCLUSIONQUERY TMOGRE_IN($arg, $var, $type, $Package, $func_name, HardwareOcclusionQuery) O_HARDWAREPIXELBUFFER TMOGRE_IN($arg, $var, $type, $Package, $func_name, HardwarePixelBuffer) O_HARDWAREVERTEXBUFFER TMOGRE_IN($arg, $var, $type, $Package, $func_name, HardwareVertexBuffer) O_INDEXDATA TMOGRE_IN($arg, $var, $type, $Package, $func_name, IndexData) O_INSTANCEDGEOMETRY TMOGRE_IN($arg, $var, $type, $Package, $func_name, InstancedGeometry) O_INTERSECTIONSCENEQUERY TMOGRE_IN($arg, $var, $type, $Package, $func_name, IntersectionSceneQuery) O_KEYFRAME TMOGRE_IN($arg, $var, $type, $Package, $func_name, KeyFrame) O_LIGHT TMOGRE_IN($arg, $var, $type, $Package, $func_name, Light) O_LOG TMOGRE_IN($arg, $var, $type, $Package, $func_name, Log) O_LOGMANAGER TMOGRE_IN($arg, $var, $type, $Package, $func_name, LogManager) O_MANUALOBJECT TMOGRE_IN($arg, $var, $type, $Package, $func_name, ManualObject) O_MANUALRESOURCELOADER TMOGRE_IN($arg, $var, $type, $Package, $func_name, ManualResourceLoader) O_MATERIAL TMOGRE_IN($arg, $var, $type, $Package, $func_name, Material) O_MATERIALMANAGER TMOGRE_IN($arg, $var, $type, $Package, $func_name, MaterialManager) O_MATRIX3 TMOGRE_IN($arg, $var, $type, $Package, $func_name, Matrix3) O_MATRIX4 TMOGRE_IN($arg, $var, $type, $Package, $func_name, Matrix4) O_MESH TMOGRE_IN($arg, $var, $type, $Package, $func_name, Mesh) O_MESHMANAGER TMOGRE_IN($arg, $var, $type, $Package, $func_name, MeshManager) O_MESHPTR TMOGRE_IN($arg, $var, $type, $Package, $func_name, MeshPtr) O_MOVABLEOBJECT TMOGRE_IN($arg, $var, $type, $Package, $func_name, MovableObject) O_MULTIRENDERTARGET TMOGRE_IN($arg, $var, $type, $Package, $func_name, MultiRenderTarget) O_NODE TMOGRE_IN($arg, $var, $type, $Package, $func_name, Node) O_NODEANIMATIONTRACK TMOGRE_IN($arg, $var, $type, $Package, $func_name, NodeAnimationTrack) O_NUMERICANIMATIONTRACK TMOGRE_IN($arg, $var, $type, $Package, $func_name, NumericAnimationTrack) O_OVERLAY TMOGRE_IN($arg, $var, $type, $Package, $func_name, Overlay) O_OVERLAYCONTAINER TMOGRE_IN($arg, $var, $type, $Package, $func_name, OverlayContainer) O_OVERLAYELEMENT TMOGRE_IN($arg, $var, $type, $Package, $func_name, OverlayElement) O_OVERLAYMANAGER TMOGRE_IN($arg, $var, $type, $Package, $func_name, OverlayManager) O_PANELOVERLAYELEMENT TMOGRE_IN($arg, $var, $type, $Package, $func_name, PanelOverlayElement) O_PARTICLE TMOGRE_IN($arg, $var, $type, $Package, $func_name, Particle) O_PARTICLEAFFECTOR TMOGRE_IN($arg, $var, $type, $Package, $func_name, ParticleAffector) O_PARTICLEEMITTER TMOGRE_IN($arg, $var, $type, $Package, $func_name, ParticleEmitter) O_PARTICLESYSTEM TMOGRE_IN($arg, $var, $type, $Package, $func_name, ParticleSystem) O_PARTICLESYSTEMRENDERER TMOGRE_IN($arg, $var, $type, $Package, $func_name, ParticleSystemRenderer) O_PASS TMOGRE_IN($arg, $var, $type, $Package, $func_name, Pass) O_PASSTHROUGHCONTROLLERFUNCTION TMOGRE_IN($arg, $var, $type, $Package, $func_name, PassthroughControllerFunction) O_PATCHMESH TMOGRE_IN($arg, $var, $type, $Package, $func_name, PatchMesh) O_PLANE TMOGRE_IN($arg, $var, $type, $Package, $func_name, Plane) O_PLANEBOUNDEDVOLUME TMOGRE_IN($arg, $var, $type, $Package, $func_name, PlaneBoundedVolume) O_PLANEBOUNDEDVOLUMELISTSCENEQUERY TMOGRE_IN($arg, $var, $type, $Package, $func_name, PlaneBoundedVolumeListSceneQuery) O_POSE TMOGRE_IN($arg, $var, $type, $Package, $func_name, Pose) O_QUATERNION TMOGRE_IN($arg, $var, $type, $Package, $func_name, Quaternion) O_RADIAN TMOGRE_IN($arg, $var, $type, $Package, $func_name, Radian) O_RAY TMOGRE_IN($arg, $var, $type, $Package, $func_name, Ray) O_RAYSCENEQUERY TMOGRE_IN($arg, $var, $type, $Package, $func_name, RaySceneQuery) O_REGIONSCENEQUERY TMOGRE_IN($arg, $var, $type, $Package, $func_name, RegionSceneQuery) O_RESOURCE TMOGRE_IN($arg, $var, $type, $Package, $func_name, Resource) O_RESOURCEGROUPMANAGER TMOGRE_IN($arg, $var, $type, $Package, $func_name, ResourceGroupManager) O_RESOURCEMANAGER TMOGRE_IN($arg, $var, $type, $Package, $func_name, ResourceManager) O_RENDERABLE TMOGRE_IN($arg, $var, $type, $Package, $func_name, Renderable) O_RENDEROPERATION TMOGRE_IN($arg, $var, $type, $Package, $func_name, RenderOperation) O_RENDERQUEUE TMOGRE_IN($arg, $var, $type, $Package, $func_name, RenderQueue) O_RENDERSYSTEM TMOGRE_IN($arg, $var, $type, $Package, $func_name, RenderSystem) O_RENDERSYSTEMCAPABILITIES TMOGRE_IN($arg, $var, $type, $Package, $func_name, RenderSystemCapabilities) O_RENDERTARGET TMOGRE_IN($arg, $var, $type, $Package, $func_name, RenderTarget) O_RENDERTEXTURE TMOGRE_IN($arg, $var, $type, $Package, $func_name, RenderTexture) O_RENDERWINDOW TMOGRE_IN($arg, $var, $type, $Package, $func_name, RenderWindow) O_RIBBONTRAIL TMOGRE_IN($arg, $var, $type, $Package, $func_name, RibbonTrail) O_ROOT TMOGRE_IN($arg, $var, $type, $Package, $func_name, Root) O_SCALECONTROLLERFUNCTION TMOGRE_IN($arg, $var, $type, $Package, $func_name, ScaleControllerFunction) O_SCENEMANAGER TMOGRE_IN($arg, $var, $type, $Package, $func_name, SceneManager) O_SCENENODE TMOGRE_IN($arg, $var, $type, $Package, $func_name, SceneNode) O_SCENEQUERY TMOGRE_IN($arg, $var, $type, $Package, $func_name, SceneQuery) O_SCRIPTLOADER TMOGRE_IN($arg, $var, $type, $Package, $func_name, ScriptLoader) O_SHADOWCASTER TMOGRE_IN($arg, $var, $type, $Package, $func_name, ShadowCaster) O_SKELETON TMOGRE_IN($arg, $var, $type, $Package, $func_name, Skeleton) O_SKELETONINSTANCE TMOGRE_IN($arg, $var, $type, $Package, $func_name, SkeletonInstance) O_SKELETONMANAGER TMOGRE_IN($arg, $var, $type, $Package, $func_name, SkeletonManager) O_SPHERE TMOGRE_IN($arg, $var, $type, $Package, $func_name, Sphere) O_SPHERESCENEQUERY TMOGRE_IN($arg, $var, $type, $Package, $func_name, SphereSceneQuery) O_STATICGEOMETRY TMOGRE_IN($arg, $var, $type, $Package, $func_name, StaticGeometry) O_STRINGINTERFACE TMOGRE_IN($arg, $var, $type, $Package, $func_name, StringInterface) O_SUBENTITY TMOGRE_IN($arg, $var, $type, $Package, $func_name, SubEntity) O_SUBMESH TMOGRE_IN($arg, $var, $type, $Package, $func_name, SubMesh) O_TAGPOINT TMOGRE_IN($arg, $var, $type, $Package, $func_name, TagPoint) O_TECHNIQUE TMOGRE_IN($arg, $var, $type, $Package, $func_name, Technique) O_TEXTAREAOVERLAYELEMENT TMOGRE_IN($arg, $var, $type, $Package, $func_name, TextAreaOverlayElement) O_TEXTURE TMOGRE_IN($arg, $var, $type, $Package, $func_name, Texture) O_TEXTUREMANAGER TMOGRE_IN($arg, $var, $type, $Package, $func_name, TextureManager) O_TEXTUREUNITSTATE TMOGRE_IN($arg, $var, $type, $Package, $func_name, TextureUnitState) O_TIMEINDEX TMOGRE_IN($arg, $var, $type, $Package, $func_name, TimeIndex) O_TIMER TMOGRE_IN($arg, $var, $type, $Package, $func_name, Timer) O_TRANSFORMKEYFRAME TMOGRE_IN($arg, $var, $type, $Package, $func_name, TransformKeyFrame) O_VECTOR2 TMOGRE_IN($arg, $var, $type, $Package, $func_name, Vector2) O_VECTOR3 TMOGRE_IN($arg, $var, $type, $Package, $func_name, Vector3) O_VECTOR4 TMOGRE_IN($arg, $var, $type, $Package, $func_name, Vector4) O_VERTEXANIMATIONTRACK TMOGRE_IN($arg, $var, $type, $Package, $func_name, VertexAnimationTrack) O_VERTEXBUFFERBINDING TMOGRE_IN($arg, $var, $type, $Package, $func_name, VertexBufferBinding) O_VERTEXDATA TMOGRE_IN($arg, $var, $type, $Package, $func_name, VertexData) O_VERTEXDECLARATION TMOGRE_IN($arg, $var, $type, $Package, $func_name, VertexDeclaration) O_VERTEXELEMENT TMOGRE_IN($arg, $var, $type, $Package, $func_name, VertexElement) O_VIEWPORT TMOGRE_IN($arg, $var, $type, $Package, $func_name, Viewport) O_WAVEFORMCONTROLLERFUNCTION TMOGRE_IN($arg, $var, $type, $Package, $func_name, WaveformControllerFunction) O_WINDOWEVENTLISTENER TMOGRE_IN($arg, $var, $type, $Package, $func_name, WindowEventListener) OUTPUT STRING sv_setpvn((SV*)$arg, (char *) ($var.data()), ($var.size())); T_REAL sv_setnv($arg, (Real)$var); S_WORLDFRAGMENT TMOGRE_OUT($arg, $var, SceneQuery::WorldFragment) S_MANUALOBJECTSECTION TMOGRE_OUT($arg, $var, ManualObject::ManualObjectSection) O_ANIMABLEOBJECT TMOGRE_OUT($arg, $var, AnimableObject) O_ANIMABLEVALUE TMOGRE_OUT($arg, $var, AnimableValue) O_ANIMATION TMOGRE_OUT($arg, $var, Animation) O_ANIMATIONCONTROLLERFUNCTION TMOGRE_OUT($arg, $var, AnimationControllerFunction) O_ANIMATIONSTATE TMOGRE_OUT($arg, $var, AnimationState) O_ANIMATIONSTATESET TMOGRE_OUT($arg, $var, AnimationStateSet) O_ANIMATIONTRACK TMOGRE_OUT($arg, $var, AnimationTrack) O_AXISALIGNEDBOX TMOGRE_OUT($arg, $var, AxisAlignedBox) O_AXISALIGNEDBOXSCENEQUERY TMOGRE_OUT($arg, $var, AxisAlignedBoxSceneQuery) O_BILLBOARD TMOGRE_OUT($arg, $var, Billboard) O_BILLBOARDCHAIN TMOGRE_OUT($arg, $var, BillboardChain) O_BILLBOARDSET TMOGRE_OUT($arg, $var, BillboardSet) O_BONE TMOGRE_OUT($arg, $var, Bone) O_BORDERPANELOVERLAYELEMENT TMOGRE_OUT($arg, $var, BorderPanelOverlayElement) O_CAMERA TMOGRE_OUT($arg, $var, Camera) O_COLOURVALUE TMOGRE_OUT($arg, $var, ColourValue) O_CONFIGFILE TMOGRE_OUT($arg, $var, ConfigFile) O_CONTROLLERMANAGER TMOGRE_OUT($arg, $var, ControllerManager) O_CONTROLLERREAL TMOGRE_OUT($arg, $var, ControllerReal) O_CONTROLLERFUNCTIONREAL TMOGRE_OUT($arg, $var, ControllerFunctionReal) O_CONTROLLERVALUEREAL TMOGRE_OUT($arg, $var, ControllerValueReal) O_DATASTREAM TMOGRE_OUT($arg, $var, DataStream) O_DEGREE TMOGRE_OUT($arg, $var, Degree) O_EDGEDATA TMOGRE_OUT($arg, $var, EdgeData) O_ENTITY TMOGRE_OUT($arg, $var, Entity) O_FRUSTUM TMOGRE_OUT($arg, $var, Frustum) O_FRAMEEVENT TMOGRE_OUT($arg, $var, FrameEvent) O_GPUPROGRAM TMOGRE_OUT($arg, $var, GpuProgram) O_GPUPROGRAMPARAMETERS TMOGRE_OUT($arg, $var, GpuProgramParameters) O_HARDWAREBUFFER TMOGRE_OUT($arg, $var, HardwareBuffer) O_HARDWAREBUFFERMANAGER TMOGRE_OUT($arg, $var, HardwareBufferManager) O_HARDWAREINDEXBUFFER TMOGRE_OUT($arg, $var, HardwareIndexBuffer) O_HARDWAREOCCLUSIONQUERY TMOGRE_OUT($arg, $var, HardwareOcclusionQuery) O_HARDWAREPIXELBUFFER TMOGRE_OUT($arg, $var, HardwarePixelBuffer) O_HARDWAREVERTEXBUFFER TMOGRE_OUT($arg, $var, HardwareVertexBuffer) O_INDEXDATA TMOGRE_OUT($arg, $var, IndexData) O_INSTANCEDGEOMETRY TMOGRE_OUT($arg, $var, InstancedGeometry) O_INTERSECTIONSCENEQUERY TMOGRE_OUT($arg, $var, IntersectionSceneQuery) O_KEYFRAME TMOGRE_OUT($arg, $var, KeyFrame) O_LIGHT TMOGRE_OUT($arg, $var, Light) O_LOG TMOGRE_OUT($arg, $var, Log) O_LOGMANAGER TMOGRE_OUT($arg, $var, LogManager) O_MANUALOBJECT TMOGRE_OUT($arg, $var, ManualObject) O_MANUALRESOURCELOADER TMOGRE_OUT($arg, $var, ManualResourceLoader) O_MATERIAL TMOGRE_OUT($arg, $var, Material) O_MATERIALMANAGER TMOGRE_OUT($arg, $var, MaterialManager) O_MATRIX3 TMOGRE_OUT($arg, $var, Matrix3) O_MATRIX4 TMOGRE_OUT($arg, $var, Matrix4) O_MESH TMOGRE_OUT($arg, $var, Mesh) O_MESHMANAGER TMOGRE_OUT($arg, $var, MeshManager) O_MESHPTR TMOGRE_OUT($arg, $var, MeshPtr) O_MOVABLEOBJECT TMOGRE_OUT($arg, $var, MovableObject) O_MULTIRENDERTARGET TMOGRE_OUT($arg, $var, MultiRenderTarget) O_NODE TMOGRE_OUT($arg, $var, Node) O_NODEANIMATIONTRACK TMOGRE_OUT($arg, $var, NodeAnimationTrack) O_NUMERICANIMATIONTRACK TMOGRE_OUT($arg, $var, NumericAnimationTrack) O_OVERLAY TMOGRE_OUT($arg, $var, Overlay) O_OVERLAYCONTAINER TMOGRE_OUT($arg, $var, OverlayContainer) O_OVERLAYELEMENT TMOGRE_OUT($arg, $var, OverlayElement) O_OVERLAYMANAGER TMOGRE_OUT($arg, $var, OverlayManager) O_PANELOVERLAYELEMENT TMOGRE_OUT($arg, $var, PanelOverlayElement) O_PARTICLE TMOGRE_OUT($arg, $var, Particle) O_PARTICLEAFFECTOR TMOGRE_OUT($arg, $var, ParticleAffector) O_PARTICLEEMITTER TMOGRE_OUT($arg, $var, ParticleEmitter) O_PARTICLESYSTEM TMOGRE_OUT($arg, $var, ParticleSystem) O_PARTICLESYSTEMRENDERER TMOGRE_OUT($arg, $var, ParticleSystemRenderer) O_PASS TMOGRE_OUT($arg, $var, Pass) O_PASSTHROUGHCONTROLLERFUNCTION TMOGRE_OUT($arg, $var, PassthroughControllerFunction) O_PATCHMESH TMOGRE_OUT($arg, $var, PatchMesh) O_PLANE TMOGRE_OUT($arg, $var, Plane) O_PLANEBOUNDEDVOLUME TMOGRE_OUT($arg, $var, PlaneBoundedVolume) O_PLANEBOUNDEDVOLUMELISTSCENEQUERY TMOGRE_OUT($arg, $var, PlaneBoundedVolumeListSceneQuery) O_POSE TMOGRE_OUT($arg, $var, Pose) O_QUATERNION TMOGRE_OUT($arg, $var, Quaternion) O_RADIAN TMOGRE_OUT($arg, $var, Radian) O_RAY TMOGRE_OUT($arg, $var, Ray) O_RAYSCENEQUERY TMOGRE_OUT($arg, $var, RaySceneQuery) O_REGIONSCENEQUERY TMOGRE_OUT($arg, $var, RegionSceneQuery) O_RESOURCE TMOGRE_OUT($arg, $var, Resource) O_RESOURCEGROUPMANAGER TMOGRE_OUT($arg, $var, ResourceGroupManager) O_RESOURCEMANAGER TMOGRE_OUT($arg, $var, ResourceManager) O_RENDERABLE TMOGRE_OUT($arg, $var, Renderable) O_RENDEROPERATION TMOGRE_OUT($arg, $var, RenderOperation) O_RENDERQUEUE TMOGRE_OUT($arg, $var, RenderQueue) O_RENDERSYSTEM TMOGRE_OUT($arg, $var, RenderSystem) O_RENDERSYSTEMCAPABILITIES TMOGRE_OUT($arg, $var, RenderSystemCapabilities) O_RENDERTARGET TMOGRE_OUT($arg, $var, RenderTarget) O_RENDERTEXTURE TMOGRE_OUT($arg, $var, RenderTexture) O_RENDERWINDOW TMOGRE_OUT($arg, $var, RenderWindow) O_RIBBONTRAIL TMOGRE_OUT($arg, $var, RibbonTrail) O_ROOT TMOGRE_OUT($arg, $var, Root) O_SCALECONTROLLERFUNCTION TMOGRE_OUT($arg, $var, ScaleControllerFunction) O_SCENEMANAGER TMOGRE_OUT($arg, $var, SceneManager) O_SCENENODE TMOGRE_OUT($arg, $var, SceneNode) O_SCENEQUERY TMOGRE_OUT($arg, $var, SceneQuery) O_SCRIPTLOADER TMOGRE_OUT($arg, $var, ScriptLoader) O_SHADOWCASTER TMOGRE_OUT($arg, $var, ShadowCaster) O_SKELETON TMOGRE_OUT($arg, $var, Skeleton) O_SKELETONINSTANCE TMOGRE_OUT($arg, $var, SkeletonInstance) O_SKELETONMANAGER TMOGRE_OUT($arg, $var, SkeletonManager) O_SPHERE TMOGRE_OUT($arg, $var, Sphere) O_SPHERESCENEQUERY TMOGRE_OUT($arg, $var, SphereSceneQuery) O_STATICGEOMETRY TMOGRE_OUT($arg, $var, StaticGeometry) O_STRINGINTERFACE TMOGRE_OUT($arg, $var, StringInterface) O_SUBENTITY TMOGRE_OUT($arg, $var, SubEntity) O_SUBMESH TMOGRE_OUT($arg, $var, SubMesh) O_TAGPOINT TMOGRE_OUT($arg, $var, TagPoint) O_TECHNIQUE TMOGRE_OUT($arg, $var, Technique) O_TEXTAREAOVERLAYELEMENT TMOGRE_OUT($arg, $var, TextAreaOverlayElement) O_TEXTURE TMOGRE_OUT($arg, $var, Texture) O_TEXTUREMANAGER TMOGRE_OUT($arg, $var, TextureManager) O_TEXTUREUNITSTATE TMOGRE_OUT($arg, $var, TextureUnitState) O_TIMEINDEX TMOGRE_OUT($arg, $var, TimeIndex) O_TIMER TMOGRE_OUT($arg, $var, Timer) O_TRANSFORMKEYFRAME TMOGRE_OUT($arg, $var, TransformKeyFrame) O_VECTOR2 TMOGRE_OUT($arg, $var, Vector2) O_VECTOR3 TMOGRE_OUT($arg, $var, Vector3) O_VECTOR4 TMOGRE_OUT($arg, $var, Vector4) O_VERTEXANIMATIONTRACK TMOGRE_OUT($arg, $var, VertexAnimationTrack) O_VERTEXBUFFERBINDING TMOGRE_OUT($arg, $var, VertexBufferBinding) O_VERTEXDATA TMOGRE_OUT($arg, $var, VertexData) O_VERTEXDECLARATION TMOGRE_OUT($arg, $var, VertexDeclaration) O_VERTEXELEMENT TMOGRE_OUT($arg, $var, VertexElement) O_VIEWPORT TMOGRE_OUT($arg, $var, Viewport) O_WAVEFORMCONTROLLERFUNCTION TMOGRE_OUT($arg, $var, WaveformControllerFunction) O_WINDOWEVENTLISTENER TMOGRE_OUT($arg, $var, WindowEventListener) Ogre-0.60/xs/0000755000175000017500000000000012162410433013165 5ustar slanningslanningOgre-0.60/xs/RenderWindow.xs0000644000175000017500000000261412146460465016167 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::RenderWindow # this is almost all wrapped # I think Root::createRenderWindow is the same, no? ## void create(const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams) void RenderWindow::setFullscreen(fullScreen, width, height) bool fullScreen unsigned int width unsigned int height void RenderWindow::destroy() void RenderWindow::resize(width, height) unsigned int width unsigned int height void RenderWindow::windowMovedOrResized() void RenderWindow::reposition(left, top) int left int top bool RenderWindow::isVisible() void RenderWindow::setVisible(visible) bool visible bool RenderWindow::isClosed() void RenderWindow::swapBuffers(waitForVSync=true) bool waitForVSync # two versions, one in RenderTarget #void #RenderWindow::update(swapBuffers) # bool swapBuffers bool RenderWindow::isFullScreen() ## C++ version uses output parameters (pointers), ## this Perl version will return a list instead: ## ($w, $h, $d, $l, $t) = $win->getMetrics(); ## (wow, that was painful to get working :) ## (note: there is a different version in RenderTarget) void RenderWindow::getMetrics(OUTLIST unsigned int width, OUTLIST unsigned int height, OUTLIST unsigned int colourDepth, OUTLIST int left, OUTLIST int top) C_ARGS: width, height, colourDepth, left, top Ogre-0.60/xs/SubMesh.xs0000644000175000017500000000372612150503003015110 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::SubMesh ### PUBLIC ATTRIBUTES (xxx: gimpy Perl interface) bool SubMesh::getUseSharedVertices() CODE: RETVAL = THIS->useSharedVertices; OUTPUT: RETVAL void SubMesh::setUseSharedVertices(bool val) CODE: THIS->useSharedVertices = val; int SubMesh::getOperationType() CODE: RETVAL = THIS->operationType; OUTPUT: RETVAL void SubMesh::setOperationType(int val) CODE: THIS->operationType = (Ogre::RenderOperation::OperationType)val; VertexData * SubMesh::getVertexData() CODE: RETVAL = THIS->vertexData; OUTPUT: RETVAL void SubMesh::setVertexData(data) VertexData * data CODE: THIS->vertexData = data; IndexData * SubMesh::getIndexData() CODE: RETVAL = THIS->indexData; OUTPUT: RETVAL void SubMesh::setIndexData(data) IndexData * data CODE: THIS->indexData = data; ## IndexMap blendIndexToBoneIndexMap ## std::vector< Vector3 > extremityPoints void SubMesh::setParent(mesh) Mesh * mesh CODE: THIS->parent = mesh; Mesh * SubMesh::getParent() CODE: RETVAL = THIS->parent; OUTPUT: RETVAL ### END OF PUBLIC ATTRIBUTES ### void SubMesh::setMaterialName(matName) String matName String SubMesh::getMaterialName() bool SubMesh::isMatInitialised() ## xxx: could pass 3 numbers instead of a struct ## void SubMesh::addBoneAssignment(const VertexBoneAssignment &vertBoneAssign) void SubMesh::clearBoneAssignments() ## BoneAssignmentIterator SubMesh::getBoneAssignmentIterator() ## AliasTextureIterator SubMesh::getAliasTextureIterator() void SubMesh::addTextureAlias(aliasName, textureName) String aliasName String textureName void SubMesh::removeTextureAlias(aliasName) String aliasName void SubMesh::removeAllTextureAliases() bool SubMesh::hasTextureAliases() size_t SubMesh::getTextureAliasCount() bool SubMesh::updateMaterialUsingTextureAliases() int SubMesh::getVertexAnimationType() void SubMesh::generateExtremes(size_t count) Ogre-0.60/xs/RegionSceneQuery.xs0000644000175000017500000000126212146460465017005 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::RegionSceneQuery ## xxx: listeners later ## void RegionSceneQuery::execute(SceneQueryListener *listener) SV * RegionSceneQuery::execute() CODE: SceneQueryResult& qres = THIS->execute(); RETVAL = perlOGRE_SQ2href(qres); OUTPUT: RETVAL SV * RegionSceneQuery::getLastResults() CODE: SceneQueryResult& qres = THIS->getLastResults(); RETVAL = perlOGRE_SQ2href(qres); OUTPUT: RETVAL void RegionSceneQuery::clearResults() ## XXX: this is a callback implementing SceneQueryListener interface ## bool RegionSceneQuery::queryResult(MovableObject *first) ## bool RegionSceneQuery::queryResult(SceneQuery::WorldFragment *fragment) Ogre-0.60/xs/ScriptLoader.xs0000644000175000017500000000005712146460465016152 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ScriptLoader Ogre-0.60/xs/Technique.xs0000644000175000017500000001213712146460465015506 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Technique ### note: Material, Technique, and Pass have a lot of methods in common bool Technique::isSupported() Pass * Technique::createPass() Pass * Technique::getPass(...) CODE: // xxx: I duplicate this in several places... but how do I factor it out? if (looks_like_number(ST(1))) { unsigned short index = (unsigned short)SvUV(ST(1)); RETVAL = THIS->getPass(index); } else { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String name = xstmpchr; RETVAL = THIS->getPass(name); } OUTPUT: RETVAL unsigned short Technique::getNumPasses() void Technique::removePass(unsigned short index) void Technique::removeAllPasses() bool Technique::movePass(unsigned short sourceIndex, unsigned short destinationIndex) ## const PassIterator Technique::getPassIterator() ## const IlluminationPassIterator Technique::getIlluminationPassIterator() Material * Technique::getParent() String Technique::getResourceGroup() bool Technique::isTransparent() bool Technique::isLoaded() void Technique::setPointSize(Real ps) void Technique::setAmbient(...) CODE: // xxx: also duplicated this in several places (also Light.xs) if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Colour")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setAmbient(*colour); } else if (items == 4) { THIS->setAmbient((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::Technique::setAmbient(THIS, col) or (THIS, r, g, b)\n"); } void Technique::setDiffuse(...) CODE: // xxx: also duplicated this in several places (also Light.xs) if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Colour")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setDiffuse(*colour); } else if (items == 5) { THIS->setDiffuse((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4))); } else { croak("Usage: Ogre::Technique::setDiffuse(THIS, col) or (THIS, r, g, b, a)\n"); } void Technique::setSpecular(...) CODE: // xxx: also duplicated this in several places (also Light.xs) if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Colour")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setSpecular(*colour); } else if (items == 5) { THIS->setSpecular((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4))); } else { croak("Usage: Ogre::Technique::setSpecular(THIS, col) or (THIS, r, g, b, a)\n"); } void Technique::setShininess(Real val) void Technique::setSelfIllumination(...) CODE: // xxx: also duplicated this in several places (also Light.xs) if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Colour")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setSelfIllumination(*colour); } else if (items == 4) { THIS->setSelfIllumination((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::Technique::setSelfIllumination(THIS, col) or (THIS, r, g, b)\n"); } void Technique::setDepthCheckEnabled(bool enabled) void Technique::setDepthWriteEnabled(bool enabled) void Technique::setDepthFunction(int func) C_ARGS: (CompareFunction)func void Technique::setColourWriteEnabled(bool enabled) void Technique::setCullingMode(int mode) C_ARGS: (CullingMode)mode void Technique::setManualCullingMode(int mode) C_ARGS: (ManualCullingMode)mode void Technique::setLightingEnabled(bool enabled) void Technique::setShadingMode(int mode) C_ARGS: (ShadeOptions)mode ### a lot of these methods are identical to those in Material... void Technique::setFog(bool overrideScene, int mode=FOG_NONE, const ColourValue *colour=&ColourValue::White, Real expDensity=0.001, Real linearStart=0.0, Real linearEnd=1.0) C_ARGS: overrideScene, (FogMode)mode, *colour, expDensity, linearStart, linearEnd void Technique::setDepthBias(float constantBias, float slopeScaleBias) void Technique::setTextureFiltering(int filterType) C_ARGS: (TextureFilterOptions)filterType void Technique::setTextureAnisotropy(unsigned int maxAniso) void Technique::setSceneBlending(...) CODE: if (items == 2) { THIS->setSceneBlending((SceneBlendType)SvIV(ST(1))); } else if (items == 3) { THIS->setSceneBlending((SceneBlendFactor)SvIV(ST(1)), (SceneBlendFactor)SvIV(ST(2))); } void Technique::setLodIndex(unsigned short index) unsigned short Technique::getLodIndex() void Technique::setSchemeName(String schemeName) String Technique::getSchemeName() bool Technique::isDepthWriteEnabled() bool Technique::isDepthCheckEnabled() bool Technique::hasColourWriteDisabled() void Technique::setName(String name) String Technique::getName() ## bool Technique::applyTextureAliases(const AliasTextureNamePairList &aliasList, const bool apply=true) Ogre-0.60/xs/RenderSystem.xs0000644000175000017500000001154612146460465016210 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::RenderSystem String RenderSystem::getName() ## ConfigOptionMap & RenderSystem::getConfigOptions() void RenderSystem::setConfigOption(name, value) String name String value HardwareOcclusionQuery * RenderSystem::createHardwareOcclusionQuery() void RenderSystem::destroyHardwareOcclusionQuery(hq) HardwareOcclusionQuery * hq String RenderSystem::validateConfigOptions() void RenderSystem::reinitialise() void RenderSystem::shutdown() ## why are these not Real ? void RenderSystem::setAmbientLight(float r, float g, float b) void RenderSystem::setShadingType(int so) C_ARGS: (ShadeOptions)so void RenderSystem::setLightingEnabled(bool enabled) void RenderSystem::setWBufferEnabled(bool enabled) bool RenderSystem::getWBufferEnabled() MultiRenderTarget * RenderSystem::createMultiRenderTarget(name) String name void RenderSystem::destroyRenderWindow(name) String name void RenderSystem::destroyRenderTexture(name) String name void RenderSystem::destroyRenderTarget(name) String name void RenderSystem::attachRenderTarget(target) RenderTarget * target C_ARGS: *target RenderTarget * RenderSystem::getRenderTarget(name) String name RenderTarget * RenderSystem::detachRenderTarget(name) String name ## RenderTargetIterator RenderSystem::getRenderTargetIterator() String RenderSystem::getErrorDescription(long errorNumber) void RenderSystem::setWaitForVerticalBlank(bool enabled) bool RenderSystem::getWaitForVerticalBlank() ## void RenderSystem::convertColourValue(const ColourValue &colour, uint32 *pDest) int RenderSystem::getColourVertexElementType() void RenderSystem::setStencilCheckEnabled(bool enabled) void RenderSystem::setStencilBufferParams(int func=CMPF_ALWAYS_PASS, uint32 refValue, uint32 mask=0xFFFFFFFF, int stencilFailOp=SOP_KEEP, int depthFailOp=SOP_KEEP, int passOp=SOP_KEEP, bool twoSidedOperation=false) C_ARGS: (CompareFunction)func, refValue, mask, (StencilOperation)stencilFailOp, (StencilOperation)depthFailOp, (StencilOperation)passOp, twoSidedOperation void RenderSystem::setVertexDeclaration(VertexDeclaration *decl) void RenderSystem::setVertexBufferBinding(VertexBufferBinding *binding) void RenderSystem::setNormaliseNormals(bool normalise) const RenderSystemCapabilities * RenderSystem::getCapabilities() void RenderSystem::bindGpuProgram(GpuProgram *prg) void RenderSystem::bindGpuProgramParameters(gptype, params, variabilityMask) int gptype GpuProgramParameters * params uint16 variabilityMask CODE: GpuProgramParametersSharedPtr paramsPtr = GpuProgramParametersSharedPtr(params); THIS->bindGpuProgramParameters((GpuProgramType)gptype, paramsPtr, variabilityMask); void RenderSystem::bindGpuProgramPassIterationParameters(int gptype) C_ARGS: (GpuProgramType)gptype void RenderSystem::unbindGpuProgram(int gptype) C_ARGS: (GpuProgramType)gptype bool RenderSystem::isGpuProgramBound(int gptype) C_ARGS: (GpuProgramType)gptype ## void RenderSystem::setClipPlanes(const PlaneList &clipPlanes) #### void RenderSystem::setClipPlane(ushort index, Plane &p) #### void RenderSystem::setClipPlane(ushort index, Real A, Real B, Real C, Real D) ##void ##RenderSystem::setClipPlane(index, ...) ## unsigned short index ## CODE: ## if (items == 3 && sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Plane")) { ## unsigned short index = (unsigned short)SvUV(ST(1)); ## Plane *p = (Plane *) SvIV((SV *) SvRV(ST(2))); ## THIS->setClipPlane(index, *p); ## } ## else if (items == 6) { ## THIS->setClipPlane((unsigned short)SvUV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4)), (Real)SvNV(ST(5))); ## } ## else { ## croak("Usage: Ogre::RenderSystem::setClipPlane(THIS, index, plane) or (THIS, index, A, B, C, D)\n"); ## } ## ##void ##RenderSystem::enableClipPlane(unsigned short index, bool enable) void RenderSystem::setInvertVertexWinding(bool invert) void RenderSystem::setScissorTest(bool enabled, size_t left=0, size_t top=0, size_t right=800, size_t bottom=600) void RenderSystem::clearFrameBuffer(buffers, colour=&ColourValue::Black, depth=1.0f, stencil=0) unsigned int buffers const ColourValue * colour Real depth unsigned short stencil C_ARGS: buffers, *colour, depth, stencil Real RenderSystem::getHorizontalTexelOffset() Real RenderSystem::getVerticalTexelOffset() Real RenderSystem::getMinimumDepthInputValue() Real RenderSystem::getMaximumDepthInputValue() void RenderSystem::setCurrentPassIterationCount(size_t count) ## void RenderSystem::addListener(Listener *l) ## void RenderSystem::removeListener(Listener *l) ## xxx: const StringVector & RenderSystem::getRenderSystemEvents() void RenderSystem::preExtraThreadsStarted() void RenderSystem::postExtraThreadsStarted() void RenderSystem::registerThread() void RenderSystem::unregisterThread() Ogre-0.60/xs/PlaneBoundedVolumeListSceneQuery.xs0000644000175000017500000000066512146460465022154 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::PlaneBoundedVolumeListSceneQuery void PlaneBoundedVolumeListSceneQuery::setVolumes(SV *volumes_sv) CODE: PlaneBoundedVolumeList *volumes = perlOGRE_aref2PBVL(volumes_sv, "Ogre::SceneManager::setVolumes"); THIS->setVolumes(*volumes); delete volumes; ## const PlaneBoundedVolumeList & PlaneBoundedVolumeListSceneQuery::getVolumes() Ogre-0.60/xs/Billboard.xs0000644000175000017500000000005512146460465015447 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Billboard Ogre-0.60/xs/MultiRenderTarget.xs0000644000175000017500000000052312146460465017156 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::MultiRenderTarget void MultiRenderTarget::bindSurface(attachment, target) size_t attachment RenderTexture * target void MultiRenderTarget::unbindSurface(size_t attachment) # note: this intentionally throws an exception void MultiRenderTarget::writeContentsToFile(filename) String filename Ogre-0.60/xs/WindowEventUtilities.xs0000644000175000017500000000077212146460465017730 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::WindowEventUtilities static void WindowEventUtilities::messagePump() static void WindowEventUtilities::addWindowEventListener(win, perlListener) RenderWindow * win SV * perlListener CODE: pogreCallbackManager.addWindowEventListener(perlListener, win); static void WindowEventUtilities::removeWindowEventListener(win, perlListener) RenderWindow * win SV * perlListener CODE: pogreCallbackManager.removeWindowEventListener(perlListener, win); Ogre-0.60/xs/ResourceManager.xs0000644000175000017500000000565612146460465016653 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ResourceManager ## xxx: skipped last arg, NameValuePairList Resource * ResourceManager::create(String name, String group, bool isManual=false, ManualResourceLoader *loader=0) CODE: RETVAL = THIS->create(name, group, isManual, loader).getPointer(); OUTPUT: RETVAL ## xxx: ## ResourceCreateOrRetrieveResult ResourceManager::createOrRetrieve(String name, String group, bool isManual=false, ManualResourceLoader *loader=0, const NameValuePairList *createParams=0) void ResourceManager::setMemoryBudget(size_t bytes) size_t ResourceManager::getMemoryBudget() size_t ResourceManager::getMemoryUsage() void ResourceManager::unload(...) CODE: if (looks_like_number(ST(1))) { THIS->unload((Ogre::ResourceHandle) SvUV(ST(1))); } else { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String name = xstmpchr; THIS->unload(name); } void ResourceManager::unloadAll(bool reloadableOnly=true) void ResourceManager::reloadAll(bool reloadableOnly=true) void ResourceManager::unloadUnreferencedResources(bool reloadableOnly=true) void ResourceManager::reloadUnreferencedResources(bool reloadableOnly=true) void ResourceManager::remove(...) CODE: if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Resource")) { Resource *r = (Resource *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN ResourcePtr rptr = ResourcePtr(r); THIS->remove(rptr); } else if (looks_like_number(ST(1))) { THIS->remove((Ogre::ResourceHandle) SvUV(ST(1))); } else { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String name = xstmpchr; THIS->remove(name); } void ResourceManager::removeAll() Resource * ResourceManager::getByName(String name) CODE: RETVAL = THIS->getByName(name).getPointer(); OUTPUT: RETVAL Resource * ResourceManager::getByHandle(ResourceHandle handle) CODE: RETVAL = THIS->getByHandle(handle).getPointer(); OUTPUT: RETVAL bool ResourceManager::resourceExists(...) CODE: if (looks_like_number(ST(1))) { RETVAL = THIS->resourceExists((Ogre::ResourceHandle) SvUV(ST(1))); } else { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String name = xstmpchr; RETVAL = THIS->resourceExists(name); } OUTPUT: RETVAL ## xxx: skipped last arg, NameValuePairList Resource * ResourceManager::load(String name, String group, bool isManual=false, ManualResourceLoader *loader=0) CODE: RETVAL = THIS->load(name, group, isManual, loader).getPointer(); OUTPUT: RETVAL ## const StringVector & ResourceManager::getScriptPatterns() void ResourceManager::parseScript(DataStream *stream, String groupName) CODE: DataStreamPtr streamptr = DataStreamPtr(stream); THIS->parseScript(streamptr, groupName); Real ResourceManager::getLoadingOrder() String ResourceManager::getResourceType() ## ResourceMapIterator ResourceManager::getResourceIterator() Ogre-0.60/xs/VertexElement.xs0000644000175000017500000000252712146460465016352 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::VertexElement static size_t VertexElement::getTypeSize(int etype) C_ARGS: (VertexElementType)etype static unsigned short VertexElement::getTypeCount(int etype) C_ARGS: (VertexElementType)etype static int VertexElement::multiplyTypeCount(int baseType, unsigned short count) C_ARGS: (VertexElementType)baseType, count static int VertexElement::getBaseType(int multiType) C_ARGS: (VertexElementType)multiType ## static void VertexElement::convertColourValue(VertexElementType srcType, VertexElementType dstType, uint32 *ptr) ## static uint32 VertexElement::convertColourValue(const ColourValue &src, VertexElementType dst) static int VertexElement::getBestColourVertexElementType() unsigned short VertexElement::getSource() size_t VertexElement::getOffset() int VertexElement::getType() int VertexElement::getSemantic() unsigned short VertexElement::getIndex() size_t VertexElement::getSize() ## void VertexElement::baseVertexPointerToElement(void *pBase, void **pElem) ## void VertexElement::baseVertexPointerToElement(void *pBase, float **pElem) ## void VertexElement::baseVertexPointerToElement(void *pBase, RGBA **pElem) ## void VertexElement::baseVertexPointerToElement(void *pBase, unsigned char **pElem) ## void VertexElement::baseVertexPointerToElement(void *pBase, unsigned short **pElem) Ogre-0.60/xs/InstancedGeometry.xs0000644000175000017500000000006512146460465017202 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::InstancedGeometry Ogre-0.60/xs/ManualObject.xs0000644000175000017500000001100412146460465016115 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ManualObject ## note: if constructor/destructor ever added, refer to BillboardSet.xs ## (really need to fix that....) void ManualObject::clear() void ManualObject::estimateVertexCount(size_t vcount) void ManualObject::estimateIndexCount(size_t icount) void ManualObject::begin(String materialName, int opType=RenderOperation::OT_TRIANGLE_LIST) C_ARGS: materialName, (RenderOperation::OperationType)opType void ManualObject::setDynamic(bool dyn) bool ManualObject::getDynamic() void ManualObject::beginUpdate(size_t sectionIndex) void ManualObject::position(...) CODE: if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->position(*vec); } else if (items == 4) { THIS->position((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::ManualObject::position(THIS, vec) or (THIS, x , y, z)\n"); } ## XXX: one day when I am a big boy I will know how to typemap Vector3 OR Reals void ManualObject::normal(...) CODE: if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->normal(*vec); } else if (items == 4) { THIS->normal((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::ManualObject::normal(THIS, vec) or (THIS, x , y, z)\n"); } void ManualObject::textureCoord(...) PREINIT: char *usage = "Usage: Ogre::ManualObject::textureCoord(THIS, vec2) or (THIS, vec3) or (THIS, u [, v [, w]])\n"; CODE: if (items == 2) { if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector2")) { Vector2 *vec = (Vector2 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->textureCoord(*vec); } else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->textureCoord(*vec); } else if (looks_like_number(ST(1))) { THIS->textureCoord((Real)SvNV(ST(1))); } else { croak("%s", usage); } } else if (items == 3) { // assuming Real THIS->textureCoord((Real)SvNV(ST(1)), (Real)SvNV(ST(2))); } else if (items == 4) { // assuming Real THIS->textureCoord((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("%s", usage); } ## XXX: one day when I am a big boy I will know how to typemap ColourValue OR Reals void ManualObject::colour(...) CODE: if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::ColourValue")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->colour(*colour); } else if (items >= 4) { Real a = 1.0f; if (items == 5) a = (Real)SvNV(ST(4)); THIS->colour((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), a); } else { croak("Usage: Ogre::ManualObject::colour(THIS, col) or (THIS, r, g, b [, a])\n"); } void ManualObject::index(uint16 idx) void ManualObject::triangle(uint16 i1, uint16 i2, uint16 i3) void ManualObject::quad(uint16 i1, uint16 i2, uint16 i3, uint16 i4) ManualObjectSection * ManualObject::end() void ManualObject::setMaterialName(size_t subindex, String name) Mesh * ManualObject::convertToMesh(String meshName, String groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) CODE: RETVAL = THIS->convertToMesh(meshName, groupName).getPointer(); OUTPUT: RETVAL void ManualObject::setUseIdentityProjection(bool useIdentityProjection) bool ManualObject::getUseIdentityProjection() void ManualObject::setUseIdentityView(bool useIdentityView) bool ManualObject::getUseIdentityView() void ManualObject::setBoundingBox(const AxisAlignedBox *box) C_ARGS: *box ManualObjectSection * ManualObject::getSection(unsigned int index) unsigned int ManualObject::getNumSections() String ManualObject::getMovableType() ## const AxisAlignedBox & ManualObject::getBoundingBox() Real ManualObject::getBoundingRadius() EdgeData * ManualObject::getEdgeList() bool ManualObject::hasEdgeList() ## ShadowRenderableListIterator ManualObject::getShadowVolumeRenderableIterator(ShadowTechnique shadowTechnique, const Light *light, HardwareIndexBufferSharedPtr *indexBuffer, bool extrudeVertices, Real extrusionDist, unsigned long flags=0) Ogre-0.60/xs/OverlayContainer.xs0000644000175000017500000000165112146460465017044 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::OverlayContainer void OverlayContainer::addChild(elem) OverlayElement * elem ## xxx: C++ has another version where you can pass an OverlayElement* ## but why not use addChild? Also, what is "Impl"? void OverlayContainer::addChildImpl(cont) OverlayContainer * cont void OverlayContainer::removeChild(name) String name OverlayElement * OverlayContainer::getChild(name) String name void OverlayContainer::initialise() ## ChildIterator getChildIterator (void) ## ChildContainerIterator getChildContainerIterator (void) bool OverlayContainer::isContainer() bool OverlayContainer::isChildrenProcessEvents() void OverlayContainer::setChildrenProcessEvents(val) bool val OverlayElement * OverlayContainer::findElementAt(Real x, Real y) void OverlayContainer::copyFromTemplate(OverlayElement *templateOverlay) OverlayElement * OverlayContainer::clone(String instanceName) Ogre-0.60/xs/VertexBufferBinding.xs0000644000175000017500000000006712146460465017462 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::VertexBufferBinding Ogre-0.60/xs/ResourceGroupManager.xs0000644000175000017500000000206412146460465017656 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ResourceGroupManager static ResourceGroupManager * ResourceGroupManager::getSingletonPtr() ## void addResourceLocation (const String &name, const String &locType, const String &resGroup=DEFAULT_RESOURCE_GROUP_NAME, bool recursive=false) void ResourceGroupManager::addResourceLocation(name, locType, resGroup) String name String locType String resGroup void ResourceGroupManager::initialiseAllResourceGroups() ## resource group names String DEFAULT_RESOURCE_GROUP_NAME() ALIAS: INTERNAL_RESOURCE_GROUP_NAME = 1 AUTODETECT_RESOURCE_GROUP_NAME = 2 RESOURCE_SYSTEM_NUM_REFERENCE_COUNTS = 3 CODE: switch (ix) { case 0: RETVAL = Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME; break; case 1: RETVAL = Ogre::ResourceGroupManager::INTERNAL_RESOURCE_GROUP_NAME; break; case 2: RETVAL = Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME; break; case 3: RETVAL = Ogre::ResourceGroupManager::RESOURCE_SYSTEM_NUM_REFERENCE_COUNTS; break; } OUTPUT: RETVAL Ogre-0.60/xs/ParticleEmitter.xs0000644000175000017500000000006312146460465016651 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ParticleEmitter Ogre-0.60/xs/RenderOperation.xs0000644000175000017500000000122112146460465016651 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::RenderOperation # Here I assume the Public Attributes are read-only; # let me know if that is incorrect VertexData * RenderOperation::vertexData() CODE: RETVAL = THIS->vertexData; OUTPUT: RETVAL int RenderOperation::operationType() CODE: RETVAL = THIS->operationType; OUTPUT: RETVAL bool RenderOperation::useIndexes() CODE: RETVAL = THIS->useIndexes; OUTPUT: RETVAL IndexData * RenderOperation::indexData() CODE: RETVAL = THIS->indexData; OUTPUT: RETVAL const Renderable * RenderOperation::srcRenderable() CODE: RETVAL = THIS->srcRenderable; OUTPUT: RETVAL Ogre-0.60/xs/ParticleSystem.xs0000644000175000017500000000753212146460465016534 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ParticleSystem ## note: if constructor/destructor ever added, refer to BillboardSet.xs static void ParticleSystem::setDefaultIterationInterval(Real iterationInterval) static Real ParticleSystem::getDefaultIterationInterval() static void ParticleSystem::setDefaultNonVisibleUpdateTimeout(Real timeout) static Real ParticleSystem::getDefaultNonVisibleUpdateTimeout() static void ParticleSystem::cleanupDictionary() static void ParticleSystem::setDefaultQueryFlags(uint32 flags) static uint32 ParticleSystem::getDefaultQueryFlags() static void ParticleSystem::setDefaultVisibilityFlags(uint32 flags) static uint32 ParticleSystem::getDefaultVisibilityFlags() static void ParticleSystem::extrudeVertices(vertexBuffer, originalVertexCount, lightPos, extrudeDist) HardwareVertexBuffer * vertexBuffer size_t originalVertexCount const Vector4 * lightPos Real extrudeDist CODE: const HardwareVertexBufferSharedPtr vertexBufferPtr = HardwareVertexBufferSharedPtr(vertexBuffer); Ogre::ParticleSystem::extrudeVertices(vertexBufferPtr, originalVertexCount, *lightPos, extrudeDist); void ParticleSystem::setRenderer(typeName) String typeName ParticleSystemRenderer * ParticleSystem::getRenderer() String ParticleSystem::getRendererName() ParticleEmitter * ParticleSystem::addEmitter(emitterType) String emitterType ParticleEmitter * ParticleSystem::getEmitter(unsigned short index) unsigned short ParticleSystem::getNumEmitters() void ParticleSystem::removeEmitter(unsigned short index) void ParticleSystem::removeAllEmitters() ParticleAffector * ParticleSystem::addAffector(affectorType) String affectorType ParticleAffector * ParticleSystem::getAffector(unsigned short index) unsigned short ParticleSystem::getNumAffectors() void ParticleSystem::removeAffector(unsigned short index) void ParticleSystem::removeAllAffectors() void ParticleSystem::clear() size_t ParticleSystem::getNumParticles() Particle * ParticleSystem::createParticle() Particle * ParticleSystem::createEmitterParticle(emitterName) String emitterName Particle * ParticleSystem::getParticle(size_t index) size_t ParticleSystem::getParticleQuota() void ParticleSystem::setParticleQuota(size_t quota) size_t ParticleSystem::getEmittedEmitterQuota() void ParticleSystem::setEmittedEmitterQuota(size_t quota) void ParticleSystem::setMaterialName(name) String name String ParticleSystem::getMaterialName() ## xxx: const AxisAlignedBox & ParticleSystem::getBoundingBox() Real ParticleSystem::getBoundingRadius() void ParticleSystem::fastForward(Real time, Real interval=0.1) void ParticleSystem::setSpeedFactor(Real speedFactor) Real ParticleSystem::getSpeedFactor() void ParticleSystem::setIterationInterval(Real iterationInterval) Real ParticleSystem::getIterationInterval() void ParticleSystem::setNonVisibleUpdateTimeout(Real timeout) Real ParticleSystem::getNonVisibleUpdateTimeout() String ParticleSystem::getMovableType() void ParticleSystem::setDefaultDimensions(Real width, Real height) void ParticleSystem::setDefaultWidth(Real width) Real ParticleSystem::getDefaultWidth() void ParticleSystem::setDefaultHeight(Real height) Real ParticleSystem::getDefaultHeight() bool ParticleSystem::getCullIndividually() void ParticleSystem::setCullIndividually(bool cullIndividual) String ParticleSystem::getResourceGroupName() String ParticleSystem::getOrigin() void ParticleSystem::setRenderQueueGroup(uint8 queueID) void ParticleSystem::setSortingEnabled(bool enabled) bool ParticleSystem::getSortingEnabled() void ParticleSystem::setBounds(aabb) const AxisAlignedBox * aabb C_ARGS: *aabb void ParticleSystem::setBoundsAutoUpdated(bool autoUpdate, Real stopIn=0.0f) void ParticleSystem::setKeepParticlesInLocalSpace(bool keepLocal) bool ParticleSystem::getKeepParticlesInLocalSpace() uint32 ParticleSystem::getTypeFlags() Ogre-0.60/xs/ParticleSystemRenderer.xs0000644000175000017500000000007212146460465020213 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ParticleSystemRenderer Ogre-0.60/xs/ShadowCaster.xs0000644000175000017500000000006012146460465016140 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ShadowCaster Ogre-0.60/xs/ControllerReal.xs0000644000175000017500000000115312146460465016504 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ControllerReal ## void Controller::setSource(const SharedPtr< ControllerValue< T > > &src) ## const SharedPtr< ControllerValue > & Controller::getSource() ## void Controller::setDestination(const SharedPtr< ControllerValue< T > > &dest) ## const SharedPtr< ControllerValue > & Controller::getDestination() bool ControllerReal::getEnabled() void ControllerReal::setEnabled(bool enabled) ## void Controller::setFunction(const SharedPtr< ControllerFunction< T > > &func) ## const SharedPtr< ControllerFunction > & Controller::getFunction() void ControllerReal::update() Ogre-0.60/xs/Overlay.xs0000644000175000017500000000212512146460465015176 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Overlay OverlayContainer * Overlay::getChild(name) String name String Overlay::getName() void Overlay::setZOrder(zorder) unsigned short zorder unsigned short Overlay::getZOrder() bool Overlay::isVisible() bool Overlay::isInitialised() void Overlay::show() void Overlay::hide() void Overlay::add2D(cont) OverlayContainer * cont void Overlay::remove2D(cont) OverlayContainer * cont void Overlay::add3D(node) SceneNode * node void Overlay::remove3D(node) SceneNode * node void Overlay::clear() void Overlay::setScroll(x, y) Real x Real y Real Overlay::getScrollX() Real Overlay::getScrollY() void Overlay::scroll(xoff, yoff) Real xoff Real yoff void Overlay::setRotate(angle) DegRad * angle C_ARGS: *angle # Degree &getRotate() void Overlay::rotate(angle) DegRad * angle C_ARGS: *angle void Overlay::setScale(x, y) Real x Real y Real Overlay::getScaleX() Real Overlay::getScaleY() OverlayElement * Overlay::findElementAt(x, y) Real x Real y String Overlay::getOrigin() Ogre-0.60/xs/AxisAlignedBoxSceneQuery.xs0000644000175000017500000000031612146460465020422 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::AxisAlignedBoxSceneQuery void AxisAlignedBoxSceneQuery::setBox(const AxisAlignedBox *box) C_ARGS: *box ## const AxisAlignedBox & AxisAlignedBoxSceneQuery::getBox() Ogre-0.60/xs/VertexData.xs0000644000175000017500000000400412150362737015620 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::VertexData ### PUBLIC ATTRIBUTES (xxx: gimpy Perl interface) void VertexData::setVertexDeclaration(val) VertexDeclaration * val CODE: THIS->vertexDeclaration = val; VertexDeclaration * VertexData::getVertexDeclaration() CODE: RETVAL = THIS->vertexDeclaration; OUTPUT: RETVAL void VertexData::setVertexBufferBinding(val) VertexBufferBinding * val CODE: THIS->vertexBufferBinding = val; VertexBufferBinding * VertexData::getVertexBufferBinding() CODE: RETVAL = THIS->vertexBufferBinding; OUTPUT: RETVAL void VertexData::setVertexStart(size_t val) CODE: THIS->vertexStart = val; size_t VertexData::getVertexStart() CODE: RETVAL = THIS->vertexStart; OUTPUT: RETVAL void VertexData::setVertexCount(size_t val) CODE: THIS->vertexCount = val; size_t VertexData::getVertexCount() CODE: RETVAL = THIS->vertexCount; OUTPUT: RETVAL ## HardwareAnimationDataList hwAnimationDataList void VertexData::setHwAnimDataItemsUsed(size_t val) CODE: THIS->hwAnimDataItemsUsed = val; size_t VertexData::getHwAnimDataItemsUsed() CODE: RETVAL = THIS->hwAnimDataItemsUsed; OUTPUT: RETVAL ## HardwareVertexBufferSharedPtr hardwareShadowVolWBuffer ### END OF PUBLIC ATTRIBUTES ### VertexData * VertexData::clone(bool copyData=true) void VertexData::prepareForShadowVolume() ## xxx: ## std::vector ## void VertexData::reorganiseBuffers(VertexDeclaration *newDeclaration, const BufferUsageList &bufferUsage) void VertexData::reorganiseBuffers(VertexDeclaration *newDeclaration) void VertexData::closeGapsInBindings() void VertexData::removeUnusedBuffers() void VertexData::convertPackedColour(int srcType, int destType) C_ARGS: (VertexElementType)srcType, (VertexElementType)destType #if OGRE_VERSION >= 0x010800 void VertexData::allocateHardwareAnimationElements(unsigned short count, bool animateNormals) #else void VertexData::allocateHardwareAnimationElements(unsigned short count) #endif Ogre-0.60/xs/BillboardChain.xs0000644000175000017500000000412112146460465016410 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::BillboardChain ## note: if constructor/destructor ever added, refer to BillboardSet.xs void BillboardChain::setMaxChainElements(size_t maxElements) size_t BillboardChain::getMaxChainElements() void BillboardChain::setNumberOfChains(size_t numChains) size_t BillboardChain::getNumberOfChains() void BillboardChain::setUseTextureCoords(bool use) bool BillboardChain::getUseTextureCoords() void BillboardChain::setTextureCoordDirection(int dir) C_ARGS: (BillboardChain::TexCoordDirection)dir int BillboardChain::getTextureCoordDirection() void BillboardChain::setOtherTextureCoordRange(Real start, Real end) ## const Real * BillboardChain::getOtherTextureCoordRange() void BillboardChain::setUseVertexColours(bool use) bool BillboardChain::getUseVertexColours() void BillboardChain::setDynamic(bool dyn) bool BillboardChain::getDynamic() ## note: Ogre::BillboardChain::Element ## void BillboardChain::addChainElement(size_t chainIndex, const Element *billboardChainElement) void BillboardChain::removeChainElement(size_t chainIndex) ## note: Ogre::BillboardChain::Element ## void BillboardChain::updateChainElement(size_t chainIndex, size_t elementIndex, const Element &billboardChainElement) ## const Element & BillboardChain::getChainElement(size_t chainIndex, size_t elementIndex) void BillboardChain::clearChain(size_t chainIndex) void BillboardChain::clearAllChains() String BillboardChain::getMaterialName() void BillboardChain::setMaterialName(String name) Real BillboardChain::getSquaredViewDepth(const Camera *cam) Real BillboardChain::getBoundingRadius() ## too lazy to do this at the moment ## const AxisAlignedBox & BillboardChain::getBoundingBox() ## const MaterialPtr & BillboardChain::getMaterial() String BillboardChain::getMovableType() ## note: c.f. xs/Node.xs ## void BillboardChain::getRenderOperation(RenderOperation &) ## void BillboardChain::getWorldTransforms(Matrix4 *) ## const Quaternion & BillboardChain::getWorldOrientation() ## const Vector3 & BillboardChain::getWorldPosition() ## const LightList & BillboardChain::getLights() Ogre-0.60/xs/Bone.xs0000644000175000017500000000075012146460465014442 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Bone Bone * Bone::createChild(handle, translate=&Vector3::ZERO, rotate=&Quaternion::IDENTITY) unsigned short handle const Vector3 * translate const Quaternion * rotate C_ARGS: handle, *translate, *rotate unsigned short Bone::getHandle() void Bone::setBindingPose() void Bone::reset() void Bone::setManuallyControlled(bool manuallyControlled) bool Bone::isManuallyControlled() void Bone::needUpdate(bool forceParentUpdate=false) Ogre-0.60/xs/Material.xs0000644000175000017500000001366512146460465015326 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Material ### note: Material, Technique, and Pass have a lot of methods in common bool Material::isTransparent() void Material::setReceiveShadows(bool enabled) bool Material::getReceiveShadows() void Material::setTransparencyCastsShadows(bool enabled) bool Material::getTransparencyCastsShadows() Technique * Material::createTechnique() Technique * Material::getTechnique(...) CODE: if (looks_like_number(ST(1))) { unsigned short index = (unsigned short)SvUV(ST(1)); RETVAL = THIS->getTechnique(index); } else { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String name = xstmpchr; RETVAL = THIS->getTechnique(name); } OUTPUT: RETVAL unsigned short Material::getNumTechniques() void Material::removeTechnique(unsigned short index) void Material::removeAllTechniques() ## TechniqueIterator Material::getTechniqueIterator() ## TechniqueIterator Material::getSupportedTechniqueIterator() Technique * Material::getSupportedTechnique(unsigned short index) unsigned short Material::getNumSupportedTechniques() String Material::getUnsupportedTechniquesExplanation() unsigned short Material::getNumLodLevels(...) CODE: // xxx: I duplicate this in several places... but how do I factor it out? if (looks_like_number(ST(1))) { unsigned short schemeIndex = (unsigned short)SvUV(ST(1)); RETVAL = THIS->getNumLodLevels(schemeIndex); } else { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String schemeName = xstmpchr; RETVAL = THIS->getNumLodLevels(schemeName); } OUTPUT: RETVAL Technique * Material::getBestTechnique(unsigned short lodIndex=0) Material * Material::clone(String newName, bool changeGroup=false, String newGroup=StringUtil::BLANK) CODE: RETVAL = THIS->clone(newName, changeGroup, (const String)newGroup).getPointer(); OUTPUT: RETVAL void Material::copyDetailsTo(Material *mat) CODE: MaterialPtr matptr = MaterialPtr(mat); THIS->copyDetailsTo(matptr); void Material::compile(bool autoManageTextureUnits=true) void Material::setPointSize(Real ps) void Material::setAmbient(...) CODE: // xxx: also duplicated this in several places (also Light.xs) if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Colour")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setAmbient(*colour); } else if (items == 4) { THIS->setAmbient((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::Material::setAmbient(THIS, col) or (THIS, r, g, b)\n"); } void Material::setDiffuse(...) CODE: // xxx: also duplicated this in several places (also Light.xs) if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Colour")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setDiffuse(*colour); } else if (items == 5) { THIS->setDiffuse((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4))); } else { croak("Usage: Ogre::Material::setDiffuse(THIS, col) or (THIS, r, g, b, a)\n"); } void Material::setSpecular(...) CODE: // xxx: also duplicated this in several places (also Light.xs) if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Colour")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setSpecular(*colour); } else if (items == 5) { THIS->setSpecular((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4))); } else { croak("Usage: Ogre::Material::setSpecular(THIS, col) or (THIS, r, g, b, a)\n"); } void Material::setShininess(Real val) void Material::setSelfIllumination(...) CODE: // xxx: also duplicated this in several places (also Light.xs) if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Colour")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setSelfIllumination(*colour); } else if (items == 4) { THIS->setSelfIllumination((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::Material::setSelfIllumination(THIS, col) or (THIS, r, g, b)\n"); } void Material::setDepthCheckEnabled(bool enabled) void Material::setDepthWriteEnabled(bool enabled) void Material::setDepthFunction(int func) C_ARGS: (CompareFunction)func void Material::setColourWriteEnabled(bool enabled) void Material::setCullingMode(int mode) C_ARGS: (CullingMode)mode void Material::setManualCullingMode(int mode) C_ARGS: (ManualCullingMode)mode void Material::setLightingEnabled(bool enabled) void Material::setShadingMode(int mode) C_ARGS: (ShadeOptions)mode void Material::setFog(bool overrideScene, int mode=FOG_NONE, const ColourValue *colour=&ColourValue::White, Real expDensity=0.001, Real linearStart=0.0, Real linearEnd=1.0) C_ARGS: overrideScene, (FogMode)mode, *colour, expDensity, linearStart, linearEnd # why not Real instead of float ? void Material::setDepthBias(float constantBias, float slopeScaleBias) void Material::setTextureFiltering(int filterType) C_ARGS: (TextureFilterOptions)filterType void Material::setTextureAnisotropy(int maxAniso) void Material::setSceneBlending(...) CODE: if (items == 2) { THIS->setSceneBlending((SceneBlendType)SvIV(ST(1))); } else if (items == 3) { THIS->setSceneBlending((SceneBlendFactor)SvIV(ST(1)), (SceneBlendFactor)SvIV(ST(2))); } ## void Material::setLodLevels(const LodDistanceList &lodDistances) ## LodDistanceIterator Material::getLodDistanceIterator() unsigned short Material::getLodIndex(Real d) void Material::touch() ## bool Material::applyTextureAliases(const AliasTextureNamePairList &aliasList, const bool apply=true) bool Material::getCompilationRequired() Ogre-0.60/xs/OverlayManager.xs0000644000175000017500000000462012146460465016473 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::OverlayManager static OverlayManager * OverlayManager::getSingletonPtr() Overlay * OverlayManager::create(name) String name Overlay * OverlayManager::getByName(name) String name # there is another version passing the Overlay* void OverlayManager::destroy(name) String name void OverlayManager::destroyAll() bool OverlayManager::hasViewportChanged() int OverlayManager::getViewportHeight() int OverlayManager::getViewportWidth() Real OverlayManager::getViewportAspectRatio() OverlayElement * OverlayManager::createOverlayElement(String typeName, String instanceName, bool isTemplate=false) ## note: added to Perl, same as createOverlayElement OverlayContainer * OverlayManager::createOverlayContainer(String typeName, String instanceName, bool isTemplate=false) CODE: RETVAL = static_cast(THIS->createOverlayElement(typeName, instanceName, isTemplate)); OUTPUT: RETVAL ## note: added to Perl, same as createOverlayElement TextAreaOverlayElement * OverlayManager::createTextAreaOverlayElement(String typeName, String instanceName, bool isTemplate=false) CODE: RETVAL = static_cast(THIS->createOverlayElement(typeName, instanceName, isTemplate)); OUTPUT: RETVAL ## note: added to Perl, same as createOverlayElement PanelOverlayElement * OverlayManager::createPanelOverlayElement(String typeName, String instanceName, bool isTemplate=false) CODE: RETVAL = static_cast(THIS->createOverlayElement(typeName, instanceName, isTemplate)); OUTPUT: RETVAL ## note: added to Perl, same as createOverlayElement ## but with a static_cast BorderPanelOverlayElement * OverlayManager::createBorderPanelOverlayElement(String typeName, String instanceName, bool isTemplate=false) CODE: RETVAL = static_cast(THIS->createOverlayElement(typeName, instanceName, isTemplate)); OUTPUT: RETVAL OverlayElement * OverlayManager::getOverlayElement(name, isTemplate=false) String name bool isTemplate # there is another version passing OverlayElement* void OverlayManager::destroyOverlayElement(instanceName, isTemplate=false) String instanceName bool isTemplate void OverlayManager::destroyAllOverlayElements(isTemplate=false) bool isTemplate # .... bool OverlayManager::isTemplate(strName) String strName Ogre-0.60/xs/ColourValue.xs0000644000175000017500000000163312146460465016020 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ColourValue ColourValue * ColourValue::new(red=1, green=1, blue=1, alpha=1) Real red Real green Real blue Real alpha void ColourValue::DESTROY() void ColourValue::saturate() void ColourValue::setHSB(hue, saturation, brightness) Real hue Real saturation Real brightness # ==, != bool eq_xs(lobj, robj, swap) ColourValue * lobj ColourValue * robj IV swap ALIAS: ne_xs = 1 CODE: switch(ix) { case 0: RETVAL = (*lobj == *robj); break; case 1: RETVAL = (*lobj != *robj); break; } OUTPUT: RETVAL Real ColourValue::r() CODE: RETVAL = (*THIS).r; OUTPUT: RETVAL Real ColourValue::g() CODE: RETVAL = (*THIS).g; OUTPUT: RETVAL Real ColourValue::b() CODE: RETVAL = (*THIS).b; OUTPUT: RETVAL Real ColourValue::a() CODE: RETVAL = (*THIS).a; OUTPUT: RETVAL Ogre-0.60/xs/Degree.xs0000644000175000017500000000500712146460465014752 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Degree Degree * Degree::new(...) PREINIT: char *usage = "Usage: Ogre::Degree::new(CLASS [, d]) or new(CLASS, Radian)\n"; CODE: // Degree() if (items == 1) { RETVAL = new Degree(); } else if (items == 2) { // Degree(Real d) if (looks_like_number(ST(1))) { RETVAL = new Degree((Real)SvNV(ST(1))); } // Degree(const Radian &d) else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Radian")) { Radian *rad = (Radian *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = new Degree(*rad); } } else { croak("%s", usage); } OUTPUT: RETVAL void Degree::DESTROY() # ==, !=, <, >, <=, >= bool deg_eq_xs(lobj, robj, swap) Degree * lobj Degree * robj IV swap ALIAS: deg_ne_xs = 1 deg_lt_xs = 2 deg_gt_xs = 3 deg_le_xs = 4 deg_ge_xs = 5 CODE: switch(ix) { case 0: RETVAL = (*lobj == *robj); break; case 1: RETVAL = (*lobj != *robj); break; case 2: RETVAL = (*lobj < *robj); break; case 3: RETVAL = (*lobj > *robj); break; case 4: RETVAL = (*lobj <= *robj); break; case 5: RETVAL = (*lobj >= *robj); break; } OUTPUT: RETVAL # +, - (still need others) Degree * deg_plus_xs(lobj, robj, swap) Degree * lobj Degree * robj IV swap ALIAS: deg_minus_xs = 1 PREINIT: Degree *deg = new Degree; CODE: switch(ix) { case 0: *deg = *lobj + *robj; break; case 1: *deg = swap ? (*robj - *lobj) : (*lobj - *robj); break; } RETVAL = deg; OUTPUT: RETVAL # * Degree * deg_mult_xs(lobj, robj, swap) Degree * lobj SV * robj IV swap PREINIT: Degree *deg = new Degree; CODE: if (looks_like_number(robj)) { Real rhs = (Real)SvNV(robj); *deg = *lobj * rhs; } else if (sv_isobject(robj)) { DegRad * rhs; TMOGRE_DEGRAD_IN(robj, rhs, Ogre::Degree, deg_mult_xs); // note: no swap, b/c swapped returns Radian (and also it doesn't matter) *deg = *lobj * *rhs; } else { croak("Degree::deg_mult_xs: unknown argument!\n"); } RETVAL = deg; OUTPUT: RETVAL # neg Degree * deg_neg_xs(lobj, robj, swap) Degree * lobj SV * robj IV swap PREINIT: Degree *deg = new Degree; CODE: *deg = - (*lobj); RETVAL = deg; OUTPUT: RETVAL Real Degree::valueDegrees() Real Degree::valueRadians() Real Degree::valueAngleUnits() Ogre-0.60/xs/SceneQuery.xs0000644000175000017500000000146112146460465015642 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::SceneQuery void SceneQuery::setQueryMask(uint32 mask) uint32 SceneQuery::getQueryMask() void SceneQuery::setQueryTypeMask(uint32 mask) uint32 SceneQuery::getQueryTypeMask() void SceneQuery::setWorldFragmentType(int wft) C_ARGS: (SceneQuery::WorldFragmentType)wft int SceneQuery::getWorldFragmentType() ## virtual const set::type* Ogre::SceneQuery::getSupportedWorldFragmentTypes(void) const ## note: this just returns a list void SceneQuery::getSupportedWorldFragmentTypes() PPCODE: const Ogre::set::type *wfts = THIS->getSupportedWorldFragmentTypes(); Ogre::set::type::const_iterator it; for (it = wfts->begin(); it != wfts->end(); it++) { mXPUSHi((int) *it); } Ogre-0.60/xs/HardwareBuffer.xs0000644000175000017500000000006112146460465016441 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::HardwareBuffer Ogre-0.60/xs/IntersectionSceneQuery.xs0000644000175000017500000000007112146460465020225 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::IntersectionSceneQuery Ogre-0.60/xs/SimpleRenderable.xs0000644000175000017500000000017512146460465016775 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::SimpleRenderable ## note: if constructor/destructor ever added, refer to BillboardSet.xs Ogre-0.60/xs/ManualObjectSection.xs0000644000175000017500000000006612146460465017450 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ManualObjectSection Ogre-0.60/xs/Ray.xs0000644000175000017500000000265012146460465014313 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Ray Ray * Ray::new(...) PREINIT: char *usage = "Usage: Ogre::Ray::new(CLASS) or (CLASS, vec, vec)\n"; CODE: if (items == 1) { RETVAL = new Ray(); } else if (items == 3 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3") && sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Vector3")) { Vector3 *origin = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN Vector3 *direction = (Vector3 *) SvIV((SV *) SvRV(ST(2))); // TMOGRE_IN RETVAL = new Ray(*origin, *direction); } else { croak("%s", usage); } OUTPUT: RETVAL void Ray::DESTROY() ## Vector3 operator * (Real t) const void Ray::setOrigin(origin) Vector3 * origin C_ARGS: *origin Vector3 * Ray::getOrigin() CODE: RETVAL = new Vector3; *RETVAL = THIS->getOrigin(); OUTPUT: RETVAL void Ray::setDirection(dir) Vector3 * dir C_ARGS: *dir Vector3 * Ray::getDirection() CODE: RETVAL = new Vector3; *RETVAL = THIS->getDirection(); OUTPUT: RETVAL Vector3 * Ray::getPoint(Real t) CODE: RETVAL = new Vector3; *RETVAL = THIS->getPoint(t); OUTPUT: RETVAL ##std::pair< bool, Real > intersects ( Plane &p) ##std::pair< bool, Real > intersects ( PlaneBoundedVolume &p) ##std::pair< bool, Real > intersects ( Sphere &s) ##std::pair< bool, Real > intersects ( AxisAlignedBox &box) Ogre-0.60/xs/Log.xs0000644000175000017500000000066612146460465014306 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Log String Log::getName() bool Log::isDebugOutputEnabled() bool Log::isFileOutputSuppressed() void Log::logMessage(String message, int lml, bool maskDebug) C_ARGS: message, (LogMessageLevel)lml, maskDebug void Log::setLogDetail(int ll) C_ARGS: (LoggingLevel)ll int Log::getLogDetail() ## void Log::addListener(LogListener *listener) ## void Log::removeListener(LogListener *listener) Ogre-0.60/xs/MeshPtr.xs0000644000175000017500000000005312146460465015135 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::MeshPtr Ogre-0.60/xs/Vector3.xs0000644000175000017500000001337112146460465015107 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Vector3 Vector3 * Vector3::new(...) PREINIT: char *usage = "Usage: Ogre::Vector3::new(CLASS, x [, y, z]) or new(CLASS, Vector3)\n"; CODE: // Vector3(const Real fX, const Real fY, const Real fZ) if (items == 4) { RETVAL = new Vector3((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else if (items == 2) { // Vector3(const Vector3 &rkVector) if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = new Vector3(*vec); } // Vector3(const Real scalar) else if (looks_like_number(ST(1))) { RETVAL = new Vector3((Real)SvNV(ST(1))); } else { croak("%s", usage); } } else if (items == 1) { RETVAL = new Vector3(); } else { croak("%s", usage); } OUTPUT: RETVAL void Vector3::DESTROY() ## xxx: need to check assignment operator # ==, !=, <, > bool vec3_eq_xs(lobj, robj, swap) Vector3 * lobj Vector3 * robj IV swap ALIAS: vec3_ne_xs = 1 vec3_lt_xs = 2 vec3_gt_xs = 3 CODE: switch(ix) { case 0: RETVAL = (*lobj == *robj); break; case 1: RETVAL = (*lobj != *robj); break; case 2: RETVAL = (*lobj < *robj); break; case 3: RETVAL = (*lobj > *robj); break; } OUTPUT: RETVAL # +, -, / (need Real also) Vector3 * vec3_plus_xs(lobj, robj, swap) Vector3 * lobj Vector3 * robj IV swap ALIAS: vec3_minus_xs = 1 vec3_div_xs = 2 PREINIT: Vector3 *vec = new Vector3; CODE: switch(ix) { case 0: *vec = *lobj + *robj; break; case 1: *vec = swap ? (*robj - *lobj) : (*lobj - *robj); break; case 2: *vec = swap ? (*robj / *lobj) : (*lobj / *robj); break; } RETVAL = vec; OUTPUT: RETVAL # * (handles Quaternion also) Vector3 * vec3_mult_xs(lobj, robj, swap) Vector3 * lobj SV * robj IV swap PREINIT: Vector3 *vec = new Vector3; CODE: if (sv_isobject(robj) && sv_derived_from(robj, "Ogre::Vector3")) { const Vector3 *rhs = (Vector3 *) SvIV((SV *) SvRV(robj)); *vec = swap ? (*rhs * *lobj) : (*lobj * *rhs); } else if (sv_isobject(robj) && sv_derived_from(robj, "Ogre::Quaternion")) { const Quaternion *rhs = (Quaternion *) SvIV((SV *) SvRV(robj)); // note reversal - only Q * V is allowed, so args must be reversed if (swap) { *vec = (*rhs) * (*lobj); } else { croak("Vector3::mult_xs: reversed args (Quaternion must precede Vector3\n"); } } else if (looks_like_number(robj)) { Real rhs = (Real)SvNV(robj); *vec = *lobj * rhs; } else { croak("Vector3::vec3_mult_xs: unknown argument!\n"); } RETVAL = vec; OUTPUT: RETVAL # neg Vector3 * vec3_neg_xs(lobj, robj, swap) Vector3 * lobj SV * robj IV swap PREINIT: Vector3 *vec = new Vector3; CODE: *vec = - (*lobj); RETVAL = vec; OUTPUT: RETVAL ## xxx: +=, -=, *=, /= (with Real too) Real Vector3::length() Real Vector3::squaredLength() Real Vector3::distance(rhs) Vector3 * rhs C_ARGS: *rhs Real Vector3::squaredDistance(rhs) Vector3 * rhs C_ARGS: *rhs Real Vector3::dotProduct(vec) Vector3 * vec C_ARGS: *vec Real Vector3::absDotProduct(vec) Vector3 * vec C_ARGS: *vec Real Vector3::normalise() Vector3 * Vector3::crossProduct(rkVector) const Vector3 * rkVector CODE: RETVAL = new Vector3; *RETVAL = THIS->crossProduct(*rkVector); OUTPUT: RETVAL Vector3 * Vector3::midPoint(rkVector) const Vector3 * rkVector CODE: RETVAL = new Vector3; *RETVAL = THIS->midPoint(*rkVector); OUTPUT: RETVAL void Vector3::makeFloor(cmp) Vector3 * cmp C_ARGS: *cmp void Vector3::makeCeil(cmp) Vector3 * cmp C_ARGS: *cmp Vector3 * Vector3::perpendicular() CODE: RETVAL = new Vector3; *RETVAL = THIS->perpendicular(); OUTPUT: RETVAL Vector3 * Vector3::randomDeviant(angle, up=&Vector3::ZERO) DegRad * angle const Vector3 * up CODE: RETVAL = new Vector3; *RETVAL = THIS->randomDeviant(*angle, *up); OUTPUT: RETVAL Quaternion * Vector3::getRotationTo(dest, fallbackAxis=&Vector3::ZERO) const Vector3 * dest const Vector3 * fallbackAxis CODE: RETVAL = new Quaternion; *RETVAL = THIS->getRotationTo(*dest, *fallbackAxis); OUTPUT: RETVAL bool Vector3::isZeroLength() Vector3 * Vector3::normalisedCopy() CODE: RETVAL = new Vector3; *RETVAL = THIS->normalisedCopy(); OUTPUT: RETVAL Vector3 * Vector3::reflect(normal) const Vector3 * normal CODE: RETVAL = new Vector3; *RETVAL = THIS->reflect(*normal); OUTPUT: RETVAL bool Vector3::positionEquals(rhs, tolerance=0.001) Vector3 * rhs Real tolerance C_ARGS: *rhs, tolerance bool Vector3::positionCloses(rhs, tolerance=0.001) Vector3 * rhs Real tolerance C_ARGS: *rhs, tolerance bool Vector3::directionEquals(rhs, tolerance) Vector3 * rhs DegRad * tolerance C_ARGS: *rhs, *tolerance ## xxx: it would be nice to be able to do this: $v->{x} = 20; ## but how is that done (the object is a pointer to a C++ object, ## not a hash). For now, we have this gimpy interface with setX, etc. Real Vector3::x() CODE: RETVAL = (*THIS).x; OUTPUT: RETVAL Real Vector3::y() CODE: RETVAL = (*THIS).y; OUTPUT: RETVAL Real Vector3::z() CODE: RETVAL = (*THIS).z; OUTPUT: RETVAL void Vector3::setX(x) Real x CODE: (*THIS).x = x; void Vector3::setY(y) Real y CODE: (*THIS).y = y; void Vector3::setZ(z) Real z CODE: (*THIS).z = z; Ogre-0.60/xs/Texture.xs0000644000175000017500000000005312146460465015213 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Texture Ogre-0.60/xs/MeshManager.xs0000644000175000017500000001223212146460465015744 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::MeshManager static MeshManager * MeshManager::getSingletonPtr() Mesh * MeshManager::load(filename, groupName, vertexBufferUsage=(int)HardwareBuffer::HBU_STATIC_WRITE_ONLY, indexBufferUsage=(int)HardwareBuffer::HBU_STATIC_WRITE_ONLY, vertexBufferShadowed=true, indexBufferShadowed=true) String filename String groupName int vertexBufferUsage int indexBufferUsage bool vertexBufferShadowed bool indexBufferShadowed CODE: RETVAL = THIS->load(filename, groupName, (HardwareBuffer::Usage)vertexBufferUsage, (HardwareBuffer::Usage)indexBufferUsage, vertexBufferShadowed, indexBufferShadowed).getPointer(); OUTPUT: RETVAL ## MeshPtr createManual(const String &name, const String &groupName, ManualResourceLoader *loader=0) Mesh * MeshManager::createManual(name, groupName, loader=0) String name String groupName ManualResourceLoader * loader CODE: RETVAL = THIS->createManual(name, groupName, loader).getPointer(); OUTPUT: RETVAL Mesh * MeshManager::createPlane(name, groupName, plane, width, height, xsegments=1, ysegments=1, normals=true, numTexCoordSets=1, uTile=1.0f, vTile=1.0f, upVector=&Vector3::UNIT_Y, vertexBufferUsage=(int)HardwareBuffer::HBU_STATIC_WRITE_ONLY, indexBufferUsage=(int)HardwareBuffer::HBU_STATIC_WRITE_ONLY, vertexShadowBuffer=true, indexShadowBuffer=true) String name String groupName Plane * plane Real width Real height int xsegments int ysegments bool normals int numTexCoordSets Real uTile Real vTile const Vector3 * upVector int vertexBufferUsage int indexBufferUsage bool vertexShadowBuffer bool indexShadowBuffer CODE: RETVAL = THIS->createPlane(name, groupName, *plane, width, height, xsegments, ysegments, normals, numTexCoordSets, uTile, vTile, *upVector, (HardwareBuffer::Usage)vertexBufferUsage, (HardwareBuffer::Usage)indexBufferUsage, vertexShadowBuffer, indexShadowBuffer).getPointer(); OUTPUT: RETVAL Mesh * MeshManager::createCurvedIllusionPlane(name, groupName, plane, width, height, curvature, xsegments=1, ysegments=1, normals=true, numTexCoordSets=1, uTile=1.0f, vTile=1.0f, upVector=&Vector3::UNIT_Y, orientation=&Quaternion::IDENTITY, vertexBufferUsage=(int)HardwareBuffer::HBU_STATIC_WRITE_ONLY, indexBufferUsage=(int)HardwareBuffer::HBU_STATIC_WRITE_ONLY, vertexShadowBuffer=true, indexShadowBuffer=true, ySegmentsToKeep=-1) String name String groupName Plane * plane Real width Real height Real curvature int xsegments int ysegments bool normals int numTexCoordSets Real uTile Real vTile const Vector3 * upVector const Quaternion * orientation int vertexBufferUsage int indexBufferUsage bool vertexShadowBuffer bool indexShadowBuffer int ySegmentsToKeep CODE: // what a lovely API... :) RETVAL = THIS->createCurvedIllusionPlane(name, groupName, *plane, width, height, curvature, xsegments, ysegments, normals, numTexCoordSets, uTile, vTile, *upVector, *orientation, (HardwareBuffer::Usage)vertexBufferUsage, (HardwareBuffer::Usage)indexBufferUsage, vertexShadowBuffer, indexShadowBuffer, ySegmentsToKeep).getPointer(); OUTPUT: RETVAL Mesh * MeshManager::createCurvedPlane(name, groupName, plane, width, height, bow=0.5f, xsegments=1, ysegments=1, normals=false, numTexCoordSets=1, xTile=1.0f, yTile=1.0f, upVector=&Vector3::UNIT_Y, vertexBufferUsage=(int)HardwareBuffer::HBU_STATIC_WRITE_ONLY, indexBufferUsage=(int)HardwareBuffer::HBU_STATIC_WRITE_ONLY, vertexShadowBuffer=true, indexShadowBuffer=true) String name String groupName Plane * plane Real width Real height Real bow int xsegments int ysegments bool normals int numTexCoordSets Real xTile Real yTile const Vector3 * upVector int vertexBufferUsage int indexBufferUsage bool vertexShadowBuffer bool indexShadowBuffer CODE: RETVAL = THIS->createCurvedPlane(name, groupName, *plane, width, height, bow, xsegments, ysegments, normals, numTexCoordSets, xTile, yTile, *upVector, (HardwareBuffer::Usage)vertexBufferUsage, (HardwareBuffer::Usage)indexBufferUsage, vertexShadowBuffer, indexShadowBuffer).getPointer(); OUTPUT: RETVAL ## XXX: void * ... ## PatchMeshPtr createBezierPatch(const String &name, const String &groupName, void *controlPointBuffer, VertexDeclaration *declaration, size_t width, size_t height, size_t uMaxSubdivisionLevel=PatchSurface::AUTO_LEVEL, size_t vMaxSubdivisionLevel=PatchSurface::AUTO_LEVEL, PatchSurface::VisibleSide visibleSide=PatchSurface::VS_FRONT, HardwareBuffer::Usage vbUsage=HardwareBuffer::HBU_STATIC_WRITE_ONLY, HardwareBuffer::Usage ibUsage=HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY, bool vbUseShadow=true, bool ibUseShadow=true) void MeshManager::setPrepareAllMeshesForShadowVolumes(bool enable) bool MeshManager::getPrepareAllMeshesForShadowVolumes() Real MeshManager::getBoundsPaddingFactor() void MeshManager::setBoundsPaddingFactor(Real paddingFactor) void MeshManager::loadResource(res) Resource * res Ogre-0.60/xs/VertexDeclaration.xs0000644000175000017500000000533112150362737017200 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::VertexDeclaration ## xxx: operators == and !=, static vertexElementLess size_t VertexDeclaration::getElementCount() ## const VertexElementList & getElements() const VertexElement * VertexDeclaration::getElement(unsigned short index) void VertexDeclaration::sort() void VertexDeclaration::closeGapsInSource() #if OGRE_VERSION >= 0x010800 VertexDeclaration * VertexDeclaration::getAutoOrganisedDeclaration(bool skeletalAnimation, bool vertexAnimation, bool vertexAnimationNormals) #else VertexDeclaration * VertexDeclaration::getAutoOrganisedDeclaration(bool skeletalAnimation, bool vertexAnimation) #endif unsigned short VertexDeclaration::getMaxSource() ## XXX: for now, not returning anything... ## const VertexElement & addElement(unsigned short source, size_t offset, VertexElementType theType, VertexElementSemantic semantic, unsigned short index=0) void VertexDeclaration::addElement(source, offset, theType, semantic, index=0) unsigned short source size_t offset int theType int semantic unsigned short index C_ARGS: source, offset, (VertexElementType)theType, (VertexElementSemantic)semantic, index ## XXX: for now, not returning anything... ## const VertexElement & insertElement(unsigned short atPosition, unsigned short source, size_t offset, VertexElementType theType, VertexElementSemantic semantic, unsigned short index=0) void VertexDeclaration::insertElement(atPosition, source, offset, theType, semantic, index=0) unsigned short atPosition unsigned short source size_t offset int theType int semantic unsigned short index C_ARGS: atPosition, source, offset, (VertexElementType)theType, (VertexElementSemantic)semantic, index void VertexDeclaration::removeElement(unsigned short elem_index) ## xxx: if 2nd arg not passed, same as previous removeElement ## as far as Perl is concerned... void VertexDeclaration::removeElementBySemantic(int semantic, unsigned short index=0) CODE: THIS->removeElement((VertexElementSemantic)semantic, index); void VertexDeclaration::removeAllElements() void VertexDeclaration::modifyElement(elem_index, source, offset, theType, semantic, index=0) unsigned short elem_index unsigned short source size_t offset int theType int semantic unsigned short index C_ARGS: elem_index, source, offset, (VertexElementType)theType, (VertexElementSemantic)semantic, index const VertexElement * VertexDeclaration::findElementBySemantic(int sem, unsigned short index=0) C_ARGS: (VertexElementSemantic)sem, index ## VertexElementList findElementsBySource(unsigned short source) size_t VertexDeclaration::getVertexSize(unsigned short source) VertexDeclaration * VertexDeclaration::clone() Ogre-0.60/xs/SceneManager.xs0000644000175000017500000004362312146460465016115 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::SceneManager ## no constructor String SceneManager::getName() String SceneManager::getTypeName() Camera * SceneManager::createCamera(name) String name Camera * SceneManager::getCamera(name) String name bool SceneManager::hasCamera(name) String name ## xxx: missing: virtual void destroyCamera (Camera *cam) void SceneManager::destroyCamera(name) String name void SceneManager::destroyAllCameras() Light * SceneManager::createLight(name) String name Light * SceneManager::getLight(name) String name bool SceneManager::hasLight(name) String name ## virtual const PlaneList & getLightClippingPlanes (Light *l) ## virtual const RealRect & getLightScissorRect (Light *l, const Camera *cam) ## xxx: virtual void destroyLight (Light *light) void SceneManager::destroyLight(name) String name void SceneManager::destroyAllLights() ## xxx: virtual SceneNode * createSceneNode (void) SceneNode * SceneManager::createSceneNode(name) String name ## xxx: virtual void destroySceneNode (SceneNode *sn) void SceneManager::destroySceneNode(name) String name SceneNode * SceneManager::getRootSceneNode() SceneNode * SceneManager::getSceneNode(name) String name bool SceneManager::hasSceneNode(name) String name ## xxx: Entity * createEntity (const String &entityName, PrefabType ptype) Entity * SceneManager::createEntity(entityName, meshName) String entityName String meshName Entity * SceneManager::getEntity(name) String name bool SceneManager::hasEntity(name) String name ## xxx: virtual void destroyEntity (Entity *ent) void SceneManager::destroyEntity(name) String name void SceneManager::destroyAllEntities() ManualObject * SceneManager::createManualObject(name) String name ManualObject * SceneManager::getManualObject(name) String name bool SceneManager::hasManualObject(name) String name ## xxx: virtual void destroyManualObject (ManualObject *obj) void SceneManager::destroyManualObject(name) String name void SceneManager::destroyAllManualObjects() BillboardChain * SceneManager::createBillboardChain(name) String name BillboardChain * SceneManager::getBillboardChain(name) String name bool SceneManager::hasBillboardChain(name) String name ## xxx: void destroyBillboardChain (BillboardChain *obj) void SceneManager::destroyBillboardChain(name) String name void SceneManager::destroyAllBillboardChains() RibbonTrail * SceneManager::createRibbonTrail(name) String name RibbonTrail * SceneManager::getRibbonTrail(name) String name bool SceneManager::hasRibbonTrail(name) String name ## xxx: void destroyRibbonTrail (RibbonTrail *obj) void SceneManager::destroyRibbonTrail(name) String name void SceneManager::destroyAllRibbonTrails() ## xxx: ParticleSystem * createParticleSystem (const String &name, size_t quota=500, const String &resourceGroup=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) ParticleSystem * SceneManager::createParticleSystem(name, templateName) String name String templateName ## xxx: this is a workaround; otherwise, for some reason, ## the ParticleSystem is returned attached by createParticleSystem void SceneManager::createAndAttachParticleSystem(name, templateName, node) String name String templateName SceneNode * node CODE: node->attachObject( THIS->createParticleSystem(name, templateName) ); ParticleSystem * SceneManager::getParticleSystem(name) String name bool SceneManager::hasParticleSystem(name) String name ## xxx: void destroyParticleSystem (ParticleSystem *obj) void SceneManager::destroyParticleSystem(name) String name void SceneManager::destroyAllParticleSystems() void SceneManager::clearScene() void SceneManager::setAmbientLight(colour) ColourValue * colour C_ARGS: *colour ## const ColourValue & getAmbientLight() ## xxx: virtual void prepareWorldGeometry (DataStreamPtr &stream, const String &typeName=StringUtil::BLANK) void SceneManager::prepareWorldGeometry(filename) String filename ## xxx: void setWorldGeometry (DataStreamPtr &stream, const String &typeName=StringUtil::BLANK) void SceneManager::setWorldGeometry(filename) String filename ## xxx: size_t estimateWorldGeometry (DataStreamPtr &stream, const String &typeName=StringUtil::BLANK) size_t SceneManager::estimateWorldGeometry(filename) String filename ## ViewPoint is a struct with a Vector3 and Quaternion ## xxx: ViewPoint getSuggestedViewpoint (bool random=false) ## xxx: void* ## bool setOption (const String &strKey, const void *pValue) ## bool getOption (const String &strKey, void *pDestValue) bool SceneManager::hasOption(strKey) String strKey ## xxx: std::vector ## virtual bool getOptionValues (const String &strKey, StringVector &refValueList) ## virtual bool getOptionKeys (StringVector &refKeys) void SceneManager::setSkyPlane(enable, plane, materialName, scale=1000, tiling=10, drawFirst=true, bow=0, xsegments=1, ysegments=1, groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) bool enable Plane * plane String materialName Real scale Real tiling bool drawFirst Real bow int xsegments int ysegments String groupName C_ARGS: enable, *plane, materialName, scale, tiling, drawFirst, bow, xsegments, ysegments, (const String)groupName bool SceneManager::isSkyPlaneEnabled() SceneNode * SceneManager::getSkyPlaneNode() ## xxx: this returns a struct; could return a hashref instead ## virtual const SkyPlaneGenParameters & getSkyPlaneGenParameters (void) const void SceneManager::setSkyBox(enable, materialName, distance=5000, drawFirst=true, orientation=&Quaternion::IDENTITY, groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) bool enable String materialName Real distance bool drawFirst const Quaternion * orientation String groupName C_ARGS: enable, materialName, distance, drawFirst, *orientation, groupName bool SceneManager::isSkyBoxEnabled() SceneNode * SceneManager::getSkyBoxNode() ## xxx: this returns a struct; could return a hashref instead ## virtual const SkyBoxGenParameters & getSkyBoxGenParameters (void) const void SceneManager::setSkyDome(enable, materialName, curvature=10, tiling=8, distance=4000, drawFirst=true, orientation=&Quaternion::IDENTITY, xsegments=16, ysegments=16, ysegments_keep=-1, groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) bool enable String materialName Real curvature Real tiling Real distance bool drawFirst const Quaternion * orientation int xsegments int ysegments int ysegments_keep String groupName C_ARGS: enable, materialName, curvature, tiling, distance, drawFirst, *orientation, xsegments, ysegments, ysegments_keep, groupName bool SceneManager::isSkyDomeEnabled() SceneNode * SceneManager::getSkyDomeNode() ## xxx: this returns a struct; could return a hashref instead ## virtual const SkyDomeGenParameters & getSkyDomeGenParameters (void) const void SceneManager::setFog(mode=FOG_NONE, colour=&ColourValue::White, expDensity=0.001, linearStart=0.0, linearEnd=1.0) int mode const ColourValue * colour Real expDensity Real linearStart Real linearEnd C_ARGS: (FogMode)mode, *colour, expDensity, linearStart, linearEnd int SceneManager::getFogMode() ## xxx: const ColourValue & getFogColour (void) const Real SceneManager::getFogStart() Real SceneManager::getFogEnd() Real SceneManager::getFogDensity() BillboardSet * SceneManager::createBillboardSet(name, poolSize=20) String name unsigned int poolSize BillboardSet * SceneManager::getBillboardSet(name) String name bool SceneManager::hasBillboardSet(name) String name ## xxx: also void destroyBillboardSet (BillboardSet *set) void SceneManager::destroyBillboardSet(name) String name void SceneManager::destroyAllBillboardSets() void SceneManager::setDisplaySceneNodes(display) bool display bool SceneManager::getDisplaySceneNodes() Animation * SceneManager::createAnimation(name, length) String name Real length Animation * SceneManager::getAnimation(name) String name bool SceneManager::hasAnimation(name) String name void SceneManager::destroyAnimation(name) String name void SceneManager::destroyAllAnimations() AnimationState * SceneManager::createAnimationState(name) String name AnimationState * SceneManager::getAnimationState(name) String name bool SceneManager::hasAnimationState(name) String name void SceneManager::destroyAnimationState(name) String name void SceneManager::destroyAllAnimationStates() void SceneManager::manualRender(rend, pass, vp, worldMatrix, viewMatrix, projMatrix, doBeginEndFrame=false) RenderOperation * rend Pass * pass Viewport * vp const Matrix4 * worldMatrix const Matrix4 * viewMatrix const Matrix4 * projMatrix bool doBeginEndFrame C_ARGS: rend, pass, vp, *worldMatrix, *viewMatrix, *projMatrix, doBeginEndFrame RenderQueue * SceneManager::getRenderQueue() ## xxx: ## void addRenderQueueListener (RenderQueueListener *newListener) ## void removeRenderQueueListener (RenderQueueListener *delListener) void SceneManager::addSpecialCaseRenderQueue(uint8 qid) void SceneManager::removeSpecialCaseRenderQueue(uint8 qid) void SceneManager::clearSpecialCaseRenderQueues() void SceneManager::setSpecialCaseRenderQueueMode(int mode) C_ARGS: (Ogre::SceneManager::SpecialCaseRenderQueueMode)mode int SceneManager::getSpecialCaseRenderQueueMode() bool SceneManager::isRenderQueueToBeProcessed(uint8 qid) void SceneManager::setWorldGeometryRenderQueue(uint8 qid) uint8 SceneManager::getWorldGeometryRenderQueue() void SceneManager::showBoundingBoxes(bShow) bool bShow bool SceneManager::getShowBoundingBoxes() AxisAlignedBoxSceneQuery * SceneManager::createAABBQuery(box, mask=0xFFFFFFFF) AxisAlignedBox * box unsigned long mask C_ARGS: *box, mask SphereSceneQuery * SceneManager::createSphereQuery(sphere, mask=0xFFFFFFFF) Sphere * sphere unsigned long mask C_ARGS: *sphere, mask ## PlaneBoundedVolumeListSceneQuery * createPlaneBoundedVolumeQuery (const PlaneBoundedVolumeList &volumes, unsigned long mask=0xFFFFFFFF) ## note: pass an aref instead of PlaneBoundedVolumeList ## xxx: this could be a little better, letting volumes be optional PlaneBoundedVolumeListSceneQuery * SceneManager::createPlaneBoundedVolumeQuery(SV *volumes_sv, unsigned long mask=0xFFFFFFFF) CODE: PlaneBoundedVolumeList *volumes = perlOGRE_aref2PBVL(volumes_sv, "Ogre::SceneManager::createPlaneBoundedVolumeQuery"); RETVAL = THIS->createPlaneBoundedVolumeQuery(*volumes, mask); delete volumes; OUTPUT: RETVAL RaySceneQuery * SceneManager::createRayQuery(ray, mask=0xFFFFFFFF) Ray * ray unsigned long mask C_ARGS: *ray, mask IntersectionSceneQuery * SceneManager::createIntersectionQuery(unsigned long mask=0xFFFFFFFF) void SceneManager::destroyQuery(query) SceneQuery * query ## xxx: we would presumably want arefs ## CameraIterator getCameraIterator (void) ## AnimationIterator getAnimationIterator (void) ## AnimationStateIterator getAnimationStateIterator (void) void SceneManager::setShadowTechnique(technique) int technique C_ARGS: (ShadowTechnique)technique int SceneManager::getShadowTechnique() void SceneManager::setShowDebugShadows(debug) bool debug bool SceneManager::getShowDebugShadows() void SceneManager::setShadowColour(colour) ColourValue * colour C_ARGS: *colour # xxx: const ColourValue & getShadowColour (void) const void SceneManager::setShadowDirectionalLightExtrusionDistance(dist) Real dist Real SceneManager::getShadowDirectionalLightExtrusionDistance() void SceneManager::setShadowFarDistance(distance) Real distance Real SceneManager::getShadowFarDistance() Real SceneManager::getShadowFarDistanceSquared() void SceneManager::setShadowIndexBufferSize(size) size_t size size_t SceneManager::getShadowIndexBufferSize() void SceneManager::setShadowTextureSize(size) unsigned short size ## there is also a struct version: ## void setShadowTextureConfig (size_t shadowIndex, const ShadowTextureConfig &config) void SceneManager::setShadowTextureConfig(size_t shadowIndex, unsigned short width, unsigned short height, int format) C_ARGS: shadowIndex, width, height, (PixelFormat)format ## xxx: aref ## ConstShadowTextureConfigIterator SceneManager::getShadowTextureConfigIterator() void SceneManager::setShadowTexturePixelFormat(int fmt) C_ARGS: (PixelFormat)fmt void SceneManager::setShadowTextureCount(size_t count) size_t SceneManager::getShadowTextureCount() void SceneManager::setShadowTextureCountPerLightType(type, count) int type size_t count C_ARGS: (Ogre::Light::LightTypes)type, count size_t SceneManager::getShadowTextureCountPerLightType(int type) C_ARGS: (Ogre::Light::LightTypes)type void SceneManager::setShadowTextureSettings(unsigned short size, unsigned short count, int fmt=PF_X8R8G8B8) C_ARGS: size, count, (PixelFormat)fmt ## const TexturePtr & SceneManager::getShadowTexture(size_t shadowIndex) void SceneManager::setShadowDirLightTextureOffset(Real offset) Real SceneManager::getShadowDirLightTextureOffset() void SceneManager::setShadowTextureFadeStart(Real fadeStart) void SceneManager::setShadowTextureFadeEnd(Real fadeEnd) void SceneManager::setShadowTextureSelfShadow(bool selfShadow) bool SceneManager::getShadowTextureSelfShadow() void SceneManager::setShadowTextureCasterMaterial(name) String name void SceneManager::setShadowTextureReceiverMaterial(name) String name void SceneManager::setShadowCasterRenderBackFaces(bool bf) bool SceneManager::getShadowCasterRenderBackFaces() ## xxx: void SceneManager::setShadowCameraSetup(const ShadowCameraSetupPtr &shadowSetup) ## const ShadowCameraSetupPtr & SceneManager::getShadowCameraSetup() void SceneManager::setShadowUseInfiniteFarPlane(bool enable) bool SceneManager::isShadowTechniqueStencilBased() bool SceneManager::isShadowTechniqueTextureBased() bool SceneManager::isShadowTechniqueModulative() bool SceneManager::isShadowTechniqueAdditive() bool SceneManager::isShadowTechniqueIntegrated() bool SceneManager::isShadowTechniqueInUse() void SceneManager::setShadowUseLightClipPlanes(bool enabled) bool SceneManager::getShadowUseLightClipPlanes() ## virtual void addListener (Listener *s) ## virtual void removeListener (Listener *s) StaticGeometry * SceneManager::createStaticGeometry(name) String name StaticGeometry * SceneManager::getStaticGeometry(name) String name bool SceneManager::hasStaticGeometry(name) String name ## xxx: void destroyStaticGeometry (StaticGeometry *geom) void SceneManager::destroyStaticGeometry(name) String name void SceneManager::destroyAllStaticGeometry() InstancedGeometry * SceneManager::createInstancedGeometry(name) String name InstancedGeometry * SceneManager::getInstancedGeometry(name) String name ## they should have this! :) ##bool ##SceneManager::hasInstancedGeometry(name) ## String name ## xxx: void destroyInstancedGeometry (InstancedGeometry *geom) void SceneManager::destroyInstancedGeometry(name) String name void SceneManager::destroyAllInstancedGeometry() ## xxx: skipping params arg for now... ## not sure if this works even, in C++ you end up casting to a specific type, ## but those have their own methods like createRibbonTrail, etc., ## so use those instead. ## MovableObject *createMovableObject(const String &name, const String &typeName, const NameValuePairList *params=0) MovableObject * SceneManager::createMovableObject(name, typeName) String name String typeName ## xxx: void destroyMovableObject (MovableObject *m) void SceneManager::destroyMovableObject(name, typeName) String name String typeName void SceneManager::destroyAllMovableObjectsByType(typeName) String typeName void SceneManager::destroyAllMovableObjects() MovableObject * SceneManager::getMovableObject(name, typeName) String name String typeName bool SceneManager::hasMovableObject(name, typeName) String name String typeName ## xxx: aref ## MovableObjectIterator getMovableObjectIterator (const String &typeName) void SceneManager::injectMovableObject(m) MovableObject * m ## xxx: void extractMovableObject (MovableObject *m) void SceneManager::extractMovableObject(name, typeName) String name String typeName void SceneManager::extractAllMovableObjectsByType(typeName) String typeName void SceneManager::setVisibilityMask(uint32 vmask) uint32 SceneManager::getVisibilityMask() void SceneManager::setFindVisibleObjects(bool find) bool SceneManager::getFindVisibleObjects() bool SceneManager::getNormaliseNormalsOnScale() void SceneManager::setFlipCullingOnNegativeScale(bool n) bool SceneManager::getFlipCullingOnNegativeScale() ## void setQueuedRenderableVisitor (SceneMgrQueuedRenderableVisitor *visitor) ## SceneMgrQueuedRenderableVisitor * getQueuedRenderableVisitor (void) const RenderSystem * SceneManager::getDestinationRenderSystem() Viewport * SceneManager::getCurrentViewport() ## xxx: these return a struct, could return a hashref ## const VisibleObjectsBoundsInfo & getVisibleObjectsBoundsInfo (const Camera *cam) const ## const VisibleObjectsBoundsInfo & getShadowCasterBoundsInfo (const Light *light) const void SceneManager::setCameraRelativeRendering(bool rel) bool SceneManager::getCameraRelativeRendering() ### static public attributes ## xxx: ##static uint32 WORLD_GEOMETRY_TYPE_MASK ##static uint32 ENTITY_TYPE_MASK ##static uint32 FX_TYPE_MASK ##static uint32 STATICGEOMETRY_TYPE_MASK ##static uint32 LIGHT_TYPE_MASK ##static uint32 FRUSTUM_TYPE_MASK ##static uint32 USER_TYPE_MASK_LIMIT Ogre-0.60/xs/Resource.xs0000644000175000017500000000013712146460465015345 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Resource static void Resource::cleanupDictionary() ## xxx Ogre-0.60/xs/StaticGeometry.xs0000644000175000017500000000267512146460465016532 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::StaticGeometry String StaticGeometry::getName() ## XXX: no defaults yet ## void addEntity(Entity *ent, const Vector3 &position, const Quaternion &orientation=Quaternion::IDENTITY, const Vector3 &scale=Vector3::UNIT_SCALE) void StaticGeometry::addEntity(ent, position, orientation, scale) Entity * ent Vector3 * position Quaternion * orientation Vector3 * scale C_ARGS: ent, *position, *orientation, *scale void StaticGeometry::addSceneNode(node) SceneNode * node void StaticGeometry::build() void StaticGeometry::destroy() void StaticGeometry::reset() void StaticGeometry::setRenderingDistance(dist) Real dist Real StaticGeometry::getRenderingDistance() Real StaticGeometry::getSquaredRenderingDistance() void StaticGeometry::setVisible(visible) bool visible bool StaticGeometry::isVisible() void StaticGeometry::setCastShadows(castShadows) bool castShadows bool StaticGeometry::getCastShadows() void StaticGeometry::setRegionDimensions(size) Vector3 * size C_ARGS: *size ## const Vector3 & getRegionDimensions (void) const void StaticGeometry::setOrigin(origin) Vector3 * origin C_ARGS: *origin ## const Vector3 & getOrigin (void) const void StaticGeometry::setRenderQueueGroup(queueID) uint8 queueID uint8 StaticGeometry::getRenderQueueGroup() ## RegionIterator getRegionIterator (void) void StaticGeometry::dump(filename) String filename Ogre-0.60/xs/TimeIndex.xs0000644000175000017500000000071412146460465015445 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::TimeIndex TimeIndex * TimeIndex::new(Real timePos, ...) CODE: if (items == 2) { RETVAL = new TimeIndex(timePos); } else if (items == 3 && looks_like_number(ST(2))) { unsigned int keyIndex = (unsigned int)SvUV(ST(2)); RETVAL = new TimeIndex(timePos, keyIndex); } OUTPUT: RETVAL bool TimeIndex::hasKeyIndex() Real TimeIndex::getTimePos() unsigned int TimeIndex::getKeyIndex() Ogre-0.60/xs/Mesh.xs0000644000175000017500000001204612150503013014432 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Mesh SubMesh * Mesh::createSubMesh(...) CODE: if (items == 1) { RETVAL = THIS->createSubMesh(); } else if (items == 2) { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String name = xstmpchr; RETVAL = THIS->createSubMesh(name); } else { croak("Usage: Ogre::Mesh::createSubMesh(CLASS, [name])\n"); } OUTPUT: RETVAL void Mesh::nameSubMesh(name, index) String name unsigned short index unsigned short Mesh::getNumSubMeshes() ### xxx: for some reason, it won't let the unsigned short version convert... ##SubMesh * ##Mesh::getSubMesh(...) ## CODE: ## if (items == 2) { ## // xxx: hope they don't use a numeric name... ## if (looks_like_number(ST(1))) { ## unsigned short i = (unsigned short)SvUV(ST(1)); ## RETVAL = THIS->createSubMesh(i); ## } ## else { ## char * xstmpchr_$var = (char *) SvPV_nolen(ST(1)); ## String name = xstmpchr_$var; ## RETVAL = THIS->createSubMesh(name); ## } ## } ## else { ## croak("Usage: Ogre::Mesh::getSubMesh(CLASS, name) or getSubMesh(CLASS, index)\n"); ## } ## OUTPUT: ## RETVAL SubMesh * Mesh::getSubMesh(name) String name ## SubMeshIterator Mesh::getSubMeshIterator(void) Mesh * Mesh::clone(newName, newGroup=StringUtil::BLANK) String newName String newGroup CODE: RETVAL = THIS->clone(newName, (const String)newGroup).getPointer(); OUTPUT: RETVAL ## const AxisAlignedBox & Mesh::getBounds(void) Real Mesh::getBoundingSphereRadius() void Mesh::setSkeletonName(skelName) String skelName bool Mesh::hasSkeleton() bool Mesh::hasVertexAnimation() Skeleton * Mesh::getSkeleton() CODE: RETVAL = THIS->getSkeleton().getPointer(); OUTPUT: RETVAL String Mesh::getSkeletonName() ## xxx: VertexBoneAssignment is a struct; could just pass three numbers instead ##void ##Mesh::addBoneAssignment(const VertexBoneAssignment &vertBoneAssign) void Mesh::clearBoneAssignments() ## BoneAssignmentIterator Mesh::getBoneAssignmentIterator(void) unsigned short Mesh::getNumLodLevels() ## xxx: MeshLodUsage is a struct ##const MeshLodUsage & Mesh::getLodLevel(ushort index) void Mesh::createManualLodLevel(fromDepth, meshName) Real fromDepth String meshName void Mesh::updateManualLodLevel(index, meshName) unsigned short index String meshName unsigned short Mesh::getLodIndex(Real depth) CODE: RETVAL = THIS->getLodStrategy()->transformUserValue(depth); OUTPUT: RETVAL bool Mesh::isLodManual() void Mesh::removeLodLevels() void Mesh::setVertexBufferPolicy(int usage, bool shadowBuffer=false) C_ARGS: (HardwareBuffer::Usage)usage, shadowBuffer void Mesh::setIndexBufferPolicy(int usage, bool shadowBuffer=false) C_ARGS: (HardwareBuffer::Usage)usage, shadowBuffer int Mesh::getVertexBufferUsage() int Mesh::getIndexBufferUsage() bool Mesh::isVertexBufferShadowed() bool Mesh::isIndexBufferShadowed() void Mesh::buildTangentVectors(int targetSemantic=VES_TANGENT, unsigned short sourceTexCoordSet=0, unsigned short index=0) C_ARGS: (VertexElementSemantic)targetSemantic, sourceTexCoordSet, index bool Mesh::suggestTangentVectorBuildParams(int targetSemantic, OUTLIST unsigned short outSourceCoordSet, OUTLIST unsigned short outIndex) C_ARGS: (VertexElementSemantic)targetSemantic, outSourceCoordSet, outIndex void Mesh::buildEdgeList() void Mesh::freeEdgeList() void Mesh::prepareForShadowVolume() # there are two versions, this too: #const EdgeData * Mesh::getEdgeList(unsigned int lodIndex=0) EdgeData * Mesh::getEdgeList(unsigned int lodIndex=0) bool Mesh::isPreparedForShadowVolumes() bool Mesh::isEdgeListBuilt() ## HashMap ##const SubMeshNameMap & Mesh::getSubMeshNameMap(void) void Mesh::setAutoBuildEdgeLists(bool autobuild) bool Mesh::getAutoBuildEdgeLists() int Mesh::getSharedVertexDataAnimationType() Animation * Mesh::createAnimation(name, length) String name Real length ## this too, but I assume it will have the same problem as getSubMesh: ## Animation * Mesh::getAnimation(unsigned short index) Animation * Mesh::getAnimation(name) String name bool Mesh::hasAnimation(name) String name void Mesh::removeAnimation(name) String name unsigned short Mesh::getNumAnimations() void Mesh::removeAllAnimations() VertexData * Mesh::getVertexDataByTrackHandle(unsigned short handle) void Mesh::updateMaterialForAllSubMeshes() Pose * Mesh::createPose(target, name=StringUtil::BLANK) unsigned short target String name CODE: RETVAL = THIS->createPose(target, (const String)name); OUTPUT: RETVAL size_t Mesh::getPoseCount() ## also this: Pose * Mesh::getPose(ushort index) Pose * Mesh::getPose(name) String name ## also this: void Mesh::removePose(ushort index) void Mesh::removePose(name) String name void Mesh::removeAllPoses() ## PoseIterator Mesh::getPoseIterator(void) ## ConstPoseIterator Mesh::getPoseIterator(void) ## std::vector ## const PoseList & Mesh::getPoseList(void) Ogre-0.60/xs/BillboardSet.xs0000644000175000017500000001014312146460465016122 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::BillboardSet ## I finally figured out why DESTROY methods ## cause segfaults; for objects like this (a MovableObject) ## that are managed by SceneManager, ## there is a method destroyAllMovableObjects being called, ## and this was implicitly calling "delete THIS" here ## before that. But if I destroyBillboardSet here, basically it seems ## to get destroyed as soon as the Perl object goes out of scope, ## which is rarely what we want... So you have to just create ## these through SceneManager instead of using ->new. ##BillboardSet * ##BillboardSet::new(name, poolSize=20, externalDataSource=false) ## String name ## unsigned int poolSize ## bool externalDataSource ## ##void ##BillboardSet::DESTROY() ## CODE: ## SceneManager *sm = THIS->_getManager(); ## if (sm) ## sm->destroyBillboardSet(THIS); ## xxx: Billboard * BillboardSet::createBillboard(const Vector3 &position, const ColourValue &colour=ColourValue::White) Billboard * BillboardSet::createBillboard(x, y, z, colour=&ColourValue::White) Real x Real y Real z const ColourValue * colour C_ARGS: x, y, z, *colour int BillboardSet::getNumBillboards() void BillboardSet::setAutoextend(bool autoextend) bool BillboardSet::getAutoextend() void BillboardSet::setSortingEnabled(bool sortenable) bool BillboardSet::getSortingEnabled() void BillboardSet::setPoolSize(size_t size) unsigned int BillboardSet::getPoolSize() void BillboardSet::clear() Billboard * BillboardSet::getBillboard(unsigned int index) ## xxx: void BillboardSet::removeBillboard(Billboard *pBill) void BillboardSet::removeBillboard(unsigned int index) void BillboardSet::setBillboardOrigin(int origin) C_ARGS: (BillboardOrigin)origin int BillboardSet::getBillboardOrigin() void BillboardSet::setBillboardRotationType(int rotationType) C_ARGS: (BillboardRotationType)rotationType int BillboardSet::getBillboardRotationType() void BillboardSet::setDefaultDimensions(Real width, Real height) void BillboardSet::setDefaultWidth(Real width) Real BillboardSet::getDefaultWidth() void BillboardSet::setDefaultHeight(Real height) Real BillboardSet::getDefaultHeight() void BillboardSet::setMaterialName(name) String name String BillboardSet::getMaterialName() void BillboardSet::beginBillboards(size_t numBillboards=0) void BillboardSet::injectBillboard(bb) const Billboard * bb C_ARGS: *bb void BillboardSet::endBillboards() void BillboardSet::setBounds(box, radius) const AxisAlignedBox * box Real radius C_ARGS: *box, radius ## const AxisAlignedBox & BillboardSet::getBoundingBox() Real BillboardSet::getBoundingRadius() ## const MaterialPtr & BillboardSet::getMaterial() ## void BillboardSet::getRenderOperation(RenderOperation &op) ## void BillboardSet::getWorldTransforms(Matrix4 *xform) ## const Quaternion & BillboardSet::getWorldOrientation() ## const Vector3 & BillboardSet::getWorldPosition() bool BillboardSet::getCullIndividually() void BillboardSet::setCullIndividually(bool cullIndividual) void BillboardSet::setBillboardType(int bbt) C_ARGS: (BillboardType)bbt int BillboardSet::getBillboardType() void BillboardSet::setCommonDirection(vec) const Vector3 * vec C_ARGS: *vec ## const Vector3 & BillboardSet::getCommonDirection() void BillboardSet::setCommonUpVector(vec) const Vector3 * vec C_ARGS: *vec ## const Vector3 & BillboardSet::getCommonUpVector() void BillboardSet::setUseAccurateFacing(bool acc) bool BillboardSet::getUseAccurateFacing() String BillboardSet::getMovableType() Real BillboardSet::getSquaredViewDepth(cam) const Camera * cam ## const LightList & BillboardSet::getLights() void BillboardSet::setBillboardsInWorldSpace(bool ws) ## Ogre::TRect< Float > ## void BillboardSet::setTextureCoords(Ogre::FloatRect const *coords, uint16 numCoords) void BillboardSet::setTextureStacksAndSlices(uchar stacks, uchar slices) ## Ogre::FloatRect const * BillboardSet::getTextureCoords(uint16 *oNumCoords) void BillboardSet::setPointRenderingEnabled(bool enabled) bool BillboardSet::isPointRenderingEnabled() uint32 BillboardSet::getTypeFlags() Ogre-0.60/xs/PatchMesh.xs0000644000175000017500000000005512146460465015431 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::PatchMesh Ogre-0.60/xs/DataStream.xs0000644000175000017500000000005612146460465015603 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::DataStream Ogre-0.60/xs/ScaleControllerFunction.xs0000644000175000017500000000036412146460465020361 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ScaleControllerFunction ScaleControllerFunction * ScaleControllerFunction::new(Real scalefactor, bool deltaInput) void ScaleControllerFunction::DESTROY() Real ScaleControllerFunction::calculate(Real source) Ogre-0.60/xs/Frustum.xs0000644000175000017500000000043712146460465015226 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Frustum ## note: if constructor/destructor ever added, refer to BillboardSet.xs void Frustum::setNearClipDistance(Real nearDist) void Frustum::setFarClipDistance(Real farDist) void Frustum::setAspectRatio(Real ratio) Real Frustum::getAspectRatio() Ogre-0.60/xs/RaySceneQuery.xs0000644000175000017500000000234712146460465016322 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::RaySceneQuery void RaySceneQuery::setRay(const Ray *ray) C_ARGS: *ray Ray * RaySceneQuery::getRay() CODE: RETVAL = new Ray(); *RETVAL = THIS->getRay(); OUTPUT: RETVAL void RaySceneQuery::setSortByDistance(bool sort, unsigned short maxresults=0) bool RaySceneQuery::getSortByDistance() unsigned short RaySceneQuery::getMaxResults() ## xxx: there is a second version: ## void RaySceneQuery::execute(RaySceneQueryListener *listener) ## but Listeners are for later. ## The following implements this: ## RaySceneQueryResult & RaySceneQuery::execute() SV * RaySceneQuery::execute() CODE: RaySceneQueryResult& qres = THIS->execute(); RETVAL = perlOGRE_RaySQ2aref(qres); OUTPUT: RETVAL ## Note: same deal as above ## RaySceneQueryResult & RaySceneQuery::getLastResults() SV * RaySceneQuery::getLastResults() CODE: RaySceneQueryResult& qres = THIS->getLastResults(); RETVAL = perlOGRE_RaySQ2aref(qres); OUTPUT: RETVAL void RaySceneQuery::clearResults() ## XXX: callback for RaySceneQueryListener interface ## bool RaySceneQuery::queryResult(SceneQuery::WorldFragment *fragment, Real distance) ## bool RaySceneQuery::queryResult(MovableObject *obj, Real distance) Ogre-0.60/xs/FrameStats.xs0000644000175000017500000000205512146460465015630 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::RenderTarget::FrameStats # I cant get this to work. # RenderTarget::FrameStats, not FrameStats. # However, you can use methods from RenderTarget (RenderWindow) instead. ## These are "public attributes", not methods. #Real #FrameStats::lastFPS() # CODE: # RETVAL = (*THIS).lastFPS; # OUTPUT: # RETVAL # #Real #FrameStats::avgFPS() # CODE: # RETVAL = (*THIS).avgFPS; # OUTPUT: # RETVAL # #Real #FrameStats::bestFPS() # CODE: # RETVAL = (*THIS).bestFPS; # OUTPUT: # RETVAL # #Real #FrameStats::worstFPS() # CODE: # RETVAL = (*THIS).worstFPS; # OUTPUT: # RETVAL # #unsigned long #FrameStats::bestFrameTime() # CODE: # RETVAL = (*THIS).bestFrameTime; # OUTPUT: # RETVAL # #unsigned long #FrameStats::worstFrameTime() # CODE: # RETVAL = (*THIS).worstFrameTime; # OUTPUT: # RETVAL # #size_t #FrameStats::triangleCount() # CODE: # RETVAL = (*THIS).triangleCount; # OUTPUT: # RETVAL # #size_t #FrameStats::batchCount() # CODE: # RETVAL = (*THIS).batchCount; # OUTPUT: # RETVAL Ogre-0.60/xs/AnimationControllerFunction.xs0000644000175000017500000000060712146460465021251 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::AnimationControllerFunction AnimationControllerFunction * AnimationControllerFunction::new(Real sequenceTime, Real timeOffset=0.0f) void AnimationControllerFunction::DESTROY() Real AnimationControllerFunction::calculate(Real source) void AnimationControllerFunction::setTime(Real timeVal) void AnimationControllerFunction::setSequenceTime(Real seqVal) Ogre-0.60/xs/PassthroughControllerFunction.xs0000644000175000017500000000040612146460465021636 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::PassthroughControllerFunction PassthroughControllerFunction * PassthroughControllerFunction::new(bool deltaInput=false) void PassthroughControllerFunction::DESTROY() Real PassthroughControllerFunction::calculate(Real source) Ogre-0.60/xs/Math.xs0000644000175000017500000001117012146460465014446 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Math static int Math::IAbs(int iValue) static int Math::ICeil(float fValue) static int Math::IFloor(float fValue) static int Math::ISign(int iValue) ## XXX: there are also Degree and Radian versions of this static Real Math::Abs(Real fValue) #static Radian * #Math::ACos(Real fValue) # #static Radian * #Math::ASin(Real fValue) # #static Radian * #Math::ATan(Real fValue) # #static Radian * #Math::ATan2(Real fY, Real fX) static Real Math::Ceil(Real fValue) ## XXX: there is also a Real (not Degree??) version of this static Real Math::Cos(fValue, useTables=false) Radian * fValue bool useTables C_ARGS: *fValue, useTables static Real Math::Exp(Real fValue) static Real Math::Floor(Real fValue) static Real Math::Log(Real fValue) static Real Math::Pow(Real fBase, Real fExponent) ## XXX: there are also Radian and Degree versions of this static Real Math::Sign(Real fValue) ## XXX: there is also a Real (not Degree??) version of this static Real Math::Sin(fValue, useTables=false) Radian * fValue bool useTables C_ARGS: *fValue, useTables static Real Math::Sqr(Real fValue) ## XXX: there are also Radian and Degree versions of this static Real Math::Sqrt(Real fValue) static Real Math::InvSqrt(Real fValue) static Real Math::UnitRandom() static Real Math::RangeRandom(Real fLow, Real fHigh) static Real Math::SymmetricRandom() ## XXX: there is also a Real (not Degree??) version of this static Real Math::Tan(fValue, useTables=false) Radian * fValue bool useTables C_ARGS: *fValue, useTables static Real Math::DegreesToRadians(Real degrees) static Real Math::RadiansToDegrees(Real radians) ## XXX: this is deprecated static void Math::setAngleUnit(unit) int unit C_ARGS: (Ogre::Math::AngleUnit)unit static int Math::getAngleUnit() static Real Math::AngleUnitsToRadians(Real units) static Real Math::RadiansToAngleUnits(Real radians) static Real Math::AngleUnitsToDegrees(Real units) static Real Math::DegreesToAngleUnits(Real degrees) static bool Math::pointInTri2D(p, a, b, c) Vector2 * p Vector2 * a Vector2 * b Vector2 * c C_ARGS: *p, *a, *b, *c static bool Math::pointInTri3D(p, a, b, c, normal) Vector3 * p Vector3 * a Vector3 * b Vector3 * c Vector3 * normal C_ARGS: *p, *a, *b, *c, *normal #static std::pair< bool, Real > #Math::intersects(const Ray &ray, const Plane &plane) # #static std::pair< bool, Real > #Math::intersects(const Ray &ray, const Sphere &sphere, bool discardInside=true) # #static std::pair< bool, Real > #Math::intersects(const Ray &ray, const AxisAlignedBox &box) # #static bool #Math::intersects(const Ray &ray, const AxisAlignedBox &box, Real *d1, Real *d2) # #static std::pair< bool, Real > #Math::intersects(const Ray &ray, const Vector3 &a, const Vector3 &b, const Vector3 &c, const Vector3 &normal, bool positiveSide=true, bool negativeSide=true) # #static std::pair< bool, Real > #Math::intersects(const Ray &ray, const Vector3 &a, const Vector3 &b, const Vector3 &c, bool positiveSide=true, bool negativeSide=true) # #static bool #Math::intersects(const Sphere &sphere, const AxisAlignedBox &box) # #static bool #Math::intersects(const Plane &plane, const AxisAlignedBox &box) # #static std::pair< bool, Real > #Math::intersects(const Ray &ray, const std::vector< Plane > &planeList, bool normalIsOutside) # #static std::pair< bool, Real > #Math::intersects(const Ray &ray, const std::list< Plane > &planeList, bool normalIsOutside) # #static bool #Math::intersects(const Sphere &sphere, const Plane &plane) ## XXX: left out 3rd arg ## static bool RealEqual (Real a, Real b, Real tolerance=std::numeric_limits< Real >::epsilon()) static bool Math::RealEqual(Real a, Real b) CODE: RETVAL = Math::RealEqual(a, b); OUTPUT: RETVAL #static Vector3 #Math::calculateTangentSpaceVector(const Vector3 &position1, const Vector3 &position2, const Vector3 &position3, Real u1, Real v1, Real u2, Real v2, Real u3, Real v3) # #static Matrix4 #Math::buildReflectionMatrix(const Plane &p) # #static Vector4 #Math::calculateFaceNormal(const Vector3 &v1, const Vector3 &v2, const Vector3 &v3) # #static Vector3 #Math::calculateBasicFaceNormal(const Vector3 &v1, const Vector3 &v2, const Vector3 &v3) # #static Vector4 #Math::calculateFaceNormalWithoutNormalize(const Vector3 &v1, const Vector3 &v2, const Vector3 &v3) # #static Vector3 #Math::calculateBasicFaceNormalWithoutNormalize(const Vector3 &v1, const Vector3 &v2, const Vector3 &v3) static Real Math::gaussianDistribution(Real x, Real offset=0.0f, Real scale=1.0f) ### note: there are also Static Public Attributes, like TWO_PI, ### at the bottom of Ogre.xs Ogre-0.60/xs/TextAreaOverlayElement.xs0000644000175000017500000000305112146460465020145 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::TextAreaOverlayElement void TextAreaOverlayElement::initialise() ## see note in OverlayElement setCaption void TextAreaOverlayElement::setCaption(String text) void TextAreaOverlayElement::setCharHeight(Real height) Real TextAreaOverlayElement::getCharHeight() void TextAreaOverlayElement::setSpaceWidth(Real width) Real TextAreaOverlayElement::getSpaceWidth() void TextAreaOverlayElement::setFontName(String font) String TextAreaOverlayElement::getFontName() String TextAreaOverlayElement::getTypeName() void TextAreaOverlayElement::getRenderOperation(OUTLIST RenderOperation *op) C_ARGS: *op void TextAreaOverlayElement::setMaterialName(String matName) void TextAreaOverlayElement::setColour(const ColourValue *col) C_ARGS: *col const ColourValue * TextAreaOverlayElement::getColour() CODE: RETVAL = &(THIS->getColour()); OUTPUT: RETVAL void TextAreaOverlayElement::setColourBottom(const ColourValue *col) C_ARGS: *col const ColourValue * TextAreaOverlayElement::getColourBottom() CODE: RETVAL = &(THIS->getColourBottom()); OUTPUT: RETVAL void TextAreaOverlayElement::setColourTop(const ColourValue *col) C_ARGS: *col const ColourValue * TextAreaOverlayElement::getColourTop() CODE: RETVAL = &(THIS->getColourTop()); OUTPUT: RETVAL void TextAreaOverlayElement::setAlignment(int a) C_ARGS: (TextAreaOverlayElement::Alignment)a int TextAreaOverlayElement::getAlignment() void TextAreaOverlayElement::setMetricsMode(int gmm) C_ARGS: (GuiMetricsMode)gmm Ogre-0.60/xs/Vector2.xs0000644000175000017500000000736312146460465015112 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Vector2 ## xxx: operator overloading methods Vector2 * Vector2::new(...) PREINIT: char *usage = "Usage: Ogre::Vector2::new(CLASS, x [, y]) or new(CLASS, Vector2)\n"; CODE: // Vector2(const Real fX, const Real fY) if (items == 3) { RETVAL = new Vector2((Real)SvNV(ST(1)), (Real)SvNV(ST(2))); } else if (items == 2) { // Vector2(const Vector2 &rkVector) if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector2")) { Vector2 *vec = (Vector2 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = new Vector2(*vec); } // Vector2(const Real scalar) else if (looks_like_number(ST(1))) { RETVAL = new Vector2((Real)SvNV(ST(1))); } else { croak("%s", usage); } } else if (items == 1) { RETVAL = new Vector2(); } else { croak("%s", usage); } OUTPUT: RETVAL void Vector2::DESTROY() ## xxx: need to check assignment operator # ==, !=, <, > bool vec2_eq_xs(lobj, robj, swap) Vector2 * lobj Vector2 * robj IV swap ALIAS: vec2_ne_xs = 1 vec2_lt_xs = 2 vec2_gt_xs = 3 CODE: switch(ix) { case 0: RETVAL = (*lobj == *robj); break; case 1: RETVAL = (*lobj != *robj); break; case 2: RETVAL = (*lobj < *robj); break; case 3: RETVAL = (*lobj > *robj); break; } OUTPUT: RETVAL # +, -, / (need Real also) Vector2 * vec2_plus_xs(lobj, robj, swap) Vector2 * lobj Vector2 * robj IV swap ALIAS: vec2_minus_xs = 1 vec2_div_xs = 2 PREINIT: Vector2 *vec = new Vector2; CODE: switch(ix) { case 0: *vec = *lobj + *robj; break; case 1: *vec = swap ? (*robj - *lobj) : (*lobj - *robj); break; case 2: *vec = swap ? (*robj / *lobj) : (*lobj / *robj); break; } RETVAL = vec; OUTPUT: RETVAL # * Vector2 * vec2_mult_xs(lobj, robj, swap) Vector2 * lobj SV * robj IV swap PREINIT: Vector2 *vec = new Vector2; CODE: if (sv_isobject(robj) && sv_derived_from(robj, "Ogre::Vector2")) { const Vector2 *rhs = (Vector2 *) SvIV((SV *) SvRV(robj)); *vec = *lobj * *rhs; } else if (looks_like_number(robj)) { Real rhs = (Real)SvNV(robj); *vec = *lobj * rhs; } else { croak("Vector2::vec2_mult_xs: unknown argument!\n"); } RETVAL = vec; OUTPUT: RETVAL # neg Vector2 * vec2_neg_xs(lobj, robj, swap) Vector2 * lobj SV * robj IV swap PREINIT: Vector2 *vec = new Vector2; CODE: *vec = - (*lobj); RETVAL = vec; OUTPUT: RETVAL ## xxx: +=, -=, *=, /= (with Real too) Real Vector2::length() Real Vector2::squaredLength() Real Vector2::dotProduct(vec) Vector2 * vec C_ARGS: *vec Real Vector2::normalise() ## Vector2 midPoint (const Vector2 &vec) const void Vector2::makeFloor(cmp) Vector2 * cmp C_ARGS: *cmp void Vector2::makeCeil(cmp) Vector2 * cmp C_ARGS: *cmp ## Vector2 perpendicular (void) const Real Vector2::crossProduct(rkVector) Vector2 * rkVector C_ARGS: *rkVector ## Vector2 randomDeviant (Real angle) const bool Vector2::isZeroLength() ## Vector2 normalisedCopy (void) const ## Vector2 reflect (const Vector2 &normal) const ## xxx: it would be nice to be able to do this: $v->{x} = 20; ## but how is that done (the object is a pointer to a C++ object, ## not a hash). For now, we have this gimpy interface with setX, etc. Real Vector2::x() CODE: RETVAL = (*THIS).x; OUTPUT: RETVAL Real Vector2::y() CODE: RETVAL = (*THIS).y; OUTPUT: RETVAL void Vector2::setX(x) Real x CODE: (*THIS).x = x; void Vector2::setY(y) Real y CODE: (*THIS).y = y; Ogre-0.60/xs/MaterialManager.xs0000644000175000017500000000316312146460465016611 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::MaterialManager static MaterialManager * MaterialManager::getSingletonPtr() ## xxx: all the ResourceManager subclasses need to override 'load' like this ## xxx: skipped last arg, NameValuePairList Material * MaterialManager::load(String name, String group, bool isManual=false, ManualResourceLoader *loader=0) CODE: MaterialPtr mat = THIS->load(name, group, isManual, loader); RETVAL = mat.getPointer(); OUTPUT: RETVAL void MaterialManager::initialise() ## xxx: does DataStream have be handled with a filehandle ? void MaterialManager::parseScript(DataStream *stream, String groupName) CODE: DataStreamPtr strmPtr = DataStreamPtr(stream); THIS->parseScript(strmPtr, groupName); void MaterialManager::setDefaultTextureFiltering(...) CODE: if (items == 2) { THIS->setDefaultTextureFiltering((TextureFilterOptions) SvIV(ST(1))); } else if (items == 3) { THIS->setDefaultTextureFiltering((FilterType) SvIV(ST(1)), (FilterOptions) SvIV(ST(2))); } else if (items == 4) { THIS->setDefaultTextureFiltering((FilterOptions) SvIV(ST(1)), (FilterOptions) SvIV(ST(2)), (FilterOptions) SvIV(ST(3))); } int MaterialManager::getDefaultTextureFiltering(int ftype) C_ARGS: (FilterType)ftype void MaterialManager::setDefaultAnisotropy(unsigned int maxAniso) unsigned int MaterialManager::getDefaultAnisotropy() Material * MaterialManager::getDefaultSettings() CODE: RETVAL = THIS->getDefaultSettings().getPointer(); OUTPUT: RETVAL String MaterialManager::getActiveScheme() void MaterialManager::setActiveScheme(String schemeName) Ogre-0.60/xs/TextureUnitState.xs0000644000175000017500000000006412146460465017056 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::TextureUnitState Ogre-0.60/xs/WaveformControllerFunction.xs0000644000175000017500000000066012146460465021117 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::WaveformControllerFunction WaveformControllerFunction * WaveformControllerFunction::new(int wType, Real base=0, Real frequency=1, Real phase=0, Real amplitude=1, bool deltaInput=true, Real dutyCycle=0.5) C_ARGS: (WaveformType)wType, base, frequency, phase, amplitude, deltaInput, dutyCycle void WaveformControllerFunction::DESTROY() Real WaveformControllerFunction::calculate(Real source) Ogre-0.60/xs/Matrix3.xs0000644000175000017500000000157412146460465015113 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Matrix3 Matrix3 * Matrix3::new(...) PREINIT: char *usage = "Ogre::Matrix3::new(CLASS [Real, ...]) or new(CLASS, Matrix3)\n"; CODE: // Matrix() if (items == 1) { RETVAL = new Matrix3(); } else if (items == 10) { // assuming all these are numbers... RETVAL = new Matrix3((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4)), (Real)SvNV(ST(5)), (Real)SvNV(ST(6)), (Real)SvNV(ST(7)), (Real)SvNV(ST(8)), (Real)SvNV(ST(9))); } // Matrix3 (const Matrix3 &rkMatrix) else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Matrix3")) { Matrix3 *m = (Matrix3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = new Matrix3(*m); } else { croak("%s", usage); } void Matrix3::DESTROY() Ogre-0.60/xs/PanelOverlayElement.xs0000644000175000017500000000147312146460465017475 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::PanelOverlayElement void PanelOverlayElement::initialise() void PanelOverlayElement::setTiling(Real x, Real y, unsigned short layer=0) Real PanelOverlayElement::getTileX(unsigned short layer=0) Real PanelOverlayElement::getTileY(unsigned short layer=0) void PanelOverlayElement::setUV(Real u1, Real v1, Real u2, Real v2) ## note: Perl version returns a list void PanelOverlayElement::getUV(OUTLIST Real u1, OUTLIST Real v1, OUTLIST Real u2, OUTLIST Real v2) C_ARGS: u1, v1, u2, v2 void PanelOverlayElement::setTransparent(bool isTransparent) bool PanelOverlayElement::isTransparent() String PanelOverlayElement::getTypeName() void PanelOverlayElement::getRenderOperation(OUTLIST RenderOperation *op) C_ARGS: *op void PanelOverlayElement::setMaterialName(String matName) Ogre-0.60/xs/Sphere.xs0000644000175000017500000000110712146460465015002 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Sphere ## xxx: constructors, destructor, then tests thereof ## do intersects below Real Sphere::getRadius() void Sphere::setRadius(Real radius) ## const Vector3 & getCenter (void) void Sphere::setCenter(center) Vector3 * center C_ARGS: *center #bool #Sphere::intersects(s) # Sphere * s # C_ARGS: # *s # #bool #Sphere::intersects(box) # AxisAlignedBox * box # C_ARGS: # *box # #bool #Sphere::intersects(plane) # Plane * plane # C_ARGS: # *plane # #bool #Sphere::intersects(v) # Vector3 * v # C_ARGS: # *v Ogre-0.60/xs/Vector4.xs0000644000175000017500000000023412146460465015102 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Vector4 ## xxx: constructors, destructor, operators Real Vector4::dotProduct(vec) Vector4 * vec C_ARGS: *vec Ogre-0.60/xs/WorldFragment.xs0000644000175000017500000000257612146460465016342 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::SceneQuery::WorldFragment ## note: this is a struct. ## For now I assume it is read-only. ## There is a typedef for WorldFragment in perlOGRE.h . ## thanks to Thomas Busch whose example I followed ## from his Lucene module for dealing with classes ## that are nested more than one level deep int fragmentType(THIS) WorldFragment * THIS CODE: RETVAL = THIS->fragmentType; OUTPUT: RETVAL Vector3 * singleIntersection(THIS) WorldFragment * THIS CODE: RETVAL = new Vector3; *RETVAL = THIS->singleIntersection; OUTPUT: RETVAL ## std::list< Plane > * planes ## note: I return the list of Planes as an aref SV * planes(THIS) WorldFragment *THIS CODE: AV *planes_av = (AV *) sv_2mortal((SV *) newAV()); std::list< Plane >::const_iterator it; std::list< Plane >::const_iterator itEnd = THIS->planes->end(); for (it = THIS->planes->begin(); it != itEnd; ++it) { // put C++ Plane into Perl SV* SV *plane_sv = sv_newmortal(); const Plane *pp = &(*it); TMOGRE_OUT(plane_sv, pp, Plane); av_push(planes_av, plane_sv); } // return the array ref RETVAL = newRV((SV *) planes_av); OUTPUT: RETVAL ## this is skipped because void* ## void * geometry RenderOperation * renderOp(THIS) WorldFragment * THIS CODE: RETVAL = THIS->renderOp; OUTPUT: RETVAL Ogre-0.60/xs/Pose.xs0000644000175000017500000000004712146460465014464 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Pose Ogre-0.60/xs/Node.xs0000644000175000017500000002516312146460465014451 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Node static void Node::queueNeedUpdate(Node *n) static void Node::processQueuedUpdates() String Node::getName() Node * Node::getParent() Quaternion * Node::getOrientation() CODE: RETVAL = new Quaternion; *RETVAL = THIS->getOrientation(); OUTPUT: RETVAL void Node::setOrientation(...) CODE: // void Node::setOrientation(Real w, Real x, Real y, Real z) if (items == 5) { THIS->setOrientation((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4))); } // void Node::setOrientation(const Quaternion &q) else if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Quaternion")) { Quaternion *q = (Quaternion *) SvIV((SV *) SvRV(ST(1))); THIS->setOrientation(*q); } else { croak("Usage: Ogre::Node::setOrientation(THIS, w, x, y, z]) or (THIS, quat)\n"); } void Node::resetOrientation() void Node::setPosition(...) CODE: // void Node::setPosition(Real x, Real y, Real z) if (items == 4) { THIS->setPosition((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } // void Node::setPosition(const Vector3 &pos) else if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *pos = (Vector3 *) SvIV((SV *) SvRV(ST(1))); THIS->setPosition(*pos); } else { croak("Usage: Ogre::Node::setPosition(THIS, x, y, z]) or (THIS, vec)\n"); } Vector3 * Node::getPosition() CODE: RETVAL = new Vector3; *RETVAL = THIS->getPosition(); OUTPUT: RETVAL void Node::setScale(...) CODE: // void Node::setScale(Real x, Real y, Real z) if (items == 4) { THIS->setScale((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } // void Node::setScale(const Vector3 &scale) else if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *scale = (Vector3 *) SvIV((SV *) SvRV(ST(1))); THIS->setScale(*scale); } else { croak("Usage: Ogre::Node::setScale(THIS, x, y, z]) or (THIS, vec)\n"); } Vector3 * Node::getScale() CODE: RETVAL = new Vector3; *RETVAL = THIS->getScale(); OUTPUT: RETVAL void Node::setInheritOrientation(bool inherit) bool Node::getInheritOrientation() void Node::setInheritScale(bool inherit) bool Node::getInheritScale() void Node::scale(...) CODE: // void Node::scale(Real x, Real y, Real z) if (items == 4) { THIS->scale((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } // void Node::scale(const Vector3 &scale) else if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *scale = (Vector3 *) SvIV((SV *) SvRV(ST(1))); THIS->scale(*scale); } else { croak("Usage: Ogre::Node::scale(THIS, x, y, z]) or (THIS, vec)\n"); } void Node::translate(...) PREINIT: char *usage = "Usage: Ogre::Node::translate(THIS, ...)\n"; CODE: Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_PARENT; // void translate(Real x, Real y, Real z, TransformSpace relativeTo=TS_PARENT) if (items >= 4 && looks_like_number(ST(1)) && looks_like_number(ST(2)) && looks_like_number(ST(3))) { if (items == 5) relativeTo = (Ogre::Node::TransformSpace)SvIV(ST(4)); THIS->translate((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), relativeTo); } // void translate(const Vector3 &d, TransformSpace relativeTo=TS_PARENT) else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *d = (Vector3 *) SvIV((SV *) SvRV(ST(1))); if (items == 3) relativeTo = (Ogre::Node::TransformSpace)SvIV(ST(2)); THIS->translate(*d, relativeTo); } else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Matrix3")) { Matrix3 *axes = (Matrix3 *) SvIV((SV *) SvRV(ST(1))); // void translate(const Matrix3 &axes, Real x, Real y, Real z, TransformSpace relativeTo=TS_PARENT) if (items >= 5 && looks_like_number(ST(2)) && looks_like_number(ST(3)) && looks_like_number(ST(4))) { if (items == 6) relativeTo = (Ogre::Node::TransformSpace)SvIV(ST(5)); THIS->translate(*axes, (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4)), relativeTo); } // void translate(const Matrix3 &axes, const Vector3 &move, TransformSpace relativeTo=TS_PARENT) else if (sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Vector3")) { Vector3 *move = (Vector3 *) SvIV((SV *) SvRV(ST(2))); if (items == 4) relativeTo = (Ogre::Node::TransformSpace)SvIV(ST(3)); THIS->translate(*axes, *move, relativeTo); } else { croak("%s", usage); } } else { croak("%s", usage); } void Node::roll(DegRad *angle, int relativeTo=Node::TS_LOCAL) C_ARGS: *angle, (Ogre::Node::TransformSpace)relativeTo void Node::pitch(DegRad *angle, int relativeTo=Node::TS_LOCAL) C_ARGS: *angle, (Ogre::Node::TransformSpace)relativeTo void Node::yaw(DegRad *angle, int relativeTo=Node::TS_LOCAL) C_ARGS: *angle, (Ogre::Node::TransformSpace)relativeTo void Node::rotate(...) PREINIT: char *usage = "Usage: Ogre::Node::rotate(THIS, vec, angle [, int]) or (THIS, quat [, int])\n"; CODE: Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL; // void rotate (const Vector3 &axis, const Radian &angle, TransformSpace relativeTo=TS_LOCAL) if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3") && sv_isobject(ST(2))) { Vector3 *axis = (Vector3 *) SvIV((SV *) SvRV(ST(1))); DegRad *angle; TMOGRE_DEGRAD_IN(ST(2), angle, Ogre::Node, rotate); if (items > 3) relativeTo = (Ogre::Node::TransformSpace)SvIV(ST(3)); THIS->rotate(*axis, *angle, relativeTo); } // void rotate (const Quaternion &q, TransformSpace relativeTo=TS_LOCAL) else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Quaternion")) { Quaternion *q = (Quaternion *) SvIV((SV *) SvRV(ST(1))); if (items > 2) relativeTo = (Ogre::Node::TransformSpace)SvIV(ST(2)); THIS->rotate(*q, relativeTo); } else { croak("%s", usage); } Matrix3 * Node::getLocalAxes() CODE: RETVAL = new Matrix3; *RETVAL = THIS->getLocalAxes(); OUTPUT: RETVAL Node * Node::createChild(...) PREINIT: char *usage = "Usage: Ogre::Node::createChild(THIS [, name] [, trans, rot])\n"; CODE: if (items == 1) { RETVAL = THIS->createChild(); } // Node * Node::createChild(const Vector3 &translate=Vector3::ZERO, const Quaternion &rotate=Quaternion::IDENTITY) else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *translate = (Vector3 *) SvIV((SV *) SvRV(ST(1))); if (items == 2) { RETVAL = THIS->createChild(*translate); } else if (sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Quaternion")) { Quaternion *rotate = (Quaternion *) SvIV((SV *) SvRV(ST(2))); RETVAL = THIS->createChild(*translate, *rotate); } else { croak("%s", usage); } } // Node * Node::createChild(String name, const Vector3 &translate=Vector3::ZERO, const Quaternion &rotate=Quaternion::IDENTITY) else { char * tmpchr = (char *) SvPV_nolen(ST(1)); String name = tmpchr; if (items == 2) { RETVAL = THIS->createChild(name); } else if (items > 2 && sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Vector3")) { Vector3 *translate = (Vector3 *) SvIV((SV *) SvRV(ST(2))); if (items > 3 && sv_isobject(ST(3)) && sv_derived_from(ST(3), "Ogre::Quaternion")) { Quaternion *rotate = (Quaternion *) SvIV((SV *) SvRV(ST(3))); RETVAL = THIS->createChild(name, *translate, *rotate); } else { RETVAL = THIS->createChild(name, *translate); } } else { croak("%s", usage); } } OUTPUT: RETVAL void Node::addChild(child) Node * child unsigned short Node::numChildren() Node * Node::getChild(...) CODE: // Node * Node::getChild(unsigned short index) if (looks_like_number(ST(1))) { RETVAL = THIS->getChild((unsigned short)SvUV(ST(1))); } // Node * Node::getChild(String name) else { char * tmpchr = (char *) SvPV_nolen(ST(1)); String name = tmpchr; RETVAL = THIS->getChild(name); } OUTPUT: RETVAL Node * Node::removeChild(...) CODE: // Node * Node::removeChild(Node *child) if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Node")) { Node *child = (Node *) SvIV((SV *) SvRV(ST(1))); RETVAL = THIS->removeChild(child); } // Node * Node::removeChild(unsigned short index) else if (looks_like_number(ST(1))) { RETVAL = THIS->removeChild((unsigned short)SvUV(ST(1))); } // Node * Node::removeChild(String name) else { char * tmpchr = (char *) SvPV_nolen(ST(1)); String name = tmpchr; RETVAL = THIS->removeChild(name); } OUTPUT: RETVAL void Node::removeAllChildren() ## ChildNodeIterator Node::getChildIterator() ## ConstChildNodeIterator Node::getChildIterator() ## void Node::setListener(Listener *listener) ## Listener * Node::getListener() ##Quaternion * ##Node::getWorldOrientation() ## CODE: ## RETVAL = new Quaternion; ## *RETVAL = THIS->getWorldOrientation(); ## OUTPUT: ## RETVAL ## ##Vector3 * ##Node::getWorldPosition() ## CODE: ## RETVAL = new Vector3; ## *RETVAL = THIS->getWorldPosition(); ## OUTPUT: ## RETVAL ## Ogre 1.6 API change Quaternion * Node::_getDerivedOrientation() CODE: RETVAL = new Quaternion; *RETVAL = THIS->_getDerivedOrientation(); OUTPUT: RETVAL Vector3 * Node::_getDerivedPosition() CODE: RETVAL = new Vector3; *RETVAL = THIS->_getDerivedPosition(); OUTPUT: RETVAL void Node::setInitialState() void Node::resetToInitialState() Vector3 * Node::getInitialPosition() CODE: RETVAL = new Vector3; *RETVAL = THIS->getInitialPosition(); OUTPUT: RETVAL Quaternion * Node::getInitialOrientation() CODE: RETVAL = new Quaternion; *RETVAL = THIS->getInitialOrientation(); OUTPUT: RETVAL Vector3 * Node::getInitialScale() CODE: RETVAL = new Vector3; *RETVAL = THIS->getInitialScale(); OUTPUT: RETVAL Real Node::getSquaredViewDepth(const Camera *cam) void Node::needUpdate(bool forceParentUpdate=false) void Node::requestUpdate(Node *child, bool forceParentUpdate=false) void Node::cancelUpdate(Node *child) ## const LightList & Node::getLights() Ogre-0.60/xs/EdgeData.xs0000644000175000017500000000005312146460465015211 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::EdgeData Ogre-0.60/xs/AnimationStateSet.xs0000644000175000017500000000006512146460465017152 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::AnimationStateSet Ogre-0.60/xs/Plane.xs0000644000175000017500000000462312146460465014621 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Plane Plane * Plane::new(...) PREINIT: char *usage = "Usage: Ogre::Plane::new(CLASS [, Plane]) or new(CLASS, Vector3, Real) or...\n"; CODE: // Plane() if (items == 1) { RETVAL = new Plane(); } // 1st arg is a Vector3 else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN // Plane (const Vector3 &rkNormal, Real fConstant) if (looks_like_number(ST(2))) { RETVAL = new Plane(*vec, (Real)SvNV(ST(2))); } else if (sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Vector3")) { Vector3 *vec2 = (Vector3 *) SvIV((SV *) SvRV(ST(2))); // TMOGRE_IN // Plane (const Vector3 &rkNormal, const Vector3 &rkPoint) if (items == 3) { RETVAL = new Plane(*vec, *vec2); } // Plane(const Vector3 &rkPoint0, const Vector3 &rkPoint1, const Vector3 &rkPoint2) else if (sv_isobject(ST(3)) && sv_derived_from(ST(3), "Ogre::Vector3")) { Vector3 *vec3 = (Vector3 *) SvIV((SV *) SvRV(ST(3))); // TMOGRE_IN RETVAL = new Plane(*vec, *vec2, *vec3); } else { croak("%s", usage); } } else { croak("%s", usage); } } // Plane (const Plane &rhs) else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Plane")) { Plane *plane = (Plane *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = new Plane(*plane); } else { croak("%s", usage); } OUTPUT: RETVAL void Plane::DESTROY() # OVERLOAD: == != ## xxx: 3 x getSide Real Plane::getDistance(rkPoint) Vector3 * rkPoint C_ARGS: *rkPoint ## xxx: 2 x redefine ## Vector3 projectVector (const Vector3 &v) const #Vector3 * #Plane::projectVector(v) # Vector3 * v # C_ARGS: # *v Real Plane::normalise() Real Plane::d() CODE: RETVAL = (*THIS).d; OUTPUT: RETVAL # xxx: note: this is just: Plane p; p.d = d; in C++.... void Plane::setD(d) Real d CODE: (*THIS).d = d; Vector3 * Plane::normal() CODE: RETVAL = new Vector3; *RETVAL = (*THIS).normal; OUTPUT: RETVAL # xxx: this does not exist in C++ either void Plane::setNormal(normal) Vector3 * normal CODE: (*THIS).normal = *normal; Ogre-0.60/xs/SubEntity.xs0000644000175000017500000000162712146460465015511 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::SubEntity String SubEntity::getMaterialName() void SubEntity::setMaterialName(String name) void SubEntity::setVisible(bool visible) bool SubEntity::isVisible() SubMesh * SubEntity::getSubMesh() Entity * SubEntity::getParent() const Material * SubEntity::getMaterial() CODE: RETVAL = THIS->getMaterial().getPointer(); OUTPUT: RETVAL Technique * SubEntity::getTechnique() # note: returned instead of gotten by reference void SubEntity::getRenderOperation(OUTLIST RenderOperation *op) C_ARGS: *op ## xxx: is xform an array? ## void SubEntity::getWorldTransforms(Matrix4 *xform) ##bool ##SubEntity::getNormaliseNormals() unsigned short SubEntity::getNumWorldTransforms() Real SubEntity::getSquaredViewDepth(const Camera *cam) ## const LightList & SubEntity::getLights() bool SubEntity::getCastsShadows() VertexData * SubEntity::getVertexDataForBinding() Ogre-0.60/xs/Renderable.xs0000644000175000017500000000251612146460465015624 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Renderable ## MaterialPtr & getMaterial (void) const =0 ## virtual Technique * getTechnique (void) const ## virtual void getRenderOperation (RenderOperation &op)=0 ## callbacks: ## virtual bool preRender (SceneManager *sm, RenderSystem *rsys) ## virtual void postRender (SceneManager *sm, RenderSystem *rsys) ## virtual void getWorldTransforms (Matrix4 *xform) const =0 ##Matrix4 * ##Renderable::getWorldTransforms() unsigned short Renderable::getNumWorldTransforms() void Renderable::setUseIdentityProjection(bool useIdentityProjection) bool Renderable::getUseIdentityProjection() void Renderable::setUseIdentityView(bool useIdentityView) bool Renderable::getUseIdentityView() Real Renderable::getSquaredViewDepth(cam) Camera * cam ## virtual const LightList & getLights (void) const =0 bool Renderable::getCastsShadows() ## void setCustomParameter (size_t index, const Vector4 &value) ## const Vector4 & getCustomParameter (size_t index) const void Renderable::setPolygonModeOverrideable(override) bool override bool Renderable::getPolygonModeOverrideable() ## virtual void setUserAny (const Any &anything) ## virtual const Any & getUserAny (void) const ## virtual RenderSystemData * getRenderSystemData () const ## virtual void setRenderSystemData (RenderSystemData *val) const Ogre-0.60/xs/BorderPanelOverlayElement.xs0000644000175000017500000000416312146460465020632 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::BorderPanelOverlayElement void BorderPanelOverlayElement::initialise() String BorderPanelOverlayElement::getTypeName() void BorderPanelOverlayElement::setBorderSize(Real size) CODE: if (items == 2) { THIS->setBorderSize((Real)SvNV(ST(1))); } else if (items == 3) { THIS->setBorderSize((Real)SvNV(ST(1)), (Real)SvNV(ST(2))); } else if (items == 5) { THIS->setBorderSize((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4))); } Real BorderPanelOverlayElement::getLeftBorderSize() Real BorderPanelOverlayElement::getRightBorderSize() Real BorderPanelOverlayElement::getTopBorderSize() Real BorderPanelOverlayElement::getBottomBorderSize() void BorderPanelOverlayElement::setLeftBorderUV(Real u1, Real v1, Real u2, Real v2) void BorderPanelOverlayElement::setRightBorderUV(Real u1, Real v1, Real u2, Real v2) void BorderPanelOverlayElement::setTopBorderUV(Real u1, Real v1, Real u2, Real v2) void BorderPanelOverlayElement::setBottomBorderUV(Real u1, Real v1, Real u2, Real v2) void BorderPanelOverlayElement::setTopLeftBorderUV(Real u1, Real v1, Real u2, Real v2) void BorderPanelOverlayElement::setTopRightBorderUV(Real u1, Real v1, Real u2, Real v2) void BorderPanelOverlayElement::setBottomLeftBorderUV(Real u1, Real v1, Real u2, Real v2) void BorderPanelOverlayElement::setBottomRightBorderUV(Real u1, Real v1, Real u2, Real v2) String BorderPanelOverlayElement::getLeftBorderUVString() String BorderPanelOverlayElement::getRightBorderUVString() String BorderPanelOverlayElement::getTopBorderUVString() String BorderPanelOverlayElement::getBottomBorderUVString() String BorderPanelOverlayElement::getTopLeftBorderUVString() String BorderPanelOverlayElement::getTopRightBorderUVString() String BorderPanelOverlayElement::getBottomLeftBorderUVString() String BorderPanelOverlayElement::getBottomRightBorderUVString() void BorderPanelOverlayElement::setBorderMaterialName(String name) String BorderPanelOverlayElement::getBorderMaterialName() void BorderPanelOverlayElement::setMetricsMode(int gmm) C_ARGS: (GuiMetricsMode)gmm Ogre-0.60/xs/MovableObject.xs0000644000175000017500000000514712146460465016300 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::MovableObject String MovableObject::getName() String MovableObject::getMovableType() Node * MovableObject::getParentNode() SceneNode * MovableObject::getParentSceneNode() bool MovableObject::isAttached() void MovableObject::detachFromParent() bool MovableObject::isInScene() ## const AxisAlignedBox & MovableObject::getBoundingBox() Real MovableObject::getBoundingRadius() ## const AxisAlignedBox & MovableObject::getWorldBoundingBox(bool derive=false) ## const Sphere & MovableObject::getWorldBoundingSphere(bool derive=false) void MovableObject::setVisible(bool visible) bool MovableObject::getVisible() bool MovableObject::isVisible() void MovableObject::setRenderingDistance(Real dist) Real MovableObject::getRenderingDistance() ## xxx: cool ## void MovableObject::setUserObject(UserDefinedObject *obj) ## UserDefinedObject * MovableObject::getUserObject() ## void MovableObject::setUserAny(const Any &anything) ## const Any & MovableObject::getUserAny() void MovableObject::setRenderQueueGroup(uint8 queueID) uint8 MovableObject::getRenderQueueGroup() ## virtual const Matrix4 & _getParentNodeFullTransform (void) const void MovableObject::setQueryFlags(uint32 flags) void MovableObject::addQueryFlags(uint32 flags) void MovableObject::removeQueryFlags(unsigned long flags) uint32 MovableObject::getQueryFlags() void MovableObject::setVisibilityFlags(uint32 flags) void MovableObject::addVisibilityFlags(uint32 flags) void MovableObject::removeVisibilityFlags(uint32 flags) uint32 MovableObject::getVisibilityFlags() ## cool... ## void MovableObject::setListener(Listener *listener) ## Listener * MovableObject::getListener() ## const LightList & MovableObject::queryLights() ## virtual LightList * _getLightList () EdgeData * MovableObject::getEdgeList() bool MovableObject::hasEdgeList() ## ShadowRenderableListIterator MovableObject::getShadowVolumeRenderableIterator(ShadowTechnique shadowTechnique, const Light *light, HardwareIndexBufferSharedPtr *indexBuffer, bool extrudeVertices, Real extrusionDist, unsigned long flags=0) ## const AxisAlignedBox & MovableObject::getLightCapBounds() ## const AxisAlignedBox & MovableObject::getDarkCapBounds(const Light &light, Real dirLightExtrusionDist) void MovableObject::setCastShadows(bool enabled) bool MovableObject::getCastShadows() Real MovableObject::getPointExtrusionDistance(const Light *l) uint32 MovableObject::getTypeFlags() ## virtual void visitRenderables (Renderable::Visitor *visitor, bool debugRenderables=false)=0 void MovableObject::setDebugDisplayEnabled(bool enabled) bool MovableObject::isDebugDisplayEnabled() Ogre-0.60/xs/Pass.xs0000644000175000017500000002700012146460465014462 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Pass ### note: Material, Technique, and Pass have a lot of methods in common bool Pass::isProgrammable() bool Pass::hasVertexProgram() bool Pass::hasFragmentProgram() bool Pass::hasShadowCasterVertexProgram() bool Pass::hasShadowReceiverVertexProgram() bool Pass::hasShadowReceiverFragmentProgram() unsigned short Pass::getIndex() void Pass::setName(String name) String Pass::getName() void Pass::setAmbient(...) CODE: // xxx: also duplicated this in several places (also Light.xs) if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Colour")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setAmbient(*colour); } else if (items == 4) { THIS->setAmbient((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::Pass::setAmbient(THIS, col) or (THIS, r, g, b)\n"); } void Pass::setDiffuse(...) CODE: // xxx: also duplicated this in several places (also Light.xs) if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Colour")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setDiffuse(*colour); } else if (items == 5) { THIS->setDiffuse((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4))); } else { croak("Usage: Ogre::Pass::setDiffuse(THIS, col) or (THIS, r, g, b, a)\n"); } void Pass::setSpecular(...) CODE: // xxx: also duplicated this in several places (also Light.xs) if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Colour")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setSpecular(*colour); } else if (items == 5) { THIS->setSpecular((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4))); } else { croak("Usage: Ogre::Pass::setSpecular(THIS, col) or (THIS, r, g, b, a)\n"); } void Pass::setShininess(Real val) void Pass::setSelfIllumination(...) CODE: // xxx: also duplicated this in several places (also Light.xs) if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Colour")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setSelfIllumination(*colour); } else if (items == 4) { THIS->setSelfIllumination((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::Pass::setSelfIllumination(THIS, col) or (THIS, r, g, b)\n"); } void Pass::setVertexColourTracking(int tracking) C_ARGS: (TrackVertexColourType)tracking Real Pass::getPointSize() void Pass::setPointSize(Real ps) void Pass::setPointSpritesEnabled(bool enabled) bool Pass::getPointSpritesEnabled() void Pass::setPointAttenuation(bool enabled, Real constant=0.0f, Real linear=1.0f, Real quadratic=0.0f) bool Pass::isPointAttenuationEnabled() Real Pass::getPointAttenuationConstant() Real Pass::getPointAttenuationLinear() Real Pass::getPointAttenuationQuadratic() void Pass::setPointMinSize(Real min) Real Pass::getPointMinSize() void Pass::setPointMaxSize(Real max) Real Pass::getPointMaxSize() ColourValue * Pass::getAmbient() CODE: RETVAL = new ColourValue; *RETVAL = THIS->getAmbient(); OUTPUT: RETVAL ColourValue * Pass::getDiffuse() CODE: RETVAL = new ColourValue; *RETVAL = THIS->getDiffuse(); OUTPUT: RETVAL ColourValue * Pass::getSpecular() CODE: RETVAL = new ColourValue; *RETVAL = THIS->getSpecular(); OUTPUT: RETVAL ColourValue * Pass::getSelfIllumination() CODE: RETVAL = new ColourValue; *RETVAL = THIS->getSelfIllumination(); OUTPUT: RETVAL Real Pass::getShininess() int Pass::getVertexColourTracking() TextureUnitState * Pass::createTextureUnitState(...) CODE: if (items == 1) { RETVAL = THIS->createTextureUnitState(); } else if (items >= 2) { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String textureName = xstmpchr; unsigned short texCoordSet = 0; if (items == 3) texCoordSet = (unsigned short)SvUV(ST(2)); RETVAL = THIS->createTextureUnitState(textureName, texCoordSet); } OUTPUT: RETVAL void Pass::addTextureUnitState(TextureUnitState *state) TextureUnitState * Pass::getTextureUnitState(...) CODE: // xxx: I duplicate this in several places... but how do I factor it out? if (looks_like_number(ST(1))) { unsigned short index = (unsigned short)SvUV(ST(1)); RETVAL = THIS->getTextureUnitState(index); } else { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String name = xstmpchr; RETVAL = THIS->getTextureUnitState(name); } OUTPUT: RETVAL unsigned short Pass::getTextureUnitStateIndex(const TextureUnitState *state) ## TextureUnitStateIterator Pass::getTextureUnitStateIterator() ## ConstTextureUnitStateIterator Pass::getTextureUnitStateIterator() void Pass::removeTextureUnitState(unsigned short index) void Pass::removeAllTextureUnitStates() unsigned short Pass::getNumTextureUnitStates() void Pass::setSceneBlending(...) CODE: if (items == 2) { THIS->setSceneBlending((SceneBlendType)SvIV(ST(1))); } else if (items == 3) { THIS->setSceneBlending((SceneBlendFactor)SvIV(ST(1)), (SceneBlendFactor)SvIV(ST(2))); } int Pass::getSourceBlendFactor() int Pass::getDestBlendFactor() bool Pass::isTransparent() void Pass::setDepthCheckEnabled(bool enabled) bool Pass::getDepthCheckEnabled() void Pass::setDepthWriteEnabled(bool enabled) bool Pass::getDepthWriteEnabled() void Pass::setDepthFunction(int func) C_ARGS: (CompareFunction)func int Pass::getDepthFunction() void Pass::setColourWriteEnabled(bool enabled) bool Pass::getColourWriteEnabled() void Pass::setCullingMode(int mode) C_ARGS: (CullingMode)mode int Pass::getCullingMode() void Pass::setManualCullingMode(int mode) C_ARGS: (ManualCullingMode)mode int Pass::getManualCullingMode() void Pass::setLightingEnabled(bool enabled) bool Pass::getLightingEnabled() void Pass::setMaxSimultaneousLights(unsigned short maxLights) unsigned short Pass::getMaxSimultaneousLights() void Pass::setStartLight(unsigned short startLight) unsigned short Pass::getStartLight() void Pass::setShadingMode(int mode) C_ARGS: (ShadeOptions)mode int Pass::getShadingMode() void Pass::setPolygonMode(int mode) C_ARGS: (PolygonMode)mode int Pass::getPolygonMode() void Pass::setFog(bool overrideScene, int mode=FOG_NONE, const ColourValue *colour=&ColourValue::White, Real expDensity=0.001, Real linearStart=0.0, Real linearEnd=1.0) C_ARGS: overrideScene, (FogMode)mode, *colour, expDensity, linearStart, linearEnd bool Pass::getFogOverride() int Pass::getFogMode() ColourValue * Pass::getFogColour() CODE: RETVAL = new ColourValue; *RETVAL = THIS->getFogColour(); OUTPUT: RETVAL Real Pass::getFogStart() Real Pass::getFogEnd() Real Pass::getFogDensity() void Pass::setDepthBias(float constantBias, float slopeScaleBias=0.0f) float Pass::getDepthBiasConstant() float Pass::getDepthBiasSlopeScale() void Pass::setAlphaRejectSettings(int func, unsigned char value) C_ARGS: (CompareFunction)func, value void Pass::setAlphaRejectFunction(int func) C_ARGS: (CompareFunction)func void Pass::setAlphaRejectValue(unsigned char val) int Pass::getAlphaRejectFunction() unsigned char Pass::getAlphaRejectValue() void Pass::setIteratePerLight(bool enabled, bool onlyForOneLightType=true, int lightType=Light::LT_POINT) C_ARGS: enabled, onlyForOneLightType, (Light::LightTypes) lightType bool Pass::getIteratePerLight() bool Pass::getRunOnlyForOneLightType() int Pass::getOnlyLightType() void Pass::setLightCountPerIteration(unsigned short c) unsigned short Pass::getLightCountPerIteration() Technique * Pass::getParent() String Pass::getResourceGroup() # note: vertex program means "GpuProgram" void Pass::setVertexProgram(String name, bool resetParams=true) void Pass::setVertexProgramParameters(GpuProgramParameters * params) CODE: GpuProgramParametersSharedPtr paramsptr = GpuProgramParametersSharedPtr(params); THIS->setVertexProgramParameters(paramsptr); String Pass::getVertexProgramName() GpuProgramParameters * Pass::getVertexProgramParameters() CODE: RETVAL = THIS->getVertexProgramParameters().getPointer(); OUTPUT: RETVAL GpuProgram * Pass::getVertexProgram() CODE: RETVAL = THIS->getVertexProgram().getPointer(); OUTPUT: RETVAL void Pass::setShadowCasterVertexProgram(String name) void Pass::setShadowCasterVertexProgramParameters(GpuProgramParameters *params) CODE: GpuProgramParametersSharedPtr paramsptr = GpuProgramParametersSharedPtr(params); THIS->setShadowCasterVertexProgramParameters(paramsptr); String Pass::getShadowCasterVertexProgramName() GpuProgramParameters * Pass::getShadowCasterVertexProgramParameters() CODE: RETVAL = THIS->getShadowCasterVertexProgramParameters().getPointer(); OUTPUT: RETVAL GpuProgram * Pass::getShadowCasterVertexProgram() CODE: RETVAL = THIS->getShadowCasterVertexProgram().getPointer(); OUTPUT: RETVAL void Pass::setShadowReceiverVertexProgram(String name) void Pass::setShadowReceiverVertexProgramParameters(GpuProgramParameters *params) CODE: GpuProgramParametersSharedPtr paramsptr = GpuProgramParametersSharedPtr(params); THIS->setShadowReceiverVertexProgramParameters(paramsptr); void Pass::setShadowReceiverFragmentProgram(String name) void Pass::setShadowReceiverFragmentProgramParameters(GpuProgramParameters *params) CODE: GpuProgramParametersSharedPtr paramsptr = GpuProgramParametersSharedPtr(params); THIS->setShadowReceiverFragmentProgramParameters(paramsptr); String Pass::getShadowReceiverVertexProgramName() GpuProgramParameters * Pass::getShadowReceiverVertexProgramParameters() CODE: RETVAL = THIS->getShadowReceiverVertexProgramParameters().getPointer(); OUTPUT: RETVAL GpuProgram * Pass::getShadowReceiverVertexProgram() CODE: RETVAL = THIS->getShadowReceiverVertexProgram().getPointer(); OUTPUT: RETVAL String Pass::getShadowReceiverFragmentProgramName() GpuProgramParameters * Pass::getShadowReceiverFragmentProgramParameters() CODE: RETVAL = THIS->getShadowReceiverFragmentProgramParameters().getPointer(); OUTPUT: RETVAL GpuProgram * Pass::getShadowReceiverFragmentProgram() CODE: RETVAL = THIS->getShadowReceiverFragmentProgram().getPointer(); OUTPUT: RETVAL void Pass::setFragmentProgram(String name, bool resetParams=true) void Pass::setFragmentProgramParameters(GpuProgramParameters *params) CODE: GpuProgramParametersSharedPtr paramsptr = GpuProgramParametersSharedPtr(params); THIS->setFragmentProgramParameters(paramsptr); String Pass::getFragmentProgramName() GpuProgramParameters * Pass::getFragmentProgramParameters() CODE: RETVAL = THIS->getFragmentProgramParameters().getPointer(); OUTPUT: RETVAL GpuProgram * Pass::getFragmentProgram() CODE: RETVAL = THIS->getFragmentProgram().getPointer(); OUTPUT: RETVAL bool Pass::isLoaded() uint32 Pass::getHash() void Pass::setTextureFiltering(int filterType) C_ARGS: (TextureFilterOptions)filterType void Pass::setTextureAnisotropy(unsigned int maxAniso) void Pass::queueForDeletion() bool Pass::isAmbientOnly() void Pass::setPassIterationCount(size_t count) size_t Pass::getPassIterationCount() ## bool Pass::applyTextureAliases(const AliasTextureNamePairList &aliasList, const bool apply=true) Ogre-0.60/xs/RenderQueue.xs0000644000175000017500000000005612146456743016006 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::RenderQueue Ogre-0.60/xs/ConfigFile.xs0000644000175000017500000000511712146460465015566 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ConfigFile ConfigFile * ConfigFile::new() void ConfigFile::DESTROY() ## there are three different 'load', only one partially wrapped here for now void ConfigFile::load(filename) String filename void ConfigFile::clear() ## Note: this replaces ConfigFile::getSectionIterator(). ## Instead of an interator, it returns an array ref. ## (The iterator is over a std::map, which is like a hash, ## but I wasn unsure whether the order of the keys matter, ## so I used an array.) ## Each element of this aref is a hash ref with two keys: name and settings. ## name is the section name, a simple string. settings is ## an array ref (which replaces an iterator over the multimap ## SectionIterator.getNext()). Each element of settings ## is in turn an array ref containing two values (replacing i->first ## and i->second on the multimap iterator). ## Sorry if this seems really complicated, but I was unsure how to ## handle C++ iterators, multimaps, etc.. An example: ## $cf = Ogre::ConfigFile->new(); $cf->load('resources.cfg'); ## $secs = $cf->getSections(); ## for $sec (@$secs) { ## $secname = $sec->{name}; ## $settings = $sec->{settings}; ## for $setting (@$settings) { ## ($typename, $archname) = @$setting; ## .... ## } ## } SV * ConfigFile::getSections() INIT: // this is derived from defineResources in OGRE's BasicTutorial6 // and example 6 in perlxstut AV * sections; ConfigFile::SettingsMultiMap *settingmmap; ConfigFile::SettingsMultiMap::iterator i; String secName, typeName, archName; CODE: ConfigFile::SectionIterator seci = THIS->getSectionIterator(); sections = (AV *) sv_2mortal((SV *) newAV()); while (seci.hasMoreElements()) { HV * section = (HV *) sv_2mortal((SV *) newHV()); AV * settings = (AV *) sv_2mortal((SV *) newAV()); secName = seci.peekNextKey(); hv_store(section, "name", 4, newSVpv(secName.data(), secName.size()), 0); settingmmap = seci.getNext(); for (i = settingmmap->begin(); i != settingmmap->end(); ++i) { AV * setting = (AV *) sv_2mortal((SV *) newAV()); typeName = i->first; av_push(setting, newSVpv(typeName.data(), typeName.size())); archName = i->second; av_push(setting, newSVpv(archName.data(), archName.size())); av_push(settings, newRV((SV *) setting)); } hv_store(section, "settings", 8, (SV *) newRV((SV *) settings), 0); av_push(sections, newRV((SV *) section)); } RETVAL = newRV((SV *) sections); OUTPUT: RETVAL Ogre-0.60/xs/SkeletonManager.xs0000644000175000017500000000073112146460465016635 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::SkeletonManager static SkeletonManager * SkeletonManager::getSingletonPtr() ## xxx: all the ResourceManager subclasses need to override 'load' like this ## xxx: skipped last arg, NameValuePairList Skeleton * SkeletonManager::load(String name, String group, bool isManual=false, ManualResourceLoader *loader=0) CODE: SkeletonPtr skel = THIS->load(name, group, isManual, loader); RETVAL = skel.getPointer(); OUTPUT: RETVAL Ogre-0.60/xs/AnimableObject.xs0000644000175000017500000000006112146460465016411 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::AnimableObject Ogre-0.60/xs/Quaternion.xs0000644000175000017500000001704312150362737015705 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Quaternion Quaternion * Quaternion::new(...) PREINIT: char *usage = "Usage: Ogre::Quaternion::new(CLASS [, Quaternion]) or new(CLASS, Vector3, Real) or...\n"; CODE: // Quaternion (Real fW=1.0, Real fX=0.0, Real fY=0.0, Real fZ=0.0) if (items == 1) { RETVAL = new Quaternion(); } else if (items == 2) { // Quaternion (Real fW=1.0, Real fX=0.0, Real fY=0.0, Real fZ=0.0) if (looks_like_number(ST(1))) { RETVAL = new Quaternion((Real)SvNV(ST(1)), 0.0f, 0.0f, 0.0f); } // Quaternion (const Quaternion &rkQ) else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Quaternion")) { Quaternion *q = (Quaternion *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = new Quaternion(*q); } // Quaternion (const Matrix3 &rot) else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Matrix3")) { Matrix3 *m = (Matrix3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = new Quaternion(*m); } else { croak("%s", usage); } } else if (items == 3) { // Quaternion (Real fW=1.0, Real fX=0.0, Real fY=0.0, Real fZ=0.0) if (looks_like_number(ST(1)) && looks_like_number(ST(2))) { RETVAL = new Quaternion((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), 0.0f, 0.0f); } // Quaternion (const Radian &rfAngle, const Vector3 &rkAxis) else if (sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Vector3")) { Vector3 *v = (Vector3 *) SvIV((SV *) SvRV(ST(2))); DegRad * rfAngle; TMOGRE_DEGRAD_IN(ST(1), rfAngle, Ogre::Quaternion, new); RETVAL = new Quaternion(*rfAngle, *v); } else { croak("%s", usage); } } else if (items == 4) { // Quaternion (Real fW=1.0, Real fX=0.0, Real fY=0.0, Real fZ=0.0) if (looks_like_number(ST(1)) && looks_like_number(ST(2)) && looks_like_number(ST(3))) { RETVAL = new Quaternion((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), 0.0f); } // Quaternion (const Vector3 &xaxis, const Vector3 &yaxis, const Vector3 &zaxis) else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3") && sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Vector3") && sv_isobject(ST(3)) && sv_derived_from(ST(3), "Ogre::Vector3")) { Vector3 *v1 = (Vector3 *) SvIV((SV *) SvRV(ST(1))); Vector3 *v2 = (Vector3 *) SvIV((SV *) SvRV(ST(2))); Vector3 *v3 = (Vector3 *) SvIV((SV *) SvRV(ST(3))); RETVAL = new Quaternion(*v1, *v2, *v3); } else { croak("%s", usage); } } else if (items == 5) { // Quaternion (Real fW=1.0, Real fX=0.0, Real fY=0.0, Real fZ=0.0) if (looks_like_number(ST(1)) && looks_like_number(ST(2)) && looks_like_number(ST(3)) && looks_like_number(ST(4))) { RETVAL = new Quaternion((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4))); } else { croak("%s", usage); } } else { croak("%s", usage); } OUTPUT: RETVAL void Quaternion::DESTROY() # ==, != bool quat_eq_xs(lobj, robj, swap) Quaternion * lobj Quaternion * robj IV swap ALIAS: quat_ne_xs = 1 CODE: switch(ix) { case 0: RETVAL = (*lobj == *robj); break; case 1: RETVAL = (*lobj != *robj); break; } OUTPUT: RETVAL # +, - Quaternion * quat_plus_xs(lobj, robj, swap) Quaternion * lobj Quaternion * robj IV swap ALIAS: quat_minus_xs = 1 PREINIT: Quaternion *q = new Quaternion; CODE: switch(ix) { case 0: *q = *lobj + *robj; break; case 1: *q = swap ? (*robj - *lobj) : (*lobj - *robj); break; } RETVAL = q; OUTPUT: RETVAL # * (with Vector3 also) SV * quat_mult_xs(lobj, robj, swap) Quaternion * lobj SV * robj IV swap CODE: RETVAL = newSV(0); // Vector3 = Quaternion * Vector3 if (sv_isobject(robj) && sv_derived_from(robj, "Ogre::Vector3")) { Vector3 *rvec = (Vector3 *) SvIV((SV *) SvRV(robj)); Vector3 *v = new Vector3; *v = *lobj * *rvec; TMOGRE_OUT(RETVAL, v, Vector3); } // Quaternion = Quaternion * Quaternion else if (sv_isobject(robj) && sv_derived_from(robj, "Ogre::Quaternion")) { Quaternion *rquat = (Quaternion *) SvIV((SV *) SvRV(robj)); Quaternion *q = new Quaternion; *q = swap ? (*rquat * *lobj) : (*lobj * *rquat); TMOGRE_OUT(RETVAL, q, Quaternion); } else { croak("Quaternion::quat_mult_xs: unknown argument!\n"); } OUTPUT: RETVAL # neg Quaternion * quat_neg_xs(lobj, robj, swap) Quaternion * lobj SV * robj IV swap PREINIT: Quaternion *q = new Quaternion; CODE: *q = - (*lobj); RETVAL = q; OUTPUT: RETVAL void Quaternion::FromRotationMatrix(kRot) Matrix3 * kRot C_ARGS: *kRot void Quaternion::ToRotationMatrix(kRot) Matrix3 * kRot C_ARGS: *kRot void Quaternion::FromAngleAxis(rfAngle, rkAxis) DegRad * rfAngle Vector3 * rkAxis C_ARGS: *rfAngle, *rkAxis void Quaternion::ToAngleAxis(rfAngle, rkAxis) DegRad * rfAngle Vector3 * rkAxis C_ARGS: *rfAngle, *rkAxis ## I assume these ones are pointers to an array of Vector3?? ## void FromAxes (const Vector3 *akAxis) ## void ToAxes (Vector3 *akAxis) const void Quaternion::FromAxes(xAxis, yAxis, zAxis) Vector3 * xAxis Vector3 * yAxis Vector3 * zAxis C_ARGS: *xAxis, *yAxis, *zAxis void Quaternion::ToAxes(xAxis, yAxis, zAxis) Vector3 * xAxis Vector3 * yAxis Vector3 * zAxis C_ARGS: *xAxis, *yAxis, *zAxis Vector3 * Quaternion::xAxis() CODE: RETVAL = new Vector3; *RETVAL = THIS->xAxis(); OUTPUT: RETVAL Vector3 * Quaternion::yAxis() CODE: RETVAL = new Vector3; *RETVAL = THIS->yAxis(); OUTPUT: RETVAL Vector3 * Quaternion::zAxis() CODE: RETVAL = new Vector3; *RETVAL = THIS->zAxis(); OUTPUT: RETVAL Real Quaternion::Dot(rkQ) Quaternion * rkQ C_ARGS: *rkQ Real Quaternion::Norm() Real Quaternion::normalise() Radian * Quaternion::getRoll(bool reprojectAxis=true) CODE: RETVAL = new Radian; *RETVAL = THIS->getRoll(); OUTPUT: RETVAL Radian * Quaternion::getPitch(bool reprojectAxis=true) CODE: RETVAL = new Radian; *RETVAL = THIS->getPitch(); OUTPUT: RETVAL Radian * Quaternion::getYaw(bool reprojectAxis=true) CODE: RETVAL = new Radian; *RETVAL = THIS->getYaw(); OUTPUT: RETVAL bool Quaternion::equals(rhs, tolerance) Quaternion * rhs DegRad * tolerance C_ARGS: *rhs, *tolerance ## xxx: it would be nice to be able to do this: $v->{x} = 20; ## but how is that done (the object is a pointer to a C++ object, ## not a hash). For now, we have this gimpy interface with setX, etc. Real Quaternion::w() CODE: RETVAL = (*THIS).w; OUTPUT: RETVAL Real Quaternion::x() CODE: RETVAL = (*THIS).x; OUTPUT: RETVAL Real Quaternion::y() CODE: RETVAL = (*THIS).y; OUTPUT: RETVAL Real Quaternion::z() CODE: RETVAL = (*THIS).z; OUTPUT: RETVAL void Quaternion::setW(w) Real w CODE: (*THIS).w = w; void Quaternion::setX(x) Real x CODE: (*THIS).x = x; void Quaternion::setY(y) Real y CODE: (*THIS).y = y; void Quaternion::setZ(z) Real z CODE: (*THIS).z = z; Ogre-0.60/xs/RenderSystemCapabilities.xs0000644000175000017500000000532312146460465020516 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::RenderSystemCapabilities void RenderSystemCapabilities::setNumWorldMatrices(unsigned short num) void RenderSystemCapabilities::setNumTextureUnits(unsigned short num) void RenderSystemCapabilities::setStencilBufferBitDepth(unsigned short num) void RenderSystemCapabilities::setNumVertexBlendMatrices(unsigned short num) void RenderSystemCapabilities::setNumMultiRenderTargets(unsigned short num) unsigned short RenderSystemCapabilities::getNumWorldMatrices() unsigned short RenderSystemCapabilities::getNumTextureUnits() unsigned short RenderSystemCapabilities::getStencilBufferBitDepth() unsigned short RenderSystemCapabilities::getNumVertexBlendMatrices() unsigned short RenderSystemCapabilities::getNumMultiRenderTargets() void RenderSystemCapabilities::setCapability(int c) C_ARGS: (Capabilities)c bool RenderSystemCapabilities::hasCapability(int c) C_ARGS: (Capabilities)c unsigned short RenderSystemCapabilities::getVertexProgramConstantFloatCount() unsigned short RenderSystemCapabilities::getVertexProgramConstantIntCount() unsigned short RenderSystemCapabilities::getVertexProgramConstantBoolCount() unsigned short RenderSystemCapabilities::getFragmentProgramConstantFloatCount() unsigned short RenderSystemCapabilities::getFragmentProgramConstantIntCount() unsigned short RenderSystemCapabilities::getFragmentProgramConstantBoolCount() ##String ##RenderSystemCapabilities::getMaxVertexProgramVersion() ## ##void ##RenderSystemCapabilities::setMaxVertexProgramVersion(String ver) ## ##String ##RenderSystemCapabilities::getMaxFragmentProgramVersion() ## ##void ##RenderSystemCapabilities::setMaxFragmentProgramVersion(String ver) void RenderSystemCapabilities::setVertexProgramConstantFloatCount(unsigned short c) void RenderSystemCapabilities::setVertexProgramConstantIntCount(unsigned short c) void RenderSystemCapabilities::setVertexProgramConstantBoolCount(unsigned short c) void RenderSystemCapabilities::setFragmentProgramConstantFloatCount(unsigned short c) void RenderSystemCapabilities::setFragmentProgramConstantIntCount(unsigned short c) void RenderSystemCapabilities::setFragmentProgramConstantBoolCount(unsigned short c) void RenderSystemCapabilities::setMaxPointSize(Real s) Real RenderSystemCapabilities::getMaxPointSize() void RenderSystemCapabilities::setNonPOW2TexturesLimited(bool l) bool RenderSystemCapabilities::getNonPOW2TexturesLimited() void RenderSystemCapabilities::setNumVertexTextureUnits(unsigned short n) unsigned short RenderSystemCapabilities::getNumVertexTextureUnits() void RenderSystemCapabilities::setVertexTextureUnitsShared(bool shared) bool RenderSystemCapabilities::getVertexTextureUnitsShared() void RenderSystemCapabilities::log(Log *pLog) Ogre-0.60/xs/NodeAnimationTrack.xs0000644000175000017500000000271212146460465017271 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::NodeAnimationTrack TransformKeyFrame * NodeAnimationTrack::createNodeKeyFrame(Real timePos) Node * NodeAnimationTrack::getAssociatedNode() void NodeAnimationTrack::setAssociatedNode(node) Node * node void NodeAnimationTrack::applyToNode(node, timeIndex, weight=1.0, scale=1.0f) Node * node const TimeIndex * timeIndex Real weight Real scale C_ARGS: node, *timeIndex, weight, scale void NodeAnimationTrack::setUseShortestRotationPath(bool useShortestPath) bool NodeAnimationTrack::getUseShortestRotationPath() # note: C++ API passes in pointer with void return # xxx: I used TransformKeyFrame instead of KeyFrame. # I hope that is ok... the API says KeyFrame, but a *working* # example used TransformKeyFrame, and I was getting segfaults # with KeyFrame, so... TransformKeyFrame * NodeAnimationTrack::getInterpolatedKeyFrame(timeIndex) const TimeIndex *timeIndex PREINIT: // xxx: I guess this will never be freed... TransformKeyFrame *kf = new TransformKeyFrame(0, 0); CODE: THIS->getInterpolatedKeyFrame(*timeIndex, kf); RETVAL = kf; OUTPUT: RETVAL void NodeAnimationTrack::apply(timeIndex, weight=1.0, scale=1.0f) const TimeIndex * timeIndex Real weight Real scale C_ARGS: *timeIndex, weight, scale TransformKeyFrame * NodeAnimationTrack::getNodeKeyFrame(unsigned short index) bool NodeAnimationTrack::hasNonZeroKeyFrames() void NodeAnimationTrack::optimise() Ogre-0.60/xs/ControllerManager.xs0000644000175000017500000000701212146460465017173 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ControllerManager static ControllerManager * ControllerManager::getSingletonPtr() ## Controller< Real > * ControllerManager::createController(const ControllerValueRealPtr &src, const ControllerValueRealPtr &dest, const ControllerFunctionRealPtr &func) ## note: this has to be callable like this: ## $cont = $contman->createController($contman->getFrameTimeSource, $perlcontval, $perlcontfunc); ## that is, the ControllerValues and ControllerFunctions that are passed in ## could be either C++ objects or Perl objects. ControllerReal * ControllerManager::createController(ControllerValueReal *src, ControllerValueReal *dest, ControllerFunctionReal *func) CODE: ControllerValueRealPtr srcptr = ControllerValueRealPtr(src); ControllerValueRealPtr destptr = ControllerValueRealPtr(dest); ControllerFunctionRealPtr funcptr = ControllerFunctionRealPtr(func); RETVAL = THIS->createController(srcptr, destptr, funcptr); OUTPUT: RETVAL ## Controller< Real > * ControllerManager::createFrameTimePassthroughController(const ControllerValueRealPtr &dest) ControllerReal * ControllerManager::createFrameTimePassthroughController(ControllerValueReal *dest) CODE: ControllerValueRealPtr destptr = ControllerValueRealPtr(dest); RETVAL = THIS->createFrameTimePassthroughController(destptr); OUTPUT: RETVAL void ControllerManager::clearControllers() void ControllerManager::updateAllControllers() ## const ControllerValueRealPtr & ControllerManager::getFrameTimeSource() ControllerValueReal * ControllerManager::getFrameTimeSource() CODE: RETVAL = THIS->getFrameTimeSource().getPointer(); OUTPUT: RETVAL ## const ControllerFunctionRealPtr & ControllerManager::getPassthroughControllerFunction() ControllerFunctionReal * ControllerManager::getPassthroughControllerFunction() CODE: RETVAL = THIS->getPassthroughControllerFunction().getPointer(); OUTPUT: RETVAL ControllerReal * ControllerManager::createTextureAnimator(TextureUnitState *layer, Real sequenceTime) ControllerReal * ControllerManager::createTextureUVScroller(TextureUnitState *layer, Real speed) ControllerReal * ControllerManager::createTextureUScroller(TextureUnitState *layer, Real uSpeed) ControllerReal * ControllerManager::createTextureVScroller(TextureUnitState *layer, Real vSpeed) ControllerReal * ControllerManager::createTextureRotater(TextureUnitState *layer, Real speed) ControllerReal * ControllerManager::createTextureWaveTransformer(TextureUnitState *layer, int ttype, int waveType, Real base=0, Real frequency=1, Real phase=0, Real amplitude=1) C_ARGS: layer, (TextureUnitState::TextureTransformType)ttype, (WaveformType)waveType, base, frequency, phase, amplitude ControllerReal * ControllerManager::createGpuProgramTimerParam(GpuProgramParameters *params, size_t paramIndex, Real timeFactor=1.0f) CODE: GpuProgramParametersSharedPtr paramsPtr = GpuProgramParametersSharedPtr(params); RETVAL = THIS->createGpuProgramTimerParam(paramsPtr, paramIndex, timeFactor); OUTPUT: RETVAL ## xxx: would need a manager (like for the Listeners) for the Perl-created objects ## in order to make this work; for now you have to call clear Controllers, I guess ## void ControllerManager::destroyController(ControllerReal *controller) Real ControllerManager::getTimeFactor() void ControllerManager::setTimeFactor(Real tf) Real ControllerManager::getFrameDelay() void ControllerManager::setFrameDelay(Real fd) Real ControllerManager::getElapsedTime() void ControllerManager::setElapsedTime(Real elapsedTime) Ogre-0.60/xs/AnimationState.xs0000644000175000017500000000142512146460465016477 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::AnimationState # this is all wrapped # except the overridden == and != operators String AnimationState::getAnimationName() Real AnimationState::getTimePosition() void AnimationState::setTimePosition(Real timePos) Real AnimationState::getLength() void AnimationState::setLength(Real len) Real AnimationState::getWeight() void AnimationState::setWeight(Real weight) void AnimationState::addTime(Real offset) bool AnimationState::hasEnded() bool AnimationState::getEnabled() void AnimationState::setEnabled(bool enabled) bool AnimationState::getLoop() void AnimationState::setLoop(bool loop) void AnimationState::copyStateFrom(animState) AnimationState * animState C_ARGS: *animState AnimationStateSet * AnimationState::getParent() Ogre-0.60/xs/ParticleAffector.xs0000644000175000017500000000006412146460465016772 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ParticleAffector Ogre-0.60/xs/IndexData.xs0000644000175000017500000000021412146460465015413 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::IndexData IndexData * IndexData::clone(bool copyData=true) void IndexData::optimiseVertexCacheTriList() Ogre-0.60/xs/Timer.xs0000644000175000017500000000045112146460465014635 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Timer ## bool ## Ogre::Timer::setOption(String strKey, const void *pValue) void Timer::reset() unsigned long Timer::getMilliseconds() unsigned long Timer::getMicroseconds() unsigned long Timer::getMillisecondsCPU() unsigned long Timer::getMicrosecondsCPU() Ogre-0.60/xs/HardwarePixelBuffer.xs0000644000175000017500000000006612146460465017450 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::HardwarePixelBuffer Ogre-0.60/xs/Particle.xs0000644000175000017500000000005412146460465015317 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Particle Ogre-0.60/xs/GpuProgramParameters.xs0000644000175000017500000000006712146460465017667 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::GpuProgramParameters Ogre-0.60/xs/Viewport.xs0000644000175000017500000000336612146460465015404 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Viewport # this is almost all wrapped void Viewport::update() RenderTarget * Viewport::getTarget() Camera * Viewport::getCamera() void Viewport::setCamera(cam) Camera * cam int Viewport::getZOrder() Real Viewport::getLeft() Real Viewport::getTop() Real Viewport::getWidth() Real Viewport::getHeight() int Viewport::getActualLeft() int Viewport::getActualTop() int Viewport::getActualWidth() int Viewport::getActualHeight() void Viewport::setDimensions(left, top, width, height) Real left Real top Real width Real height void Viewport::setBackgroundColour(colour) ColourValue *colour C_ARGS: *colour # getBackgroundColour void Viewport::setClearEveryFrame(clear, buffers=FBT_COLOUR|FBT_DEPTH) bool clear unsigned int buffers bool Viewport::getClearEveryFrame() unsigned int Viewport::getClearBuffers() void Viewport::setMaterialScheme(schemeName) String schemeName String Viewport::getMaterialScheme() # this returns the values as a list instead of the C++ arg reference way void Viewport::getActualDimensions(OUTLIST int left, OUTLIST int top, OUTLIST int width, OUTLIST int height) C_ARGS: left, top, width, height void Viewport::setOverlaysEnabled(enabled) bool enabled bool Viewport::getOverlaysEnabled() void Viewport::setSkiesEnabled(enabled) bool enabled bool Viewport::getSkiesEnabled() void Viewport::setShadowsEnabled(enabled) bool enabled bool Viewport::getShadowsEnabled() void Viewport::setVisibilityMask(mask) uint32 mask uint32 Viewport::getVisibilityMask() # virtual void Viewport::setRenderQueueInvocationSequenceName(sequenceName) String sequenceName String Viewport::getRenderQueueInvocationSequenceName() Ogre-0.60/xs/HardwareIndexBuffer.xs0000644000175000017500000000006612146460465017436 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::HardwareIndexBuffer Ogre-0.60/xs/Animation.xs0000644000175000017500000001573312146460465015505 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Animation static void Animation::setDefaultInterpolationMode(int im) C_ARGS: (Ogre::Animation::InterpolationMode)im static int Animation::getDefaultInterpolationMode() static void Animation::setDefaultRotationInterpolationMode(int im) C_ARGS: (Ogre::Animation::RotationInterpolationMode)im static int Animation::getDefaultRotationInterpolationMode() String Animation::getName() Real Animation::getLength() NodeAnimationTrack * Animation::createNodeTrack(handle, ...) unsigned short handle PREINIT: char *usage = "Usage: Ogre::Animation::createNodeTrack(CLASS, handle [, node])\n"; CODE: if (items == 2) { RETVAL = THIS->createNodeTrack(handle); } else if (items > 2) { if (sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Node")) { Node *node = (Node *) SvIV((SV *) SvRV(ST(2))); RETVAL = THIS->createNodeTrack(handle, node); } else { croak("%s", usage); } } else { croak("%s", usage); } OUTPUT: RETVAL NumericAnimationTrack * Animation::createNumericTrack(handle, ...) unsigned short handle PREINIT: char *usage = "Usage: Ogre::Animation::createNumericTrack(CLASS, handle [, anim])\n"; CODE: if (items == 2) { RETVAL = THIS->createNumericTrack(handle); } else if (items > 2 && sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::AnimableValue")) { AnimableValue *anim = (AnimableValue *) SvIV((SV *) SvRV(ST(2))); AnimableValuePtr animptr = AnimableValuePtr(anim); RETVAL = THIS->createNumericTrack(handle, animptr); } else { croak("%s", usage); } OUTPUT: RETVAL VertexAnimationTrack * Animation::createVertexTrack(handle, ...) unsigned short handle PREINIT: char *usage = "Usage: Ogre::Animation::createVertexTrack(CLASS, handle, animType) or (CLASS, handle, data, animType)\n"; CODE: if (items == 4 && sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::VertexData") && looks_like_number(ST(3))) { VertexData *data = (VertexData *) SvIV((SV *) SvRV(ST(2))); VertexAnimationType animType = (VertexAnimationType)SvIV(ST(3)); RETVAL = THIS->createVertexTrack(handle, data, animType); } else if (items == 3 && looks_like_number(ST(2))) { VertexAnimationType animType = (VertexAnimationType)SvIV(ST(2)); RETVAL = THIS->createVertexTrack(handle, animType); } else { croak("%s", usage); } OUTPUT: RETVAL unsigned short Animation::getNumNodeTracks() NodeAnimationTrack * Animation::getNodeTrack(unsigned short handle) bool Animation::hasNodeTrack(unsigned short handle) unsigned short Animation::getNumNumericTracks() NumericAnimationTrack * Animation::getNumericTrack(unsigned short handle) bool Animation::hasNumericTrack(unsigned short handle) unsigned short Animation::getNumVertexTracks() VertexAnimationTrack * Animation::getVertexTrack(unsigned short handle) bool Animation::hasVertexTrack(unsigned short handle) void Animation::destroyNodeTrack(unsigned short handle) void Animation::destroyNumericTrack(unsigned short handle) void Animation::destroyVertexTrack(unsigned short handle) void Animation::destroyAllTracks() void Animation::destroyAllNodeTracks() void Animation::destroyAllNumericTracks() void Animation::destroyAllVertexTracks() void Animation::apply(...) PREINIT: char *usage = "Usage: Ogre::Animation::apply(CLASS, timePos [, weight, scale]) or (CLASS, skeleton, timePos [, weight, scale]) or (CLASS, entity, timePos, weight, software, hardware)\n"; CODE: // apply(Entity *entity, Real timePos, Real weight, bool software, bool hardware) if (items == 6 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Entity")) { Entity *entity = (Entity *) SvIV((SV *) SvRV(ST(1))); // assuming args after entity are the right type THIS->apply(entity, (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (bool)SvTRUE(ST(4)), (bool)SvTRUE(ST(5))); } // apply(Skeleton *skeleton, Real timePos, Real weight=1.0, Real scale=1.0f) else if (items >= 3 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Skeleton")) { Skeleton *skeleton = (Skeleton *) SvIV((SV *) SvRV(ST(1))); Real timePos = (Real)SvNV(ST(2)); Real weight = 1.0f, scale = 1.0f; if (items >= 4) weight = (Real)SvNV(ST(3)); if (items >= 5) scale = (Real)SvNV(ST(4)); THIS->apply(skeleton, timePos, weight, scale); } // apply(Real timePos, Real weight=1.0, Real scale=1.0f) else if (items >= 2 && looks_like_number(ST(1))) { Real timePos = (Real)SvNV(ST(1)); Real weight = 1.0f, scale = 1.0f; if (items >= 3) weight = (Real)SvNV(ST(2)); if (items >= 4) scale = (Real)SvNV(ST(3)); THIS->apply(timePos, weight, scale); } else { croak("%s", usage); } void Animation::setInterpolationMode(int im) C_ARGS: (Ogre::Animation::InterpolationMode)im int Animation::getInterpolationMode() void Animation::setRotationInterpolationMode(int im) C_ARGS: (Ogre::Animation::RotationInterpolationMode)im int Animation::getRotationInterpolationMode() ## NodeTrackIterator Animation::getNodeTrackIterator() ## NumericTrackIterator Animation::getNumericTrackIterator() ## VertexTrackIterator Animation::getVertexTrackIterator() ## The docs say these are read-only iterators ## (Ogre::ConstMapIterator) only to be used quickly ## then forgotten about, so probably asking for trouble ## by sticking them in an array ref.... AV * Animation::getNodeTrackAref() CODE: RETVAL = (AV *) sv_2mortal((SV *)newAV()); // AV* have to be made mortal Animation::NodeTrackIterator tIt = THIS->getNodeTrackIterator(); while (tIt.hasMoreElements()) { NodeAnimationTrack *at = tIt.getNext(); # make SV* to put on array (note: not mortal) SV *svat = newSV(0); TMOGRE_OUT(svat, at, NodeAnimationTrack); av_push(RETVAL, svat); } OUTPUT: RETVAL AV * Animation::getNumericTrackAref() CODE: RETVAL = (AV *) sv_2mortal((SV *)newAV()); // AV* have to be made mortal Animation::NumericTrackIterator tIt = THIS->getNumericTrackIterator(); while (tIt.hasMoreElements()) { NumericAnimationTrack *at = tIt.getNext(); # make SV* to put on array SV *svat = sv_newmortal(); TMOGRE_OUT(svat, at, NumericAnimationTrack); av_push(RETVAL, svat); } OUTPUT: RETVAL AV * Animation::getVertexTrackAref() CODE: RETVAL = (AV *) sv_2mortal((SV *)newAV()); // AV* have to be made mortal Animation::VertexTrackIterator tIt = THIS->getVertexTrackIterator(); while (tIt.hasMoreElements()) { VertexAnimationTrack *at = tIt.getNext(); # make SV* to put on array SV *svat = sv_newmortal(); TMOGRE_OUT(svat, at, VertexAnimationTrack); av_push(RETVAL, svat); } OUTPUT: RETVAL void Animation::optimise(bool discardIdentityNodeTracks=true) Animation * Animation::clone(newName) String newName Ogre-0.60/xs/Radian.xs0000644000175000017500000000474612146460465014766 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Radian Radian * Radian::new(...) PREINIT: char *usage = "Usage: Ogre::Radian::new(CLASS [, d]) or new(CLASS, Degree)\n"; CODE: // Radian() if (items == 1) { RETVAL = new Radian(); } else if (items == 2) { // Radian(Real r) if (looks_like_number(ST(1))) { RETVAL = new Radian((Real)SvNV(ST(1))); } // Radian(const Degree &d) else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Degree")) { Degree *deg = (Degree *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = new Radian(*deg); } } else { croak("%s", usage); } OUTPUT: RETVAL void Radian::DESTROY() # ==, !=, <, >, <=, >= bool rad_eq_xs(lobj, robj, swap) Radian * lobj Radian * robj IV swap ALIAS: rad_ne_xs = 1 rad_lt_xs = 2 rad_gt_xs = 3 rad_le_xs = 4 rad_ge_xs = 5 CODE: switch(ix) { case 0: RETVAL = (*lobj == *robj); break; case 1: RETVAL = (*lobj != *robj); break; case 2: RETVAL = (*lobj < *robj); break; case 3: RETVAL = (*lobj > *robj); break; case 4: RETVAL = (*lobj <= *robj); break; case 5: RETVAL = (*lobj >= *robj); break; } OUTPUT: RETVAL # +, - (still need other variations with Real, etc) Radian * rad_plus(lobj, robj, swap) Radian * lobj Radian * robj IV swap ALIAS: rad_minus_xs = 1 PREINIT: Radian *rad = new Radian; CODE: switch(ix) { case 0: *rad = *lobj + *robj; break; case 1: *rad = swap ? (*robj - *lobj) : (*lobj - *robj); break; } RETVAL = rad; OUTPUT: RETVAL # * Radian * rad_mult_xs(lobj, robj, swap) Radian * lobj SV * robj IV swap PREINIT: Radian *rad = new Radian; CODE: if (looks_like_number(robj)) { Real rhs = (Real)SvNV(robj); *rad = *lobj * rhs; } else if (sv_isobject(robj)) { DegRad * rhs; TMOGRE_DEGRAD_IN(robj, rhs, Ogre::Radian, rad_mult_xs); *rad = swap ? (*rhs * *lobj) : (*lobj * *rhs); } else { croak("Radian::rad_mult_xs: unknown argument!\n"); } RETVAL = rad; OUTPUT: RETVAL # neg Radian * rad_neg_xs(lobj, robj, swap) Radian * lobj SV * robj IV swap PREINIT: Radian *rad = new Radian; CODE: *rad = - (*lobj); RETVAL = rad; OUTPUT: RETVAL Real Radian::valueDegrees() Real Radian::valueRadians() Real Radian::valueAngleUnits() Ogre-0.60/xs/SceneNode.xs0000644000175000017500000001405712146460465015427 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::SceneNode void SceneNode::attachObject(obj) MovableObject * obj unsigned short SceneNode::numAttachedObjects() ##also virtual MovableObject * getAttachedObject (unsigned short index) MovableObject * SceneNode::getAttachedObject(name) String name ##also virtual MovableObject * detachObject (unsigned short index) void SceneNode::detachObject(obj) MovableObject * obj void SceneNode::detachAllObjects() bool SceneNode::isInSceneGraph() ## virtual void _notifyRootNode (void) ## virtual void _updateBounds (void) ## virtual ObjectIterator getAttachedObjectIterator (void) ## virtual ConstObjectIterator getAttachedObjectIterator (void) const SceneManager * SceneNode::getCreator() ##also virtual void removeAndDestroyChild (unsigned short index) void SceneNode::removeAndDestroyChild(name) String name void SceneNode::removeAndDestroyAllChildren() void SceneNode::showBoundingBox(bShow) bool bShow bool SceneNode::getShowBoundingBox() # SceneNode * createChildSceneNode(const Vector3 &translate=Vector3::ZERO, const Quaternion &rotate=Quaternion::IDENTITY) # SceneNode * createChildSceneNode(const String &name, const Vector3 &translate=Vector3::ZERO, const Quaternion &rotate=Quaternion::IDENTITY) SceneNode * SceneNode::createChildSceneNode(...) CODE: // Alrighty then, here we go... // 0 args passed, must not be 2nd version, so pass no args if (items == 1) { RETVAL = THIS->createChildSceneNode(); } else { // 1st arg is Vector3 if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN // 1 arg passed if (items == 2) { RETVAL = THIS->createChildSceneNode(*vec); } // 2 args passed else if (items == 3) { if (sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Quaternion")) { Quaternion *q = (Quaternion *) SvIV((SV *) SvRV(ST(2))); // TMOGRE_IN RETVAL = THIS->createChildSceneNode(*vec, *q); } else { croak("Usage: Ogre::SceneNode::createChildSceneNode(THIS, Vector3, Quaternion)\n"); } } } // 1st arg is String else { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String name = xstmpchr; // 1 arg passed if (items == 2) { RETVAL = THIS->createChildSceneNode(name); } // 2 args passed else if (items == 3) { if (sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(2))); // TMOGRE_IN RETVAL = THIS->createChildSceneNode(name, *vec); } else { croak("Usage: Ogre::SceneNode::createChildSceneNode(THIS, String, Vector3)\n"); } } // 3 args passed else if (items == 4) { if (sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(2))); // TMOGRE_IN if (sv_isobject(ST(3)) && sv_derived_from(ST(3), "Ogre::Quaternion")) { Quaternion *q = (Quaternion *) SvIV((SV *) SvRV(ST(3))); // TMOGRE_IN RETVAL = THIS->createChildSceneNode(name, *vec, *q); } else { croak("Usage: Ogre::SceneNode::createChildSceneNode(THIS, String, Vector3, Quaternion)\n"); } } else { croak("Usage: Ogre::SceneNode::createChildSceneNode(THIS, String, Vector3, Quaternion)\n"); } } } } OUTPUT: RETVAL ## virtual void findLights (LightList &destList, Real radius, uint32 lightMask=0xFFFFFFFF) const void SceneNode::setFixedYawAxis(useFixed, fixedAxis) bool useFixed Vector3 * fixedAxis C_ARGS: useFixed, *fixedAxis void SceneNode::yaw(DegRad *angle, int relativeTo=Node::TS_LOCAL) C_ARGS: *angle, (Ogre::Node::TransformSpace)relativeTo ## virtual void setDirection (Real x, Real y, Real z, TransformSpace relativeTo=TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z) ## virtual void setDirection (const Vector3 &vec, TransformSpace relativeTo=TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z) void SceneNode::setDirection(x, y, z, relativeTo, localDirectionVector) Real x Real y Real z int relativeTo Vector3 * localDirectionVector C_ARGS: x, y, z, (Ogre::Node::TransformSpace)relativeTo, *localDirectionVector ## virtual void lookAt (const Vector3 &targetPoint, TransformSpace relativeTo, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z) void SceneNode::lookAt(targetPoint, relativeTo, localDirectionVector) Vector3 * targetPoint int relativeTo Vector3 * localDirectionVector C_ARGS: *targetPoint, (Ogre::Node::TransformSpace)relativeTo, *localDirectionVector ## virtual void setAutoTracking (bool enabled, SceneNode *target=0, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z, const Vector3 &offset=Vector3::ZERO) void SceneNode::setAutoTracking(enabled, target, localDirectionVector, offset) bool enabled SceneNode * target Vector3 * localDirectionVector Vector3 * offset C_ARGS: enabled, target, *localDirectionVector, *offset SceneNode * SceneNode::getAutoTrackTarget() ## virtual const Vector3 & getAutoTrackOffset (void) ## virtual const Vector3 & getAutoTrackLocalDirection (void) SceneNode * SceneNode::getParentSceneNode() void SceneNode::setVisible(bool enabled, bool cascade=true) void SceneNode::flipVisibility(bool cascade=true) void SceneNode::setDebugDisplayEnabled(bool enabled, bool cascade=true) ## static void queueNeedUpdate (Node *n) ## static void processQueuedUpdates (void) Ogre-0.60/xs/TagPoint.xs0000644000175000017500000000005312146460465015300 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::TagPoint Ogre-0.60/xs/TextureManager.xs0000644000175000017500000000110312146460465016503 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::TextureManager static TextureManager * TextureManager::getSingletonPtr() ## note: all the ResourceManager subclasses need to override 'load' like this Texture * TextureManager::load(String name, String group, int texType=TEX_TYPE_2D, int numMipmaps=MIP_DEFAULT, Real gamma=1.0f, bool isAlpha=false, int desiredFormat=PF_UNKNOWN) CODE: RETVAL = THIS->load(name, group, (TextureType)texType, numMipmaps, gamma, isAlpha, (PixelFormat)desiredFormat).getPointer(); OUTPUT: RETVAL void TextureManager::setDefaultNumMipmaps(size_t num) Ogre-0.60/xs/GpuProgram.xs0000644000175000017500000000274512146460465015650 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::GpuProgram void GpuProgram::setSourceFile(String filename) void GpuProgram::setSource(String source) String GpuProgram::getSyntaxCode() void GpuProgram::setSyntaxCode(String syntax) String GpuProgram::getSourceFile() String GpuProgram::getSource() void GpuProgram::setType(int t) C_ARGS: (GpuProgramType)t int GpuProgram::getType() bool GpuProgram::isSupported() GpuProgramParameters * GpuProgram::createParameters() CODE: RETVAL = THIS->createParameters().getPointer(); OUTPUT: RETVAL void GpuProgram::setSkeletalAnimationIncluded(bool included) bool GpuProgram::isSkeletalAnimationIncluded() void GpuProgram::setMorphAnimationIncluded(bool included) void GpuProgram::setPoseAnimationIncluded(unsigned short poseCount) bool GpuProgram::isMorphAnimationIncluded() bool GpuProgram::isPoseAnimationIncluded() unsigned short GpuProgram::getNumberOfPosesIncluded() void GpuProgram::setVertexTextureFetchRequired(bool r) bool GpuProgram::isVertexTextureFetchRequired() GpuProgramParameters * GpuProgram::getDefaultParameters() CODE: RETVAL = THIS->getDefaultParameters().getPointer(); OUTPUT: RETVAL bool GpuProgram::hasDefaultParameters() bool GpuProgram::getPassSurfaceAndLightStates() bool GpuProgram::getPassFogStates() bool GpuProgram::getPassTransformStates() String GpuProgram::getLanguage() bool GpuProgram::hasCompileError() void GpuProgram::resetCompileError() void GpuProgram::load(bool backgroundThread=false) Ogre-0.60/xs/FrameEvent.xs0000644000175000017500000000046712146460465015620 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::FrameEvent ## These are "public attributes", not methods. Real FrameEvent::timeSinceLastEvent() CODE: RETVAL = (*THIS).timeSinceLastEvent; OUTPUT: RETVAL Real FrameEvent::timeSinceLastFrame() CODE: RETVAL = (*THIS).timeSinceLastFrame; OUTPUT: RETVAL Ogre-0.60/xs/NumericAnimationTrack.xs0000644000175000017500000000007112146460465020002 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::NumericAnimationTrack Ogre-0.60/xs/OverlayElement.xs0000644000175000017500000000471012146460465016512 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::OverlayElement void OverlayElement::initialise() String OverlayElement::getName() void OverlayElement::show() void OverlayElement::hide() bool OverlayElement::isVisible() bool OverlayElement::isEnabled() void OverlayElement::setEnabled(bool b) void OverlayElement::setDimensions(Real width, Real height) void OverlayElement::setPosition(Real left, Real top) void OverlayElement::setWidth(Real width) Real OverlayElement::getWidth() void OverlayElement::setHeight(Real height) Real OverlayElement::getHeight() void OverlayElement::setLeft(Real left) Real OverlayElement::getLeft() void OverlayElement::setTop(Real top) Real OverlayElement::getTop() String OverlayElement::getMaterialName() void OverlayElement::setMaterialName(String matName) ## const MaterialPtr & getMaterial (void) ## void getWorldTransforms (Matrix4 *xform) String OverlayElement::getTypeName() ## XXX: Caption methods actually take DisplayString, ## which typedefs to either String or UTFString (utf-16), ## but the code I see in the examples just uses String, ## and UTFString converts back and forth with String automatically, ## and it is easier so thats what I used. void OverlayElement::setCaption(String text) String OverlayElement::getCaption() void OverlayElement::setColour(col) ColourValue * col C_ARGS: *col ## const ColourValue & getColour (void) const void OverlayElement::setMetricsMode(int gmm) C_ARGS: (GuiMetricsMode)gmm int OverlayElement::getMetricsMode() void OverlayElement::setHorizontalAlignment(int gha) C_ARGS: (GuiHorizontalAlignment)gha int OverlayElement::getHorizontalAlignment() void OverlayElement::setVerticalAlignment(int gva) C_ARGS: (GuiVerticalAlignment)gva int OverlayElement::getVerticalAlignment() bool OverlayElement::contains(Real x, Real y) OverlayElement * OverlayElement::findElementAt(Real x, Real y) bool OverlayElement::isContainer() bool OverlayElement::isKeyEnabled() bool OverlayElement::isCloneable() void OverlayElement::setCloneable(bool c) OverlayContainer * OverlayElement::getParent() unsigned short OverlayElement::getZOrder() Real OverlayElement::getSquaredViewDepth(cam) Camera * cam ## const LightList & getLights (void) const void OverlayElement::copyFromTemplate(templateOverlay) OverlayElement * templateOverlay OverlayElement * OverlayElement::clone(instanceName) String instanceName const OverlayElement * OverlayElement::getSourceTemplate() Ogre-0.60/xs/Entity.xs0000644000175000017500000001016612146460465015035 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Entity ## note: if constructor/destructor ever added, refer to BillboardSet.xs const Mesh * Entity::getMesh() CODE: RETVAL = THIS->getMesh().getPointer(); OUTPUT: RETVAL SubEntity * Entity::getSubEntity(...) CODE: if (looks_like_number(ST(1))) { unsigned int index = (unsigned int)SvUV(ST(1)); RETVAL = THIS->getSubEntity(index); } else { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String name = xstmpchr; RETVAL = THIS->getSubEntity(name); } OUTPUT: RETVAL unsigned int Entity::getNumSubEntities() Entity * Entity::clone(name) String name void Entity::setMaterialName(name) String name void Entity::setRenderQueueGroup(uint8 queueID) ## const AxisAlignedBox & getBoundingBox (void) const ## AxisAlignedBox getChildObjectsBoundingBox (void) const String Entity::getMovableType() AnimationState * Entity::getAnimationState(name) String name AnimationStateSet * Entity::getAllAnimationStates() void Entity::setDisplaySkeleton(display) bool display bool Entity::getDisplaySkeleton() Entity * Entity::getManualLodLevel(index) size_t index size_t Entity::getNumManualLodLevels() void Entity::setMeshLodBias(factor, maxDetailIndex=0, minDetailIndex=99) Real factor unsigned short maxDetailIndex unsigned short minDetailIndex void Entity::setMaterialLodBias(factor, maxDetailIndex=0, minDetailIndex=99) Real factor unsigned short maxDetailIndex unsigned short minDetailIndex void Entity::setPolygonModeOverrideable(PolygonModeOverrideable) bool PolygonModeOverrideable TagPoint * Entity::attachObjectToBone(boneName, pMovable, offsetOrientation=&Quaternion::IDENTITY, offsetPosition=&Vector3::ZERO) String boneName MovableObject * pMovable const Quaternion * offsetOrientation const Vector3 * offsetPosition CODE: RETVAL = THIS->attachObjectToBone(boneName, pMovable, *offsetOrientation, *offsetPosition); OUTPUT: RETVAL MovableObject * Entity::detachObjectFromBone(...) CODE: if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::MovableObject")) { MovableObject *obj = (MovableObject *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->detachObjectFromBone(obj); // probably shouldn't do this, but the return value has to be // ignored here, but not below when a String is passed, // so for convenience I just stick the old object in RETVAL RETVAL = obj; } else { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String movableName = xstmpchr; RETVAL = THIS->detachObjectFromBone(movableName); } OUTPUT: RETVAL void Entity::detachAllObjectsFromBone() ## ChildObjectListIterator Entity::getAttachedObjectIterator() Real Entity::getBoundingRadius() ## const AxisAlignedBox & Entity::getWorldBoundingBox(bool derive=false) ## const Sphere & Entity::getWorldBoundingSphere(bool derive=false) EdgeData * Entity::getEdgeList() bool Entity::hasEdgeList() ## ShadowRenderableListIterator Entity::getShadowVolumeRenderableIterator(ShadowTechnique shadowTechnique, const Light *light, HardwareIndexBufferSharedPtr *indexBuffer, bool extrudeVertices, Real extrusionDistance, unsigned long flags=0) bool Entity::hasSkeleton() SkeletonInstance * Entity::getSkeleton() bool Entity::isHardwareAnimationEnabled() int Entity::getSoftwareAnimationRequests() int Entity::getSoftwareAnimationNormalsRequests() void Entity::addSoftwareAnimationRequest(bool normalsAlso) void Entity::removeSoftwareAnimationRequest(bool normalsAlso) void Entity::shareSkeletonInstanceWith(entity) Entity * entity bool Entity::hasVertexAnimation() void Entity::stopSharingSkeletonInstance() bool Entity::sharesSkeletonInstance() ## xxx: std::set ## const EntitySet * Entity::getSkeletonInstanceSharingSet() void Entity::refreshAvailableAnimationState() uint32 Entity::getTypeFlags() VertexData * Entity::getVertexDataForBinding() int Entity::chooseVertexDataForBinding(bool hasVertexAnim) bool Entity::isInitialised() void Entity::backgroundLoadingComplete(res) Resource * res Ogre-0.60/xs/KeyFrame.xs0000644000175000017500000000010512146460465015254 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::KeyFrame Real KeyFrame::getTime() Ogre-0.60/xs/Light.xs0000644000175000017500000001212312146460465014623 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Light ## I finally figured out why DESTROY methods ## cause segfaults; for objects like this (a MovableObject) ## that are managed by SceneManager, ## there is a method destroyAllMovableObjects being called, ## and this was implicitly calling "delete THIS" here ## before that. But if I destroyLight here, basically it seems ## to get destroyed as soon as the Perl object goes out of scope, ## which is rarely what we want... So you have to just create ## these through SceneManager instead of using ->new. ##Light * ##Light::new(name) ## String name ## ##void ##Light::DESTROY() ## CODE: ## SceneManager *sm = THIS->_getManager(); ## if (sm) ## sm->destroyLight(THIS); void Light::setType(type) int type C_ARGS: (Ogre::Light::LightTypes)type int Light::getType() void Light::setDiffuseColour(...) CODE: if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::ColourValue")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setDiffuseColour(*colour); } else if (items == 4) { THIS->setDiffuseColour((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::Light::setDiffuseColour(THIS, col) or (THIS, r, g, b)\n"); } ColourValue * Light::getDiffuseColour() CODE: RETVAL = new ColourValue; *RETVAL = THIS->getDiffuseColour(); OUTPUT: RETVAL void Light::setSpecularColour(...) CODE: if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::ColourValue")) { ColourValue *colour = (ColourValue *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setSpecularColour(*colour); } else if (items == 4) { THIS->setSpecularColour((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::Light::setSpecularColour(THIS, col) or (THIS, r, g, b)\n"); } ColourValue * Light::getSpecularColour() CODE: RETVAL = new ColourValue; *RETVAL = THIS->getSpecularColour(); OUTPUT: RETVAL void Light::setAttenuation(Real range, Real constant, Real linear, Real quadratic) Real Light::getAttenuationRange() Real Light::getAttenuationConstant() Real Light::getAttenuationLinear() Real Light::getAttenuationQuadric() void Light::setPosition(...) CODE: if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setPosition(*vec); } else if (items == 4) { THIS->setPosition((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::Light::setPosition(THIS, vec) or (THIS, x, y, z)\n"); } Vector3 * Light::getPosition() CODE: RETVAL = new Vector3; *RETVAL = THIS->getPosition(); OUTPUT: RETVAL void Light::setDirection(...) CODE: if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setDirection(*vec); } else if (items == 4) { THIS->setDirection((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::Light::setDirection(THIS, vec) or (THIS, x, y, z)\n"); } Vector3 * Light::getDirection() CODE: RETVAL = new Vector3; *RETVAL = THIS->getDirection(); OUTPUT: RETVAL void Light::setSpotlightRange(innerAngle, outerAngle, falloff=1.0) DegRad * innerAngle DegRad * outerAngle Real falloff C_ARGS: *innerAngle, *outerAngle, falloff Radian * Light::getSpotlightInnerAngle() CODE: RETVAL = new Radian; *RETVAL = THIS->getSpotlightInnerAngle(); OUTPUT: RETVAL Radian * Light::getSpotlightOuterAngle() CODE: RETVAL = new Radian; *RETVAL = THIS->getSpotlightOuterAngle(); OUTPUT: RETVAL Real Light::getSpotlightFalloff() void Light::setSpotlightInnerAngle(val) DegRad * val C_ARGS: *val void Light::setSpotlightOuterAngle(val) DegRad * val C_ARGS: *val void Light::setSpotlightFalloff(Real val) void Light::setPowerScale(Real power) Real Light::getPowerScale() AxisAlignedBox * Light::getBoundingBox() CODE: RETVAL = new AxisAlignedBox; *RETVAL = THIS->getBoundingBox(); OUTPUT: RETVAL String Light::getMovableType() Vector3 * Light::getDerivedPosition() CODE: RETVAL = new Vector3; *RETVAL = THIS->getDerivedPosition(); OUTPUT: RETVAL Vector3 * Light::getDerivedDirection() CODE: RETVAL = new Vector3; *RETVAL = THIS->getDerivedDirection(); OUTPUT: RETVAL void Light::setVisible(bool visible) Real Light::getBoundingRadius() ## Vector4 getAs4DVector() uint32 Light::getTypeFlags() AnimableValue * Light::createAnimableValue(valueName) String valueName CODE: RETVAL = THIS->createAnimableValue(valueName).getPointer(); OUTPUT: RETVAL ## void Light::setCustomShadowCameraSetup(const ShadowCameraSetupPtr &customShadowSetup) void Light::resetCustomShadowCameraSetup() ## const ShadowCameraSetupPtr & getCustomShadowCameraSetup() Ogre-0.60/xs/StringInterface.xs0000644000175000017500000000047612146460465016653 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::StringInterface bool StringInterface::setParameter(name, value) String name String value String StringInterface::getParameter(name) String name void StringInterface::copyParametersTo(dest) StringInterface * dest static void StringInterface::cleanupDictionary() Ogre-0.60/xs/LogManager.xs0000644000175000017500000000031512146460465015570 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::LogManager static LogManager * LogManager::getSingletonPtr() ## XXX: as usual, this is not what the C++ API has void LogManager::logMessage(message) String message Ogre-0.60/xs/Camera.xs0000644000175000017500000001245112146460465014750 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Camera SceneManager * Camera::getSceneManager() String Camera::getName() void Camera::setPolygonMode(int sd) C_ARGS: (PolygonMode)sd int Camera::getPolygonMode() void Camera::setPosition(...) CODE: if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setPosition(*vec); } else if (items == 4) { THIS->setPosition((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::Camera::setPosition(THIS, vec) or (THIS, x , y, z)\n"); } Vector3 * Camera::getPosition() CODE: RETVAL = new Vector3; *RETVAL = THIS->getPosition(); OUTPUT: RETVAL void Camera::move(Vector3 *vec) C_ARGS: *vec void Camera::moveRelative(Vector3 *vec) C_ARGS: *vec void Camera::setDirection(...) CODE: if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->lookAt(*vec); } else if (items == 4) { THIS->lookAt((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::Camera::setDirection(THIS, vec) or (THIS, x , y, z)\n"); } # Vector3 getDirection() # Vector3 getUp() # Vector3 getRight() void Camera::lookAt(...) CODE: if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->lookAt(*vec); } else if (items == 4) { THIS->lookAt((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::Camera::lookAt(THIS, vec) or (THIS, x , y, z)\n"); } void Camera::roll(angle) DegRad * angle C_ARGS: *angle void Camera::yaw(angle) DegRad * angle C_ARGS: *angle void Camera::pitch(angle) DegRad * angle C_ARGS: *angle void Camera::rotate(...) CODE: if (items == 2 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Quaternion")) { Quaternion *q = (Quaternion *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->rotate(*q); } else if (items == 3 && sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3") && sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::DegRad")) { const Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN DegRad *angle; TMOGRE_DEGRAD_IN(ST(2), angle, Ogre::Camera, rotate); THIS->rotate(*vec, *angle); } else { croak("Usage: Ogre::Camera::rotate(THIS, quat) or (THIS, vec, degrad)\n"); } void Camera::setFixedYawAxis(bool useFixed, Vector3 *fixedAxis) C_ARGS: useFixed, *fixedAxis ## const Quaternion & Camera::getOrientation() void Camera::setOrientation(Quaternion *q) C_ARGS: *q Quaternion * Camera::getDerivedOrientation() CODE: RETVAL = new Quaternion; *RETVAL = THIS->getDerivedOrientation(); OUTPUT: RETVAL Vector3 * Camera::getDerivedPosition() CODE: RETVAL = new Vector3; *RETVAL = THIS->getDerivedPosition(); OUTPUT: RETVAL ## Vector3 getDerivedDirection () ## Vector3 getDerivedUp () ## Vector3 getDerivedRight () ## const Quaternion & getRealOrientation () ## const Vector3 & getRealPosition () ## Vector3 getRealDirection () ## Vector3 getRealUp () ## Vector3 getRealRight () String Camera::getMovableType() void Camera::setAutoTracking(bool enabled, SceneNode *target=0, const Vector3 *offset=&Vector3::ZERO) C_ARGS: enabled, target, *offset void Camera::setLodBias(Real factor=1.0) Real Camera::getLodBias() void Camera::setLodCamera(const Camera *lodCam) const Camera * Camera::getLodCamera() Ray * Camera::getCameraToViewportRay(Real screenx, Real screeny) CODE: RETVAL = new Ray; *RETVAL = THIS->getCameraToViewportRay(screenx, screeny); OUTPUT: RETVAL void Camera::setWindow(Real Left, Real Top, Real Right, Real Bottom) void Camera::resetWindow() bool Camera::isWindowSet() ## const std::vector< Plane > & Camera::getWindowPlanes() Real Camera::getBoundingRadius() SceneNode * Camera::getAutoTrackTarget() ## const Vector3 & Camera::getAutoTrackOffset() Viewport * Camera::getViewport() void Camera::setAutoAspectRatio(bool autoratio) bool Camera::getAutoAspectRatio() void Camera::setCullingFrustum(frustum) Frustum * frustum Frustum * Camera::getCullingFrustum() ## void Camera::forwardIntersect(const Plane &worldPlane, std::vector< Vector4 > *intersect3d) ## xxx ##bool ##Camera::isVisible(const AxisAlignedBox &bound, FrustumPlane *culledBy=0) ##bool ##Camera::isVisible(const Sphere &bound, FrustumPlane *culledBy=0) ##bool ##Camera::isVisible(const Vector3 &vert, FrustumPlane *culledBy=0) ## xxx: this is actually a pointer to a list of Vector3 ## const Vector3 * Camera::getWorldSpaceCorners() ## const Plane & Camera::getFrustumPlane(unsigned short plane) ## xxx ##bool ##Camera::projectSphere(const Sphere &sphere, Real *left, Real *top, Real *right, Real *bottom) Real Camera::getNearClipDistance() Real Camera::getFarClipDistance() ## const Matrix4 & Camera::getViewMatrix() ## const Matrix4 & Camera::getViewMatrix(bool ownFrustumOnly) void Camera::setUseRenderingDistance(bool use) bool Camera::getUseRenderingDistance() Ogre-0.60/xs/AnimationTrack.xs0000644000175000017500000000220212146460465016455 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::AnimationTrack unsigned short AnimationTrack::getHandle() unsigned short AnimationTrack::getNumKeyFrames() KeyFrame * AnimationTrack::getKeyFrame(unsigned short index) Real AnimationTrack::getKeyFramesAtTime(timeIndex, keyFrame1, keyFrame2, firstKeyIndex=0) const TimeIndex * timeIndex KeyFrame * keyFrame1 KeyFrame * keyFrame2 unsigned short firstKeyIndex C_ARGS: *timeIndex, &keyFrame1, &keyFrame2, &firstKeyIndex KeyFrame * AnimationTrack::createKeyFrame(Real timePos) void AnimationTrack::removeKeyFrame(unsigned short index) void AnimationTrack::removeAllKeyFrames() # note: C++ API passes in pointer with void return KeyFrame * AnimationTrack::getInterpolatedKeyFrame(timeIndex) const TimeIndex * timeIndex PREINIT: KeyFrame * kf; CODE: THIS->getInterpolatedKeyFrame(*timeIndex, kf); RETVAL = kf; OUTPUT: RETVAL void AnimationTrack::apply(timeIndex, weight=1.0, scale=1.0f) const TimeIndex * timeIndex Real weight Real scale C_ARGS: *timeIndex, weight, scale bool AnimationTrack::hasNonZeroKeyFrames() void AnimationTrack::optimise() Ogre-0.60/xs/HardwareVertexBuffer.xs0000644000175000017500000000007012146460465017637 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::HardwareVertexBuffer Ogre-0.60/xs/RenderTarget.xs0000644000175000017500000000766212146460465016156 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::RenderTarget ## Viewport * addViewport(Camera *cam, int ZOrder=0, Real left=0.0f, Real top=0.0f, Real width=1.0f, Real height=1.0f) Viewport * RenderTarget::addViewport(cam, ZOrder=0, left=0, top=0, width=1, height=1) Camera * cam int ZOrder Real left Real top Real width Real height ## C++ version uses output parameters (pointers), ## this Perl version will return a list instead: ## ($w, $h, $d) = $win->getMetrics(); ## (note: there is a different version in RenderWindow) void RenderTarget::getMetrics(OUTLIST unsigned int width, OUTLIST unsigned int height, OUTLIST unsigned int colourDepth) C_ARGS: width, height, colourDepth #void #RenderTarget::getStatistics(OUTLIST Real lastFPS, OUTLIST Real avgFPS, OUTLIST Real bestFPS, OUTLIST Real worstFPS) # C_ARGS: # lastFPS, avgFPS, bestFPS, worstFPS ## Note: there are methods for getting each attribute of FrameStats directly ## instead of getting a FrameStats object (as a working alternative to this...) ## XXX: I tried several ways, but I cant get fucking xsubpp to recognize ## FrameStats or RenderTarget::FrameStats as correct types #FrameStats * #RenderTarget::getStatistics() # CODE: # // xxx: I doubt this works... # FrameStats *stats; # *stats = THIS->getStatistics(); # RETVAL = stats; # OUTPUT: # RETVAL void RenderTarget::resetStatistics() Real RenderTarget::getLastFPS() Real RenderTarget::getAverageFPS() Real RenderTarget::getBestFPS() Real RenderTarget::getWorstFPS() Real RenderTarget::getBestFrameTime() Real RenderTarget::getWorstFrameTime() size_t RenderTarget::getTriangleCount() size_t RenderTarget::getBatchCount() void RenderTarget::update() bool RenderTarget::isPrimary() bool RenderTarget::isActive() void RenderTarget::setActive(state) bool state bool RenderTarget::isAutoUpdated() void RenderTarget::setAutoUpdated(autoupdate) bool autoupdate String RenderTarget::getName() unsigned int RenderTarget::getWidth() unsigned int RenderTarget::getHeight() unsigned int RenderTarget::getColourDepth() unsigned short RenderTarget::getNumViewports() Viewport * RenderTarget::getViewport(index) unsigned short index void RenderTarget::removeViewport(zOrder) int zOrder void RenderTarget::removeAllViewports() uchar RenderTarget::getPriority() void RenderTarget::setPriority(priority) uchar priority void RenderTarget::writeContentsToFile(filename) String filename String RenderTarget::writeContentsToTimestampedFile(filenamePrefix, filenameSuffix) String filenamePrefix String filenameSuffix bool RenderTarget::requiresTextureFlipping() ## XXX: not sure if this will work right in all cases, ## the C++ API returns a void* in the 2nd input parameter, ## while here we just return a string. I have no idea what ## all "custom attributes" there are, so I just implemented ## a few types to cover some of the bases (let me know if there ## are particular ones that are missing). ## void getCustomAttribute(const String &name, void *pData) size_t RenderTarget::getCustomAttributePtr(name) String name PREINIT: size_t pData; CODE: THIS->getCustomAttribute(name, &pData); RETVAL = pData; OUTPUT: RETVAL int RenderTarget::getCustomAttributeInt(name) String name PREINIT: int pData; CODE: THIS->getCustomAttribute(name, &pData); RETVAL = pData; OUTPUT: RETVAL Real RenderTarget::getCustomAttributeFloat(name) String name PREINIT: Real pData; CODE: THIS->getCustomAttribute(name, &pData); RETVAL = pData; OUTPUT: RETVAL String RenderTarget::getCustomAttributeStr(name) String name PREINIT: String pData; CODE: THIS->getCustomAttribute(name, &pData); RETVAL = pData; OUTPUT: RETVAL bool RenderTarget::getCustomAttributeBool(name) String name PREINIT: bool pData; CODE: THIS->getCustomAttribute(name, &pData); RETVAL = pData; OUTPUT: RETVAL Ogre-0.60/xs/ManualResourceLoader.xs0000644000175000017500000000006712146460465017634 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::ManualResourceLoader Ogre-0.60/xs/SkeletonInstance.xs0000644000175000017500000000006312146460465017025 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::SkeletonInstance Ogre-0.60/xs/AxisAlignedBox.xs0000644000175000017500000001467212146460465016430 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::AxisAlignedBox ## need to add tests ## xxx: need to add operator overloads, == != = ## xxx: this probably will end up not working right, ## in particular the destructor might destroy things ## when it should not (and cause segfaults) AxisAlignedBox * AxisAlignedBox::new(...) CODE: if (items == 1) { RETVAL = new AxisAlignedBox; } else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3") && sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Vector3")) { Vector3 *vecmin = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN Vector3 *vecmax = (Vector3 *) SvIV((SV *) SvRV(ST(2))); // TMOGRE_IN RETVAL = new AxisAlignedBox(*vecmin, *vecmax); } else if (items == 7) { RETVAL = new AxisAlignedBox((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4)), (Real)SvNV(ST(5)), (Real)SvNV(ST(6))); } else if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::AxisAlignedBox")) { AxisAlignedBox *box = (AxisAlignedBox *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = new AxisAlignedBox(*box); } else { croak("Usage: Ogre::AxisAlignedBox::new(...)\n"); } OUTPUT: RETVAL ## const Vector3 & AxisAlignedBox::getMinimum() ## Vector3 & AxisAlignedBox::getMinimum() ## const Vector3 & AxisAlignedBox::getMaximum() ## Vector3 & AxisAlignedBox::getMaximum() void AxisAlignedBox::setMinimum(...) CODE: if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setMinimum(*vec); } else if (items == 4) { THIS->setMinimum((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::AxisAlignedBox::setMinimum(THIS, vec) or (THIS, x, y, z)\n"); } void AxisAlignedBox::setMinimumX(Real x) void AxisAlignedBox::setMinimumY(Real y) void AxisAlignedBox::setMinimumZ(Real z) void AxisAlignedBox::setMaximum(...) CODE: if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *vec = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->setMaximum(*vec); } else if (items == 4) { THIS->setMaximum((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3))); } else { croak("Usage: Ogre::AxisAlignedBox::setMaximum(THIS, vec) or (THIS, x, y, z)\n"); } void AxisAlignedBox::setMaximumX(Real x) void AxisAlignedBox::setMaximumY(Real y) void AxisAlignedBox::setMaximumZ(Real z) void AxisAlignedBox::setExtents(...) CODE: if (sv_isobject(ST(1)) && sv_derived_from(ST(1), "Ogre::Vector3") && sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Vector3")) { Vector3 *vecmin = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN Vector3 *vecmax = (Vector3 *) SvIV((SV *) SvRV(ST(2))); // TMOGRE_IN THIS->setExtents(*vecmin, *vecmax); } else if (items == 7) { THIS->setExtents((Real)SvNV(ST(1)), (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4)), (Real)SvNV(ST(5)), (Real)SvNV(ST(6))); } else { croak("Usage: Ogre::AxisAlignedBox::setExtents(THIS, vec, Vec) or (THIS, x, y, z, X, Y, Z)\n"); } ## xxx: array of Vector3* ## const Vector3 * AxisAlignedBox::getAllCorners() ## Vector3 AxisAlignedBox::getCorner(CornerEnum cornerToGet) void AxisAlignedBox::merge(...) PREINIT: const char *usage = "Usage: Ogre::AxisAlignedBox::merge(THIS, {Vector3|AxisAlignedBox})\n"; CODE: if (sv_isobject(ST(1))) { if (sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *w = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->merge(*w); } else if (sv_derived_from(ST(1), "Ogre::AxisAlignedBox")) { AxisAlignedBox *w = (AxisAlignedBox *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN THIS->merge(*w); } else { croak("%s", usage); } } else { croak("%s", usage); } void AxisAlignedBox::transform(const Matrix4 *matrix) C_ARGS: *matrix void AxisAlignedBox::transformAffine(const Matrix4 *m) C_ARGS: *m void AxisAlignedBox::setNull() bool AxisAlignedBox::isNull() bool AxisAlignedBox::isFinite() void AxisAlignedBox::setInfinite() bool AxisAlignedBox::isInfinite() bool AxisAlignedBox::intersects(...) PREINIT: const char *usage = "Usage: Ogre::AxisAlignedBox::intersects(THIS, {Sphere|Vector3|Plane|AxisAlignedBox})\n"; CODE: if (sv_isobject(ST(1))) { if (sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *w = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = THIS->intersects(*w); } else if (sv_derived_from(ST(1), "Ogre::Sphere")) { Sphere *w = (Sphere *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = THIS->intersects(*w); } else if (sv_derived_from(ST(1), "Ogre::Plane")) { Plane *w = (Plane *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = THIS->intersects(*w); } else if (sv_derived_from(ST(1), "Ogre::AxisAlignedBox")) { AxisAlignedBox *w = (AxisAlignedBox *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = THIS->intersects(*w); } else { croak("%s", usage); } } else { croak("%s", usage); } OUTPUT: RETVAL ## AxisAlignedBox AxisAlignedBox::intersection(const AxisAlignedBox &b2) Real AxisAlignedBox::volume() void AxisAlignedBox::scale(const Vector3 *s) C_ARGS: *s ## Vector3 AxisAlignedBox::getCenter() ## Vector3 AxisAlignedBox::getSize() ## Vector3 AxisAlignedBox::getHalfSize() bool AxisAlignedBox::contains(...) PREINIT: const char *usage = "Usage: Ogre::AxisAlignedBox::contains(THIS, {Vector3|AxisAlignedBox})\n"; CODE: if (sv_isobject(ST(1))) { if (sv_derived_from(ST(1), "Ogre::Vector3")) { Vector3 *w = (Vector3 *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = THIS->intersects(*w); } else if (sv_derived_from(ST(1), "Ogre::AxisAlignedBox")) { AxisAlignedBox *w = (AxisAlignedBox *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = THIS->intersects(*w); } else { croak("%s", usage); } } else { croak("%s", usage); } OUTPUT: RETVAL Ogre-0.60/xs/MovablePlane.xs0000644000175000017500000000017112146460465016121 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::MovablePlane ## note: if constructor/destructor ever added, refer to BillboardSet.xs Ogre-0.60/xs/PlaneBoundedVolume.xs0000644000175000017500000000341612146460465017311 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::PlaneBoundedVolume ## need to add tests PlaneBoundedVolume * PlaneBoundedVolume::new(...) CODE: if (items == 1) { RETVAL = new PlaneBoundedVolume; } else if (looks_like_number(ST(1))) { RETVAL = new PlaneBoundedVolume((Plane::Side)SvIV(ST(1))); } OUTPUT: RETVAL void PlaneBoundedVolume::DESTROY() bool PlaneBoundedVolume::intersects(...) PREINIT: const char *usage = "Usage: Ogre::PlaneBoundedVolume::intersects(THIS, {Sphere|AxisAlignedBox})\n"; CODE: if (sv_isobject(ST(1))) { if (sv_derived_from(ST(1), "Ogre::Sphere")) { Sphere *w = (Sphere *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = THIS->intersects(*w); } else if (sv_derived_from(ST(1), "Ogre::AxisAlignedBox")) { AxisAlignedBox *w = (AxisAlignedBox *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN RETVAL = THIS->intersects(*w); } // xxx: returns a damn std::pair //else if (sv_derived_from(ST(1), "Ogre::Ray")) { // Ray *w = (Ray *) SvIV((SV *) SvRV(ST(1))); // TMOGRE_IN // RETVAL = THIS->intersects(*w); //} else { croak("%s", usage); } } else { croak("%s", usage); } OUTPUT: RETVAL ## Public Attributes ## XXX: hmmm, I need to do the other public attrs like this if possible int PlaneBoundedVolume::outside(...) CODE: if (items == 2 && looks_like_number(ST(1))) { THIS->outside = (Plane::Side)SvIV(ST(1)); } RETVAL = THIS->outside; OUTPUT: RETVAL ## xxx: this sucks - fix when typemap PlaneList (attribute 'planes') void PlaneBoundedVolume::push_back_plane(Plane *plane) CODE: THIS->planes.push_back(*plane); Ogre-0.60/xs/RibbonTrail.xs0000644000175000017500000000454012146460465015767 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::RibbonTrail void RibbonTrail::addNode(Node *n) void RibbonTrail::removeNode(Node *n) ## NodeIterator RibbonTrail::getNodeIterator() void RibbonTrail::setTrailLength(Real len) Real RibbonTrail::getTrailLength() void RibbonTrail::setMaxChainElements(size_t maxElements) void RibbonTrail::setNumberOfChains(size_t numChains) void RibbonTrail::clearChain(size_t chainIndex) void RibbonTrail::setInitialColour(size_t chainIndex, ...) CODE: if (items == 3 && sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Colour")) { const ColourValue *colour = (const ColourValue *) SvIV((SV *) SvRV(ST(2))); // TMOGRE_IN THIS->setInitialColour(chainIndex, *colour); } else if (items >= 5) { Real a = 1.0; if (items == 6) a = (Real)SvNV(ST(5)); THIS->setInitialColour(chainIndex, (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4))); } else { croak("Usage: Ogre::RibbonTrail::setInitialColour(THIS, chainIndex, col) or (THIS, chainIndex, r, g, b [, a])\n"); } ColourValue * RibbonTrail::getInitialColour(size_t chainIndex) CODE: RETVAL = new ColourValue; *RETVAL = THIS->getInitialColour(chainIndex); OUTPUT: RETVAL void RibbonTrail::setColourChange(size_t chainIndex, ...) CODE: if (items == 3 && sv_isobject(ST(2)) && sv_derived_from(ST(2), "Ogre::Colour")) { const ColourValue *colour = (const ColourValue *) SvIV((SV *) SvRV(ST(2))); // TMOGRE_IN THIS->setColourChange(chainIndex, *colour); } else if (items == 6) { THIS->setColourChange(chainIndex, (Real)SvNV(ST(2)), (Real)SvNV(ST(3)), (Real)SvNV(ST(4)), (Real)SvNV(ST(5))); } else { croak("Usage: Ogre::RibbonTrail::setColourChange(THIS, chainIndex, col) or (THIS, chainIndex, r, g, b , a)\n"); } void RibbonTrail::setInitialWidth(size_t chainIndex, Real width) Real RibbonTrail::getInitialWidth(size_t chainIndex) void RibbonTrail::setWidthChange(size_t chainIndex, Real widthDeltaPerSecond) Real RibbonTrail::getWidthChange(size_t chainIndex) ColourValue * RibbonTrail::getColourChange(size_t chainIndex) CODE: RETVAL = new ColourValue; *RETVAL = THIS->getColourChange(chainIndex); OUTPUT: RETVAL void RibbonTrail::nodeUpdated(const Node *node) void RibbonTrail::nodeDestroyed(const Node *node) String RibbonTrail::getMovableType() Ogre-0.60/xs/Root.xs0000644000175000017500000002405112146460465014502 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Root ## static Root & getSingleton (void) static Root * Root::getSingletonPtr() Root * Root::new(...) CODE: if (items == 1) { RETVAL = new Root(); } else if (items == 2) { String pluginFileName((char *) SvPV_nolen(ST(1))); RETVAL = new Root(pluginFileName); } else if (items == 3) { String pluginFileName((char *) SvPV_nolen(ST(1))); String configFileName((char *) SvPV_nolen(ST(2))); RETVAL = new Root(pluginFileName, configFileName); } else if (items == 4) { String pluginFileName((char *) SvPV_nolen(ST(1))); String configFileName((char *) SvPV_nolen(ST(2))); String logFileName((char *) SvPV_nolen(ST(3))); RETVAL = new Root(pluginFileName, configFileName, logFileName); } else { croak("Usage: Ogre::Root::new(CLASS [, pluginFileName [, configFileName [, logFileName]]])\n"); } OUTPUT: RETVAL void Root::DESTROY() void Root::saveConfig() bool Root::restoreConfig() bool Root::showConfigDialog() void Root::addRenderSystem(RenderSystem *newRend) # RenderSystemList & # Root::getAvailableRenderers() RenderSystem * Root::getRenderSystemByName(String name) void Root::setRenderSystem(RenderSystem *system) RenderSystem * Root::getRenderSystem() RenderWindow * Root::initialise(autoCreateWindow, ...) bool autoCreateWindow CODE: String windowTitle; String customCapabilitiesConfig; if (items >= 3) { char * xstmpchr = (char *) SvPV_nolen(ST(2)); windowTitle = xstmpchr; } else { windowTitle = "OGRE Render Window"; } if (items == 4) { char * xstmpchr = (char *) SvPV_nolen(ST(2)); customCapabilitiesConfig = xstmpchr; RETVAL = THIS->initialise(autoCreateWindow, windowTitle, customCapabilitiesConfig); } else { RETVAL = THIS->initialise(autoCreateWindow, windowTitle); } OUTPUT: RETVAL bool Root::isInitialised() ## void useCustomRenderSystemCapabilities (RenderSystemCapabilities *capabilities) ## void addSceneManagerFactory (SceneManagerFactory *fact) ## void removeSceneManagerFactory (SceneManagerFactory *fact) ## SceneManagerMetaData * getSceneManagerMetaData (const String &typeName) const ## SceneManagerEnumerator::MetaDataIterator getSceneManagerMetaDataIterator (void) const ## 2 C++ versions SceneManager * Root::createSceneManager(...) CODE: String instanceName = StringUtil::BLANK; if (items == 3) { char * xstmpchr_iname = (char *) SvPV_nolen(ST(2)); instanceName = xstmpchr_iname; } // SceneManager * createSceneManager (SceneTypeMask typeMask, const String &instanceName=StringUtil::BLANK) if (looks_like_number(ST(1))) { SceneTypeMask typeMask = (SceneTypeMask)SvUV(ST(1)); RETVAL = THIS->createSceneManager(typeMask, instanceName); } // SceneManager * createSceneManager (const String &typeName, const String &instanceName=StringUtil::BLANK) else { char * xstmpchr_tname = (char *) SvPV_nolen(ST(1)); String typeName = xstmpchr_tname; RETVAL = THIS->createSceneManager(typeName, instanceName); } OUTPUT: RETVAL void Root::destroySceneManager(sm) SceneManager * sm SceneManager * Root::getSceneManager(instanceName) String instanceName ## xxx: need a perlish version, like ConfigFile::getSections ## SceneManagerEnumerator::SceneManagerIterator getSceneManagerIterator (void) TextureManager * Root::getTextureManager() MeshManager * Root::getMeshManager() String Root::getErrorDescription(errorNumber) long errorNumber ## pass in Perl object of class implementing Ogre::FrameListener void Root::addFrameListener(perlListener) SV * perlListener CODE: pogreCallbackManager.addFrameListener(perlListener, THIS); void Root::removeFrameListener(perlListener) SV * perlListener CODE: pogreCallbackManager.removeFrameListener(perlListener, THIS); void Root::queueEndRendering() void Root::startRendering() bool Root::renderOneFrame() void Root::shutdown() void Root::addResourceLocation(String name, String locType, String groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, bool recursive=false) void Root::removeResourceLocation(String name, String groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) ## void convertColourValue (const ColourValue &colour, uint32 *pDest) RenderWindow * Root::getAutoCreatedWindow() ## RenderWindow * createRenderWindow(const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams=0) RenderWindow * Root::createRenderWindow(name, width, height, fullScreen, ...) String name unsigned int width unsigned int height bool fullScreen CODE: // no hash passed if (items == 5) { RETVAL = THIS->createRenderWindow(name, width, height, fullScreen); } else if (items == 6) { // wasn't a hash, skip it // xxx: I can't get the hashref test working.... // if ((!SvROK(ST(5))) || (SvTYPE(SvRV(ST(5)) != SVt_PVHV))) { if (! SvROK(ST(5))) { RETVAL = THIS->createRenderWindow(name, width, height, fullScreen); warn("Ogre::Root::createRenderWindow() skipped non-hash 5th parameter\n"); } // hash passed else { NameValuePairList params; HV *paramsHash = (HV *)SvRV(ST(5)); STRLEN l; // wheeee.... if (hv_exists(paramsHash, "title", 5)) params["title"] = String((char *) SvPV(* hv_fetch(paramsHash, "title", 5, 0), l)); if (hv_exists(paramsHash, "colourDepth", 11)) params["colourDepth"] = String((char *) SvPV(* hv_fetch(paramsHash, "colourDepth", 11, 0), l)); if (hv_exists(paramsHash, "left", 4)) params["left"] = String((char *) SvPV(* hv_fetch(paramsHash, "left", 4, 0), l)); if (hv_exists(paramsHash, "top", 3)) params["top"] = String((char *) SvPV(* hv_fetch(paramsHash, "top", 3, 0), l)); if (hv_exists(paramsHash, "depthBuffer", 11)) params["depthBuffer"] = String((char *) SvPV(* hv_fetch(paramsHash, "depthBuffer", 11, 0), l)); if (hv_exists(paramsHash, "externalWindowHandle", 20)) params["externalWindowHandle"] = String((char *) SvPV(* hv_fetch(paramsHash, "externalWindowHandle", 20, 0), l)); if (hv_exists(paramsHash, "externalGLControl", 17)) params["externalGLControl"] = String((char *) SvPV(* hv_fetch(paramsHash, "externalGLControl", 17, 0), l)); // externalGLContext is deprecated if (hv_exists(paramsHash, "externalGLContext", 17)) params["externalGLContext"] = String((char *) SvPV(* hv_fetch(paramsHash, "externalGLContext", 17, 0), l)); if (hv_exists(paramsHash, "currentGLContext", 16)) params["currentGLContext"] = String((char *) SvPV(* hv_fetch(paramsHash, "currentGLContext", 16, 0), l)); if (hv_exists(paramsHash, "parentWindowHandle", 18)) params["parentWindowHandle"] = String((char *) SvPV(* hv_fetch(paramsHash, "parentWindowHandle", 18, 0), l)); if (hv_exists(paramsHash, "FSAA", 4)) params["FSAA"] = String((char *) SvPV(* hv_fetch(paramsHash, "FSAA", 4, 0), l)); if (hv_exists(paramsHash, "displayFrequency", 16)) params["displayFrequency"] = String((char *) SvPV(* hv_fetch(paramsHash, "displayFrequency", 16, 0), l)); if (hv_exists(paramsHash, "vsync", 5)) params["vsync"] = String((char *) SvPV(* hv_fetch(paramsHash, "vsync", 5, 0), l)); if (hv_exists(paramsHash, "border", 6)) params["border"] = String((char *) SvPV(* hv_fetch(paramsHash, "border", 6, 0), l)); if (hv_exists(paramsHash, "outerDimensions", 15)) params["outerDimensions"] = String((char *) SvPV(* hv_fetch(paramsHash, "outerDimensions", 15, 0), l)); if (hv_exists(paramsHash, "useNVPerfHUD", 12)) params["useNVPerfHUD"] = String((char *) SvPV(* hv_fetch(paramsHash, "useNVPerfHUD", 12, 0), l)); if (hv_exists(paramsHash, "gamma", 5)) params["gamma"] = String((char *) SvPV(* hv_fetch(paramsHash, "gamma", 5, 0), l)); RETVAL = THIS->createRenderWindow(name, width, height, fullScreen, ¶ms); } } OUTPUT: RETVAL ## xxx: 2 C++ versions, RenderTarget * version missing ## but you can get the name from the RenderTarget object void Root::detachRenderTarget(name) String name RenderTarget * Root::getRenderTarget(name) String name void Root::loadPlugin(pluginName) String pluginName void Root::unloadPlugin(pluginName) String pluginName ## void installPlugin (Plugin *plugin) ## void uninstallPlugin (Plugin *plugin) ## const PluginInstanceList & getInstalledPlugins () const Timer * Root::getTimer() ## bool _fireFrameStarted (FrameEvent &evt) ## bool _fireFrameRenderingQueued (FrameEvent &evt) ## bool _fireFrameEnded (FrameEvent &evt) ## bool _fireFrameStarted () ## bool _fireFrameRenderingQueued () ## bool _fireFrameEnded () unsigned long Root::getNextFrameNumber() ## internal ##SceneManager * ##Root::_getCurrentSceneManager() ## RenderQueueInvocationSequence * createRenderQueueInvocationSequence (const String &name) ## RenderQueueInvocationSequence * getRenderQueueInvocationSequence (const String &name) void Root::destroyRenderQueueInvocationSequence(name) String name void Root::destroyAllRenderQueueInvocationSequences() void Root::clearEventTimes() void Root::setFrameSmoothingPeriod(period) Real period Real Root::getFrameSmoothingPeriod() ## void addMovableObjectFactory (MovableObjectFactory *fact, bool overrideExisting=false) ## void removeMovableObjectFactory (MovableObjectFactory *fact) bool Root::hasMovableObjectFactory(typeName) String typeName ## MovableObjectFactory * getMovableObjectFactory (const String &typeName) ## MovableObjectFactoryIterator getMovableObjectFactoryIterator (void) const ## xxx: possible/useful to bind these? ### protected types ### protected member functions Ogre-0.60/xs/TransformKeyFrame.xs0000644000175000017500000000132412146460465017154 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::TransformKeyFrame void TransformKeyFrame::setTranslate(trans) const Vector3 * trans C_ARGS: *trans Vector3 * TransformKeyFrame::getTranslate() CODE: RETVAL = new Vector3; *RETVAL = THIS->getTranslate(); OUTPUT: RETVAL void TransformKeyFrame::setScale(scale) const Vector3 * scale C_ARGS: *scale Vector3 * TransformKeyFrame::getScale() CODE: RETVAL = new Vector3; *RETVAL = THIS->getScale(); OUTPUT: RETVAL void TransformKeyFrame::setRotation(rot) const Quaternion * rot C_ARGS: *rot Quaternion * TransformKeyFrame::getRotation() CODE: RETVAL = new Quaternion; *RETVAL = THIS->getRotation(); OUTPUT: RETVAL Ogre-0.60/xs/Skeleton.xs0000644000175000017500000000521112146460465015340 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Skeleton Bone * Skeleton::createBone(...) CODE: // createBone() if (items == 1) { RETVAL = THIS->createBone(); } // createBone(String name, unsigned short handle) else if (items == 3) { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String name = xstmpchr; unsigned short handle = (unsigned short)SvUV(ST(2)); RETVAL = THIS->createBone(name, handle); } else if (items == 2) { if (looks_like_number(ST(1))) { unsigned short handle = (unsigned short)SvUV(ST(1)); RETVAL = THIS->createBone(handle); } else { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String name = xstmpchr; RETVAL = THIS->createBone(name); } } OUTPUT: RETVAL unsigned short Skeleton::getNumBones() Bone * Skeleton::getRootBone() ## BoneIterator Skeleton::getRootBoneIterator() ## BoneIterator Skeleton::getBoneIterator() Bone * Skeleton::getBone(...) CODE: if (looks_like_number(ST(1))) { unsigned short handle = (unsigned short)SvUV(ST(1)); RETVAL = THIS->getBone(handle); } else { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String name = xstmpchr; RETVAL = THIS->getBone(name); } OUTPUT: RETVAL void Skeleton::setBindingPose() void Skeleton::reset(bool resetManualBones=false) Animation * Skeleton::createAnimation(String name, Real length) ## xxx: left off last arg ## getAnimation(String name, const LinkedSkeletonAnimationSource **linker=0) Animation * Skeleton::getAnimation(...) CODE: if (looks_like_number(ST(1))) { unsigned short handle = (unsigned short)SvUV(ST(1)); RETVAL = THIS->getAnimation(handle); } else { char * xstmpchr = (char *) SvPV_nolen(ST(1)); String name = xstmpchr; RETVAL = THIS->getAnimation(name); } OUTPUT: RETVAL bool Skeleton::hasAnimation(String name) void Skeleton::removeAnimation(String name) void Skeleton::setAnimationState(animSet) const AnimationStateSet * animSet C_ARGS: *animSet unsigned short Skeleton::getNumAnimations() int Skeleton::getBlendMode() void Skeleton::setBlendMode(int state) C_ARGS: (SkeletonAnimationBlendMode)state void Skeleton::optimiseAllAnimations(bool preservingIdentityNodeTracks=false) void Skeleton::addLinkedSkeletonAnimationSource(String skelName, Real scale=1.0f) void Skeleton::removeAllLinkedSkeletonAnimationSources() ## LinkedSkeletonAnimSourceIterator Skeleton::getLinkedSkeletonAnimationSourceIterator() bool Skeleton::getManualBonesDirty() bool Skeleton::hasManualBones() Ogre-0.60/xs/VertexAnimationTrack.xs0000644000175000017500000000007012146460465017654 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::VertexAnimationTrack Ogre-0.60/xs/RenderTexture.xs0000644000175000017500000000006012146460465016351 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::RenderTexture Ogre-0.60/xs/HardwareBufferManager.xs0000644000175000017500000000430612146460465017742 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::HardwareBufferManager static HardwareBufferManager * HardwareBufferManager::getSingletonPtr() HardwareVertexBuffer * HardwareBufferManager::createVertexBuffer(size_t vertexSize, size_t numVerts, int usage, bool useShadowBuffer=false) CODE: RETVAL = THIS->createVertexBuffer(vertexSize, numVerts, (Ogre::HardwareBuffer::Usage)usage, useShadowBuffer).getPointer(); OUTPUT: RETVAL HardwareIndexBuffer * HardwareBufferManager::createIndexBuffer(int itype, size_t numIndexes, int usage, bool useShadowBuffer=false) CODE: RETVAL = THIS->createIndexBuffer((HardwareIndexBuffer::IndexType)itype, numIndexes, (HardwareBuffer::Usage)usage, useShadowBuffer).getPointer(); OUTPUT: RETVAL VertexDeclaration * HardwareBufferManager::createVertexDeclaration() void HardwareBufferManager::destroyVertexDeclaration(VertexDeclaration *decl) VertexBufferBinding * HardwareBufferManager::createVertexBufferBinding() void HardwareBufferManager::destroyVertexBufferBinding(VertexBufferBinding *binding) void HardwareBufferManager::registerVertexBufferSourceAndCopy(sourceBuffer, copy) HardwareVertexBuffer * sourceBuffer HardwareVertexBuffer * copy CODE: const HardwareVertexBufferSharedPtr sourceBufferPtr = HardwareVertexBufferSharedPtr(sourceBuffer); const HardwareVertexBufferSharedPtr copyPtr = HardwareVertexBufferSharedPtr(copy); THIS->registerVertexBufferSourceAndCopy(sourceBufferPtr, copyPtr); ## xxx: too lazy to wrap this right now ## HardwareVertexBufferSharedPtr HardwareBufferManager::allocateVertexBufferCopy(const HardwareVertexBufferSharedPtr &sourceBuffer, BufferLicenseType licenseType, HardwareBufferLicensee *licensee, bool copyData=false) void HardwareBufferManager::releaseVertexBufferCopy(bufferCopy) HardwareVertexBuffer * bufferCopy CODE: const HardwareVertexBufferSharedPtr bufferCopyPtr = HardwareVertexBufferSharedPtr(bufferCopy); THIS->releaseVertexBufferCopy(bufferCopyPtr); void HardwareBufferManager::touchVertexBufferCopy(bufferCopy) HardwareVertexBuffer * bufferCopy CODE: const HardwareVertexBufferSharedPtr bufferCopyPtr = HardwareVertexBufferSharedPtr(bufferCopy); THIS->touchVertexBufferCopy(bufferCopyPtr); Ogre-0.60/xs/SphereSceneQuery.xs0000644000175000017500000000026212146460465017007 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::SphereSceneQuery void SphereSceneQuery::setSphere(const Sphere *sphere) C_ARGS: *sphere ## const Sphere & SphereSceneQuery::getSphere() Ogre-0.60/xs/Matrix4.xs0000644000175000017500000000221212146460465015102 0ustar slanningslanningMODULE = Ogre PACKAGE = Ogre::Matrix4 ## xxx: constructors, destructor, operators ## Matrix4 transpose (void) const void Matrix4::setTrans(v) Vector3 * v C_ARGS: *v ## Vector3 getTrans () const ## xxx: void makeTrans (Real tx, Real ty, Real tz) void Matrix4::makeTrans(v) Vector3 * v C_ARGS: *v void Matrix4::setScale(v) Vector3 * v C_ARGS: *v ## void extract3x3Matrix (Matrix3 &m3x3) const ## Quaternion extractQuaternion () const ## Matrix4 adjoint () const Real Matrix4::determinant() ## Matrix4 inverse () const void Matrix4::makeTransform(position, scale, orientation) Vector3 * position Vector3 * scale Quaternion * orientation C_ARGS: *position, *scale, *orientation void Matrix4::makeInverseTransform(position, scale, orientation) Vector3 * position Vector3 * scale Quaternion * orientation C_ARGS: *position, *scale, *orientation bool Matrix4::isAffine() ## Matrix4 inverseAffine (void) const ## Matrix4 concatenateAffine (const Matrix4 &m2) const ## Vector3 transformAffine (const Vector3 &v) const ## Vector4 transformAffine (const Vector4 &v) const Ogre-0.60/Ogre.xs0000644000175000017500000021045112150502745014013 0ustar slanningslanning#include #include #include #include #include "perlOGRE.h" #include "PerlOGRECallbackManager.h" #include "PerlOGREFrameListener.h" #include "PerlOGREWindowEventListener.h" #include "PerlOGREControllerFunction.h" #include "PerlOGREControllerValue.h" // This object manages FrameListeners, WindowEventListeners... PerlOGRECallbackManager pogreCallbackManager; // This allows using a wxPerl or Gtk2 window // as a render window, rather than relying on Ogre // to create a default render window. #include "perlOGREGUI.h" // note: I think these have to come after the includes, // esp. the gtk+ ones, because otherwise a conflict // appears in X11/Xlib.h which refers to Font, // and this is confused with Ogre::Font) using namespace std; using namespace Ogre; // helper functions - should move these to another file // this is used twice in RaySceneQuery.xs // Note: see ConfigFile::getSections for a similar example. // The results here are returned in an aref, each of whose // items is a hashref whose keys are: distance, movable, // and worldFragment. SV * perlOGRE_RaySQ2aref(RaySceneQueryResult& qres) { AV *res_av = (AV *) sv_2mortal((SV *) newAV()); RaySceneQueryResult::const_iterator it; RaySceneQueryResult::const_iterator itEnd = qres.end(); for (it = qres.begin(); it != itEnd; ++it) { // go from C++ to Perl SV* // note: for some reason, these SV* shouldn't be mortalized SV *distance_sv = newSV(0), *movable_sv = newSV(0), *worldFragment_sv = newSV(0); sv_setnv(distance_sv, (Real) (it->distance)); if (it->movable) { MovableObject *mop = it->movable; TMOGRE_OUT(movable_sv, mop, MovableObject); } else { movable_sv = &PL_sv_undef; } if (it->worldFragment) { WorldFragment *wfp = it->worldFragment; TMOGRE_OUT(worldFragment_sv, wfp, SceneQuery::WorldFragment); } else { worldFragment_sv = &PL_sv_undef; } // put the SV* into a hash HV *entry_hv = (HV *) sv_2mortal((SV *) newHV()); hv_store(entry_hv, "distance", 8, distance_sv, 0); hv_store(entry_hv, "movable", 7, movable_sv, 0); hv_store(entry_hv, "worldFragment", 13, worldFragment_sv, 0); // push the hash onto the array av_push(res_av, newRV((SV *) entry_hv)); } // return the array ref return newRV((SV *)res_av); } // this is used in RegionSceneQuery // A bit different than above. The results here are returned in a hashref // whose keys are: movables and worldFragments. Those are array refs: // movables = MovableObject*, worldFragments = SceneQuery::WorldFragment* SV * perlOGRE_SQ2href(SceneQueryResult& qres) { // the hashref to return HV *res_hv = (HV *) sv_2mortal((SV *) newHV()); // the movables aref SceneQueryResultMovableList::iterator m_itr; AV *movables_av = (AV *) sv_2mortal((SV *) newAV()); for (m_itr = qres.movables.begin(); m_itr != qres.movables.end(); m_itr++) { SV *mov_sv = newSV(0); TMOGRE_OUT(mov_sv, *m_itr, MovableObject); av_push(movables_av, mov_sv); } hv_store(res_hv, "movables", 8, (SV *) newRV((SV *) movables_av), 0); // the worldFragments aref SceneQueryResultWorldFragmentList::iterator wf_itr; AV *worldFragments_av = (AV *) sv_2mortal((SV *) newAV()); for (wf_itr = qres.worldFragments.begin(); wf_itr != qres.worldFragments.end(); wf_itr++) { SV *wf_sv = newSV(0); TMOGRE_OUT(wf_sv, *wf_itr, SceneQuery::WorldFragment); av_push(worldFragments_av, wf_sv); } hv_store(res_hv, "worldFragments", 14, (SV *) newRV((SV *) worldFragments_av), 0); // return the hash ref return newRV((SV *)res_hv); } // note: caller must delete the pointer PlaneBoundedVolumeList * perlOGRE_aref2PBVL(SV *volumes_sv, const char *caller) { if ((!SvROK(volumes_sv)) || (SvTYPE(SvRV(volumes_sv)) != SVt_PVAV)) { croak(caller, ": volumes arg must be an array ref\n"); } // turn aref into PlaneBoundedVolumeList PlaneBoundedVolumeList *volumes = new PlaneBoundedVolumeList; I32 numvolumes = av_len((AV *) SvRV(volumes_sv)); for (int n = 0; n <= numvolumes; n++) { SV *pbv_sv = *av_fetch((AV *)SvRV(volumes_sv), n, 0); if (sv_isobject(pbv_sv) && sv_derived_from(pbv_sv, "Ogre::PlaneBoundedVolume")) { PlaneBoundedVolume *vol = (PlaneBoundedVolume *) SvIV((SV *) SvRV(pbv_sv)); volumes->push_back(*vol); } else { croak("Usage: ", caller, ": array ref must contain only Ogre::PlaneBoundedVolume objects\n"); } } return volumes; } MODULE = Ogre PACKAGE = Ogre PROTOTYPES: ENABLE #ifdef PERLOGRE_HAS_GTK2 static String Ogre::getWindowHandleString(w) SV * w PREINIT: GtkWidget *widget; CODE: // for gtk2-perl, object that isa Gtk2::Widget if (sv_isobject(ST(1))) { TMOGRE_GTKWIDGET_IN(ST(1), widget, Ogre, getWindowHandleString); } // for wxPerl, (IV) result of GetHandle() on (isa) Wx::Window object else if (SvIOK(ST(1))) { widget = INT2PTR(GtkWidget *, SvIV(ST(1))); // T_PTR } else { croak("Usage: Ogre::getWindowHandleString(CLASS, Gtk2::Widget) or (CLASS, integer)\n"); } RETVAL = getWindowHandleString(widget); OUTPUT: RETVAL #endif /* PERLOGRE_HAS_GTK2 */ INCLUDE: perl -e "print qq{INCLUDE: \$_\$/} for " | BOOT: { // xxx: Ogre.pm does `require Exporter`, so I don't here, // though it's necessary to be loaded before any constants are // used; so if the modules are split out and loaded separately, // need to keep that in mind // this is output by genconsts.pl ////////// GENERATED CONSTANTS BEGIN HV *stash_Ogre = gv_stashpv("Ogre", TRUE); // enum: ParameterType newCONSTSUB(stash_Ogre, "PT_BOOL", newSViv(Ogre::PT_BOOL)); newCONSTSUB(stash_Ogre, "PT_REAL", newSViv(Ogre::PT_REAL)); newCONSTSUB(stash_Ogre, "PT_INT", newSViv(Ogre::PT_INT)); newCONSTSUB(stash_Ogre, "PT_UNSIGNED_INT", newSViv(Ogre::PT_UNSIGNED_INT)); newCONSTSUB(stash_Ogre, "PT_SHORT", newSViv(Ogre::PT_SHORT)); newCONSTSUB(stash_Ogre, "PT_UNSIGNED_SHORT", newSViv(Ogre::PT_UNSIGNED_SHORT)); newCONSTSUB(stash_Ogre, "PT_LONG", newSViv(Ogre::PT_LONG)); newCONSTSUB(stash_Ogre, "PT_UNSIGNED_LONG", newSViv(Ogre::PT_UNSIGNED_LONG)); newCONSTSUB(stash_Ogre, "PT_STRING", newSViv(Ogre::PT_STRING)); newCONSTSUB(stash_Ogre, "PT_VECTOR3", newSViv(Ogre::PT_VECTOR3)); newCONSTSUB(stash_Ogre, "PT_MATRIX3", newSViv(Ogre::PT_MATRIX3)); newCONSTSUB(stash_Ogre, "PT_MATRIX4", newSViv(Ogre::PT_MATRIX4)); newCONSTSUB(stash_Ogre, "PT_QUATERNION", newSViv(Ogre::PT_QUATERNION)); newCONSTSUB(stash_Ogre, "PT_COLOURVALUE", newSViv(Ogre::PT_COLOURVALUE)); // enum: ShadeOptions newCONSTSUB(stash_Ogre, "SO_FLAT", newSViv(Ogre::SO_FLAT)); newCONSTSUB(stash_Ogre, "SO_GOURAUD", newSViv(Ogre::SO_GOURAUD)); newCONSTSUB(stash_Ogre, "SO_PHONG", newSViv(Ogre::SO_PHONG)); // enum: FilterType newCONSTSUB(stash_Ogre, "FT_MIN", newSViv(Ogre::FT_MIN)); newCONSTSUB(stash_Ogre, "FT_MAG", newSViv(Ogre::FT_MAG)); newCONSTSUB(stash_Ogre, "FT_MIP", newSViv(Ogre::FT_MIP)); // enum: ProjectionType newCONSTSUB(stash_Ogre, "PT_ORTHOGRAPHIC", newSViv(Ogre::PT_ORTHOGRAPHIC)); newCONSTSUB(stash_Ogre, "PT_PERSPECTIVE", newSViv(Ogre::PT_PERSPECTIVE)); // enum: PixelFormat newCONSTSUB(stash_Ogre, "PF_UNKNOWN", newSViv(Ogre::PF_UNKNOWN)); newCONSTSUB(stash_Ogre, "PF_L8", newSViv(Ogre::PF_L8)); newCONSTSUB(stash_Ogre, "PF_BYTE_L", newSViv(Ogre::PF_BYTE_L)); newCONSTSUB(stash_Ogre, "PF_L16", newSViv(Ogre::PF_L16)); newCONSTSUB(stash_Ogre, "PF_SHORT_L", newSViv(Ogre::PF_SHORT_L)); newCONSTSUB(stash_Ogre, "PF_A8", newSViv(Ogre::PF_A8)); newCONSTSUB(stash_Ogre, "PF_BYTE_A", newSViv(Ogre::PF_BYTE_A)); newCONSTSUB(stash_Ogre, "PF_A4L4", newSViv(Ogre::PF_A4L4)); newCONSTSUB(stash_Ogre, "PF_BYTE_LA", newSViv(Ogre::PF_BYTE_LA)); newCONSTSUB(stash_Ogre, "PF_R5G6B5", newSViv(Ogre::PF_R5G6B5)); newCONSTSUB(stash_Ogre, "PF_B5G6R5", newSViv(Ogre::PF_B5G6R5)); newCONSTSUB(stash_Ogre, "PF_R3G3B2", newSViv(Ogre::PF_R3G3B2)); newCONSTSUB(stash_Ogre, "PF_A4R4G4B4", newSViv(Ogre::PF_A4R4G4B4)); newCONSTSUB(stash_Ogre, "PF_A1R5G5B5", newSViv(Ogre::PF_A1R5G5B5)); newCONSTSUB(stash_Ogre, "PF_R8G8B8", newSViv(Ogre::PF_R8G8B8)); newCONSTSUB(stash_Ogre, "PF_B8G8R8", newSViv(Ogre::PF_B8G8R8)); newCONSTSUB(stash_Ogre, "PF_A8R8G8B8", newSViv(Ogre::PF_A8R8G8B8)); newCONSTSUB(stash_Ogre, "PF_A8B8G8R8", newSViv(Ogre::PF_A8B8G8R8)); newCONSTSUB(stash_Ogre, "PF_B8G8R8A8", newSViv(Ogre::PF_B8G8R8A8)); newCONSTSUB(stash_Ogre, "PF_R8G8B8A8", newSViv(Ogre::PF_R8G8B8A8)); newCONSTSUB(stash_Ogre, "PF_X8R8G8B8", newSViv(Ogre::PF_X8R8G8B8)); newCONSTSUB(stash_Ogre, "PF_X8B8G8R8", newSViv(Ogre::PF_X8B8G8R8)); newCONSTSUB(stash_Ogre, "PF_BYTE_RGB", newSViv(Ogre::PF_BYTE_RGB)); newCONSTSUB(stash_Ogre, "PF_BYTE_BGR", newSViv(Ogre::PF_BYTE_BGR)); newCONSTSUB(stash_Ogre, "PF_BYTE_BGRA", newSViv(Ogre::PF_BYTE_BGRA)); newCONSTSUB(stash_Ogre, "PF_BYTE_RGBA", newSViv(Ogre::PF_BYTE_RGBA)); newCONSTSUB(stash_Ogre, "PF_A2R10G10B10", newSViv(Ogre::PF_A2R10G10B10)); newCONSTSUB(stash_Ogre, "PF_A2B10G10R10", newSViv(Ogre::PF_A2B10G10R10)); newCONSTSUB(stash_Ogre, "PF_DXT1", newSViv(Ogre::PF_DXT1)); newCONSTSUB(stash_Ogre, "PF_DXT2", newSViv(Ogre::PF_DXT2)); newCONSTSUB(stash_Ogre, "PF_DXT3", newSViv(Ogre::PF_DXT3)); newCONSTSUB(stash_Ogre, "PF_DXT4", newSViv(Ogre::PF_DXT4)); newCONSTSUB(stash_Ogre, "PF_DXT5", newSViv(Ogre::PF_DXT5)); newCONSTSUB(stash_Ogre, "PF_FLOAT16_R", newSViv(Ogre::PF_FLOAT16_R)); newCONSTSUB(stash_Ogre, "PF_FLOAT16_RGB", newSViv(Ogre::PF_FLOAT16_RGB)); newCONSTSUB(stash_Ogre, "PF_FLOAT16_RGBA", newSViv(Ogre::PF_FLOAT16_RGBA)); newCONSTSUB(stash_Ogre, "PF_FLOAT32_R", newSViv(Ogre::PF_FLOAT32_R)); newCONSTSUB(stash_Ogre, "PF_FLOAT32_RGB", newSViv(Ogre::PF_FLOAT32_RGB)); newCONSTSUB(stash_Ogre, "PF_FLOAT32_RGBA", newSViv(Ogre::PF_FLOAT32_RGBA)); newCONSTSUB(stash_Ogre, "PF_FLOAT16_GR", newSViv(Ogre::PF_FLOAT16_GR)); newCONSTSUB(stash_Ogre, "PF_FLOAT32_GR", newSViv(Ogre::PF_FLOAT32_GR)); newCONSTSUB(stash_Ogre, "PF_DEPTH", newSViv(Ogre::PF_DEPTH)); newCONSTSUB(stash_Ogre, "PF_SHORT_RGBA", newSViv(Ogre::PF_SHORT_RGBA)); newCONSTSUB(stash_Ogre, "PF_SHORT_GR", newSViv(Ogre::PF_SHORT_GR)); newCONSTSUB(stash_Ogre, "PF_SHORT_RGB", newSViv(Ogre::PF_SHORT_RGB)); newCONSTSUB(stash_Ogre, "PF_COUNT", newSViv(Ogre::PF_COUNT)); // enum: LayerBlendOperation newCONSTSUB(stash_Ogre, "LBO_REPLACE", newSViv(Ogre::LBO_REPLACE)); newCONSTSUB(stash_Ogre, "LBO_ADD", newSViv(Ogre::LBO_ADD)); newCONSTSUB(stash_Ogre, "LBO_MODULATE", newSViv(Ogre::LBO_MODULATE)); newCONSTSUB(stash_Ogre, "LBO_ALPHA_BLEND", newSViv(Ogre::LBO_ALPHA_BLEND)); // enum: SceneBlendFactor newCONSTSUB(stash_Ogre, "SBF_ONE", newSViv(Ogre::SBF_ONE)); newCONSTSUB(stash_Ogre, "SBF_ZERO", newSViv(Ogre::SBF_ZERO)); newCONSTSUB(stash_Ogre, "SBF_DEST_COLOUR", newSViv(Ogre::SBF_DEST_COLOUR)); newCONSTSUB(stash_Ogre, "SBF_SOURCE_COLOUR", newSViv(Ogre::SBF_SOURCE_COLOUR)); newCONSTSUB(stash_Ogre, "SBF_ONE_MINUS_DEST_COLOUR", newSViv(Ogre::SBF_ONE_MINUS_DEST_COLOUR)); newCONSTSUB(stash_Ogre, "SBF_ONE_MINUS_SOURCE_COLOUR", newSViv(Ogre::SBF_ONE_MINUS_SOURCE_COLOUR)); newCONSTSUB(stash_Ogre, "SBF_DEST_ALPHA", newSViv(Ogre::SBF_DEST_ALPHA)); newCONSTSUB(stash_Ogre, "SBF_SOURCE_ALPHA", newSViv(Ogre::SBF_SOURCE_ALPHA)); newCONSTSUB(stash_Ogre, "SBF_ONE_MINUS_DEST_ALPHA", newSViv(Ogre::SBF_ONE_MINUS_DEST_ALPHA)); newCONSTSUB(stash_Ogre, "SBF_ONE_MINUS_SOURCE_ALPHA", newSViv(Ogre::SBF_ONE_MINUS_SOURCE_ALPHA)); // enum: WaveformType newCONSTSUB(stash_Ogre, "WFT_SINE", newSViv(Ogre::WFT_SINE)); newCONSTSUB(stash_Ogre, "WFT_TRIANGLE", newSViv(Ogre::WFT_TRIANGLE)); newCONSTSUB(stash_Ogre, "WFT_SQUARE", newSViv(Ogre::WFT_SQUARE)); newCONSTSUB(stash_Ogre, "WFT_SAWTOOTH", newSViv(Ogre::WFT_SAWTOOTH)); newCONSTSUB(stash_Ogre, "WFT_INVERSE_SAWTOOTH", newSViv(Ogre::WFT_INVERSE_SAWTOOTH)); newCONSTSUB(stash_Ogre, "WFT_PWM", newSViv(Ogre::WFT_PWM)); // enum: TexCoordCalcMethod newCONSTSUB(stash_Ogre, "TEXCALC_NONE", newSViv(Ogre::TEXCALC_NONE)); newCONSTSUB(stash_Ogre, "TEXCALC_ENVIRONMENT_MAP", newSViv(Ogre::TEXCALC_ENVIRONMENT_MAP)); newCONSTSUB(stash_Ogre, "TEXCALC_ENVIRONMENT_MAP_PLANAR", newSViv(Ogre::TEXCALC_ENVIRONMENT_MAP_PLANAR)); newCONSTSUB(stash_Ogre, "TEXCALC_ENVIRONMENT_MAP_REFLECTION", newSViv(Ogre::TEXCALC_ENVIRONMENT_MAP_REFLECTION)); newCONSTSUB(stash_Ogre, "TEXCALC_ENVIRONMENT_MAP_NORMAL", newSViv(Ogre::TEXCALC_ENVIRONMENT_MAP_NORMAL)); newCONSTSUB(stash_Ogre, "TEXCALC_PROJECTIVE_TEXTURE", newSViv(Ogre::TEXCALC_PROJECTIVE_TEXTURE)); // enum: FrameBufferType newCONSTSUB(stash_Ogre, "FBT_COLOUR", newSViv(Ogre::FBT_COLOUR)); newCONSTSUB(stash_Ogre, "FBT_DEPTH", newSViv(Ogre::FBT_DEPTH)); newCONSTSUB(stash_Ogre, "FBT_STENCIL", newSViv(Ogre::FBT_STENCIL)); // enum: SceneType newCONSTSUB(stash_Ogre, "ST_GENERIC", newSViv(Ogre::ST_GENERIC)); newCONSTSUB(stash_Ogre, "ST_EXTERIOR_CLOSE", newSViv(Ogre::ST_EXTERIOR_CLOSE)); newCONSTSUB(stash_Ogre, "ST_EXTERIOR_FAR", newSViv(Ogre::ST_EXTERIOR_FAR)); newCONSTSUB(stash_Ogre, "ST_EXTERIOR_REAL_FAR", newSViv(Ogre::ST_EXTERIOR_REAL_FAR)); newCONSTSUB(stash_Ogre, "ST_INTERIOR", newSViv(Ogre::ST_INTERIOR)); // enum: TextureType newCONSTSUB(stash_Ogre, "TEX_TYPE_1D", newSViv(Ogre::TEX_TYPE_1D)); newCONSTSUB(stash_Ogre, "TEX_TYPE_2D", newSViv(Ogre::TEX_TYPE_2D)); newCONSTSUB(stash_Ogre, "TEX_TYPE_3D", newSViv(Ogre::TEX_TYPE_3D)); newCONSTSUB(stash_Ogre, "TEX_TYPE_CUBE_MAP", newSViv(Ogre::TEX_TYPE_CUBE_MAP)); // enum: PolygonMode newCONSTSUB(stash_Ogre, "PM_POINTS", newSViv(Ogre::PM_POINTS)); newCONSTSUB(stash_Ogre, "PM_WIREFRAME", newSViv(Ogre::PM_WIREFRAME)); newCONSTSUB(stash_Ogre, "PM_SOLID", newSViv(Ogre::PM_SOLID)); // enum: SceneBlendType newCONSTSUB(stash_Ogre, "SBT_TRANSPARENT_ALPHA", newSViv(Ogre::SBT_TRANSPARENT_ALPHA)); newCONSTSUB(stash_Ogre, "SBT_TRANSPARENT_COLOUR", newSViv(Ogre::SBT_TRANSPARENT_COLOUR)); newCONSTSUB(stash_Ogre, "SBT_ADD", newSViv(Ogre::SBT_ADD)); newCONSTSUB(stash_Ogre, "SBT_MODULATE", newSViv(Ogre::SBT_MODULATE)); newCONSTSUB(stash_Ogre, "SBT_REPLACE", newSViv(Ogre::SBT_REPLACE)); // enum: FilterOptions newCONSTSUB(stash_Ogre, "FO_NONE", newSViv(Ogre::FO_NONE)); newCONSTSUB(stash_Ogre, "FO_POINT", newSViv(Ogre::FO_POINT)); newCONSTSUB(stash_Ogre, "FO_LINEAR", newSViv(Ogre::FO_LINEAR)); newCONSTSUB(stash_Ogre, "FO_ANISOTROPIC", newSViv(Ogre::FO_ANISOTROPIC)); // enum: StencilOperation newCONSTSUB(stash_Ogre, "SOP_KEEP", newSViv(Ogre::SOP_KEEP)); newCONSTSUB(stash_Ogre, "SOP_ZERO", newSViv(Ogre::SOP_ZERO)); newCONSTSUB(stash_Ogre, "SOP_REPLACE", newSViv(Ogre::SOP_REPLACE)); newCONSTSUB(stash_Ogre, "SOP_INCREMENT", newSViv(Ogre::SOP_INCREMENT)); newCONSTSUB(stash_Ogre, "SOP_DECREMENT", newSViv(Ogre::SOP_DECREMENT)); newCONSTSUB(stash_Ogre, "SOP_INCREMENT_WRAP", newSViv(Ogre::SOP_INCREMENT_WRAP)); newCONSTSUB(stash_Ogre, "SOP_DECREMENT_WRAP", newSViv(Ogre::SOP_DECREMENT_WRAP)); newCONSTSUB(stash_Ogre, "SOP_INVERT", newSViv(Ogre::SOP_INVERT)); // enum: BillboardType newCONSTSUB(stash_Ogre, "BBT_POINT", newSViv(Ogre::BBT_POINT)); newCONSTSUB(stash_Ogre, "BBT_ORIENTED_COMMON", newSViv(Ogre::BBT_ORIENTED_COMMON)); newCONSTSUB(stash_Ogre, "BBT_ORIENTED_SELF", newSViv(Ogre::BBT_ORIENTED_SELF)); newCONSTSUB(stash_Ogre, "BBT_PERPENDICULAR_COMMON", newSViv(Ogre::BBT_PERPENDICULAR_COMMON)); newCONSTSUB(stash_Ogre, "BBT_PERPENDICULAR_SELF", newSViv(Ogre::BBT_PERPENDICULAR_SELF)); // enum: LayerBlendType newCONSTSUB(stash_Ogre, "LBT_COLOUR", newSViv(Ogre::LBT_COLOUR)); newCONSTSUB(stash_Ogre, "LBT_ALPHA", newSViv(Ogre::LBT_ALPHA)); // enum: ImageFlags newCONSTSUB(stash_Ogre, "IF_COMPRESSED", newSViv(Ogre::IF_COMPRESSED)); newCONSTSUB(stash_Ogre, "IF_CUBEMAP", newSViv(Ogre::IF_CUBEMAP)); newCONSTSUB(stash_Ogre, "IF_3D_TEXTURE", newSViv(Ogre::IF_3D_TEXTURE)); // enum: LayerBlendOperationEx newCONSTSUB(stash_Ogre, "LBX_SOURCE1", newSViv(Ogre::LBX_SOURCE1)); newCONSTSUB(stash_Ogre, "LBX_SOURCE2", newSViv(Ogre::LBX_SOURCE2)); newCONSTSUB(stash_Ogre, "LBX_MODULATE", newSViv(Ogre::LBX_MODULATE)); newCONSTSUB(stash_Ogre, "LBX_MODULATE_X2", newSViv(Ogre::LBX_MODULATE_X2)); newCONSTSUB(stash_Ogre, "LBX_MODULATE_X4", newSViv(Ogre::LBX_MODULATE_X4)); newCONSTSUB(stash_Ogre, "LBX_ADD", newSViv(Ogre::LBX_ADD)); newCONSTSUB(stash_Ogre, "LBX_ADD_SIGNED", newSViv(Ogre::LBX_ADD_SIGNED)); newCONSTSUB(stash_Ogre, "LBX_ADD_SMOOTH", newSViv(Ogre::LBX_ADD_SMOOTH)); newCONSTSUB(stash_Ogre, "LBX_SUBTRACT", newSViv(Ogre::LBX_SUBTRACT)); newCONSTSUB(stash_Ogre, "LBX_BLEND_DIFFUSE_ALPHA", newSViv(Ogre::LBX_BLEND_DIFFUSE_ALPHA)); newCONSTSUB(stash_Ogre, "LBX_BLEND_TEXTURE_ALPHA", newSViv(Ogre::LBX_BLEND_TEXTURE_ALPHA)); newCONSTSUB(stash_Ogre, "LBX_BLEND_CURRENT_ALPHA", newSViv(Ogre::LBX_BLEND_CURRENT_ALPHA)); newCONSTSUB(stash_Ogre, "LBX_BLEND_MANUAL", newSViv(Ogre::LBX_BLEND_MANUAL)); newCONSTSUB(stash_Ogre, "LBX_DOTPRODUCT", newSViv(Ogre::LBX_DOTPRODUCT)); newCONSTSUB(stash_Ogre, "LBX_BLEND_DIFFUSE_COLOUR", newSViv(Ogre::LBX_BLEND_DIFFUSE_COLOUR)); // enum: GuiHorizontalAlignment newCONSTSUB(stash_Ogre, "GHA_LEFT", newSViv(Ogre::GHA_LEFT)); newCONSTSUB(stash_Ogre, "GHA_CENTER", newSViv(Ogre::GHA_CENTER)); newCONSTSUB(stash_Ogre, "GHA_RIGHT", newSViv(Ogre::GHA_RIGHT)); // enum: LayerBlendSource newCONSTSUB(stash_Ogre, "LBS_CURRENT", newSViv(Ogre::LBS_CURRENT)); newCONSTSUB(stash_Ogre, "LBS_TEXTURE", newSViv(Ogre::LBS_TEXTURE)); newCONSTSUB(stash_Ogre, "LBS_DIFFUSE", newSViv(Ogre::LBS_DIFFUSE)); newCONSTSUB(stash_Ogre, "LBS_SPECULAR", newSViv(Ogre::LBS_SPECULAR)); newCONSTSUB(stash_Ogre, "LBS_MANUAL", newSViv(Ogre::LBS_MANUAL)); // enum: GpuConstantType newCONSTSUB(stash_Ogre, "GCT_FLOAT1", newSViv(Ogre::GCT_FLOAT1)); newCONSTSUB(stash_Ogre, "GCT_FLOAT2", newSViv(Ogre::GCT_FLOAT2)); newCONSTSUB(stash_Ogre, "GCT_FLOAT3", newSViv(Ogre::GCT_FLOAT3)); newCONSTSUB(stash_Ogre, "GCT_FLOAT4", newSViv(Ogre::GCT_FLOAT4)); newCONSTSUB(stash_Ogre, "GCT_SAMPLER1D", newSViv(Ogre::GCT_SAMPLER1D)); newCONSTSUB(stash_Ogre, "GCT_SAMPLER2D", newSViv(Ogre::GCT_SAMPLER2D)); newCONSTSUB(stash_Ogre, "GCT_SAMPLER3D", newSViv(Ogre::GCT_SAMPLER3D)); newCONSTSUB(stash_Ogre, "GCT_SAMPLERCUBE", newSViv(Ogre::GCT_SAMPLERCUBE)); newCONSTSUB(stash_Ogre, "GCT_SAMPLER1DSHADOW", newSViv(Ogre::GCT_SAMPLER1DSHADOW)); newCONSTSUB(stash_Ogre, "GCT_SAMPLER2DSHADOW", newSViv(Ogre::GCT_SAMPLER2DSHADOW)); newCONSTSUB(stash_Ogre, "GCT_MATRIX_2X2", newSViv(Ogre::GCT_MATRIX_2X2)); newCONSTSUB(stash_Ogre, "GCT_MATRIX_2X3", newSViv(Ogre::GCT_MATRIX_2X3)); newCONSTSUB(stash_Ogre, "GCT_MATRIX_2X4", newSViv(Ogre::GCT_MATRIX_2X4)); newCONSTSUB(stash_Ogre, "GCT_MATRIX_3X2", newSViv(Ogre::GCT_MATRIX_3X2)); newCONSTSUB(stash_Ogre, "GCT_MATRIX_3X3", newSViv(Ogre::GCT_MATRIX_3X3)); newCONSTSUB(stash_Ogre, "GCT_MATRIX_3X4", newSViv(Ogre::GCT_MATRIX_3X4)); newCONSTSUB(stash_Ogre, "GCT_MATRIX_4X2", newSViv(Ogre::GCT_MATRIX_4X2)); newCONSTSUB(stash_Ogre, "GCT_MATRIX_4X3", newSViv(Ogre::GCT_MATRIX_4X3)); newCONSTSUB(stash_Ogre, "GCT_MATRIX_4X4", newSViv(Ogre::GCT_MATRIX_4X4)); newCONSTSUB(stash_Ogre, "GCT_INT1", newSViv(Ogre::GCT_INT1)); newCONSTSUB(stash_Ogre, "GCT_INT2", newSViv(Ogre::GCT_INT2)); newCONSTSUB(stash_Ogre, "GCT_INT3", newSViv(Ogre::GCT_INT3)); newCONSTSUB(stash_Ogre, "GCT_INT4", newSViv(Ogre::GCT_INT4)); newCONSTSUB(stash_Ogre, "GCT_UNKNOWN", newSViv(Ogre::GCT_UNKNOWN)); // enum: GpuProgramType newCONSTSUB(stash_Ogre, "GPT_VERTEX_PROGRAM", newSViv(Ogre::GPT_VERTEX_PROGRAM)); newCONSTSUB(stash_Ogre, "GPT_FRAGMENT_PROGRAM", newSViv(Ogre::GPT_FRAGMENT_PROGRAM)); // enum: TextureMipmap newCONSTSUB(stash_Ogre, "MIP_UNLIMITED", newSViv(Ogre::MIP_UNLIMITED)); newCONSTSUB(stash_Ogre, "MIP_DEFAULT", newSViv(Ogre::MIP_DEFAULT)); // enum: LoggingLevel newCONSTSUB(stash_Ogre, "LL_LOW", newSViv(Ogre::LL_LOW)); newCONSTSUB(stash_Ogre, "LL_NORMAL", newSViv(Ogre::LL_NORMAL)); newCONSTSUB(stash_Ogre, "LL_BOREME", newSViv(Ogre::LL_BOREME)); // enum: Capabilities newCONSTSUB(stash_Ogre, "RSC_AUTOMIPMAP", newSViv(Ogre::RSC_AUTOMIPMAP)); newCONSTSUB(stash_Ogre, "RSC_BLENDING", newSViv(Ogre::RSC_BLENDING)); newCONSTSUB(stash_Ogre, "RSC_ANISOTROPY", newSViv(Ogre::RSC_ANISOTROPY)); newCONSTSUB(stash_Ogre, "RSC_DOT3", newSViv(Ogre::RSC_DOT3)); newCONSTSUB(stash_Ogre, "RSC_CUBEMAPPING", newSViv(Ogre::RSC_CUBEMAPPING)); newCONSTSUB(stash_Ogre, "RSC_HWSTENCIL", newSViv(Ogre::RSC_HWSTENCIL)); newCONSTSUB(stash_Ogre, "RSC_VBO", newSViv(Ogre::RSC_VBO)); newCONSTSUB(stash_Ogre, "RSC_VERTEX_PROGRAM", newSViv(Ogre::RSC_VERTEX_PROGRAM)); newCONSTSUB(stash_Ogre, "RSC_FRAGMENT_PROGRAM", newSViv(Ogre::RSC_FRAGMENT_PROGRAM)); newCONSTSUB(stash_Ogre, "RSC_TEXTURE_COMPRESSION", newSViv(Ogre::RSC_TEXTURE_COMPRESSION)); newCONSTSUB(stash_Ogre, "RSC_TEXTURE_COMPRESSION_DXT", newSViv(Ogre::RSC_TEXTURE_COMPRESSION_DXT)); newCONSTSUB(stash_Ogre, "RSC_TEXTURE_COMPRESSION_VTC", newSViv(Ogre::RSC_TEXTURE_COMPRESSION_VTC)); newCONSTSUB(stash_Ogre, "RSC_SCISSOR_TEST", newSViv(Ogre::RSC_SCISSOR_TEST)); newCONSTSUB(stash_Ogre, "RSC_TWO_SIDED_STENCIL", newSViv(Ogre::RSC_TWO_SIDED_STENCIL)); newCONSTSUB(stash_Ogre, "RSC_STENCIL_WRAP", newSViv(Ogre::RSC_STENCIL_WRAP)); newCONSTSUB(stash_Ogre, "RSC_HWOCCLUSION", newSViv(Ogre::RSC_HWOCCLUSION)); newCONSTSUB(stash_Ogre, "RSC_USER_CLIP_PLANES", newSViv(Ogre::RSC_USER_CLIP_PLANES)); newCONSTSUB(stash_Ogre, "RSC_VERTEX_FORMAT_UBYTE4", newSViv(Ogre::RSC_VERTEX_FORMAT_UBYTE4)); newCONSTSUB(stash_Ogre, "RSC_INFINITE_FAR_PLANE", newSViv(Ogre::RSC_INFINITE_FAR_PLANE)); newCONSTSUB(stash_Ogre, "RSC_HWRENDER_TO_TEXTURE", newSViv(Ogre::RSC_HWRENDER_TO_TEXTURE)); newCONSTSUB(stash_Ogre, "RSC_TEXTURE_FLOAT", newSViv(Ogre::RSC_TEXTURE_FLOAT)); newCONSTSUB(stash_Ogre, "RSC_NON_POWER_OF_2_TEXTURES", newSViv(Ogre::RSC_NON_POWER_OF_2_TEXTURES)); newCONSTSUB(stash_Ogre, "RSC_TEXTURE_3D", newSViv(Ogre::RSC_TEXTURE_3D)); newCONSTSUB(stash_Ogre, "RSC_POINT_SPRITES", newSViv(Ogre::RSC_POINT_SPRITES)); newCONSTSUB(stash_Ogre, "RSC_POINT_EXTENDED_PARAMETERS", newSViv(Ogre::RSC_POINT_EXTENDED_PARAMETERS)); newCONSTSUB(stash_Ogre, "RSC_VERTEX_TEXTURE_FETCH", newSViv(Ogre::RSC_VERTEX_TEXTURE_FETCH)); newCONSTSUB(stash_Ogre, "RSC_MIPMAP_LOD_BIAS", newSViv(Ogre::RSC_MIPMAP_LOD_BIAS)); // enum: VertexAnimationType newCONSTSUB(stash_Ogre, "VAT_NONE", newSViv(Ogre::VAT_NONE)); newCONSTSUB(stash_Ogre, "VAT_MORPH", newSViv(Ogre::VAT_MORPH)); newCONSTSUB(stash_Ogre, "VAT_POSE", newSViv(Ogre::VAT_POSE)); // enum: ShadowTechnique newCONSTSUB(stash_Ogre, "SHADOWTYPE_NONE", newSViv(Ogre::SHADOWTYPE_NONE)); newCONSTSUB(stash_Ogre, "SHADOWDETAILTYPE_ADDITIVE", newSViv(Ogre::SHADOWDETAILTYPE_ADDITIVE)); newCONSTSUB(stash_Ogre, "SHADOWDETAILTYPE_MODULATIVE", newSViv(Ogre::SHADOWDETAILTYPE_MODULATIVE)); newCONSTSUB(stash_Ogre, "SHADOWDETAILTYPE_INTEGRATED", newSViv(Ogre::SHADOWDETAILTYPE_INTEGRATED)); newCONSTSUB(stash_Ogre, "SHADOWDETAILTYPE_STENCIL", newSViv(Ogre::SHADOWDETAILTYPE_STENCIL)); newCONSTSUB(stash_Ogre, "SHADOWDETAILTYPE_TEXTURE", newSViv(Ogre::SHADOWDETAILTYPE_TEXTURE)); newCONSTSUB(stash_Ogre, "SHADOWTYPE_STENCIL_MODULATIVE", newSViv(Ogre::SHADOWTYPE_STENCIL_MODULATIVE)); newCONSTSUB(stash_Ogre, "SHADOWTYPE_STENCIL_ADDITIVE", newSViv(Ogre::SHADOWTYPE_STENCIL_ADDITIVE)); newCONSTSUB(stash_Ogre, "SHADOWTYPE_TEXTURE_MODULATIVE", newSViv(Ogre::SHADOWTYPE_TEXTURE_MODULATIVE)); newCONSTSUB(stash_Ogre, "SHADOWTYPE_TEXTURE_ADDITIVE", newSViv(Ogre::SHADOWTYPE_TEXTURE_ADDITIVE)); newCONSTSUB(stash_Ogre, "SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED", newSViv(Ogre::SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED)); newCONSTSUB(stash_Ogre, "SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED", newSViv(Ogre::SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED)); // enum: VertexElementType newCONSTSUB(stash_Ogre, "VET_FLOAT1", newSViv(Ogre::VET_FLOAT1)); newCONSTSUB(stash_Ogre, "VET_FLOAT2", newSViv(Ogre::VET_FLOAT2)); newCONSTSUB(stash_Ogre, "VET_FLOAT3", newSViv(Ogre::VET_FLOAT3)); newCONSTSUB(stash_Ogre, "VET_FLOAT4", newSViv(Ogre::VET_FLOAT4)); newCONSTSUB(stash_Ogre, "VET_COLOUR", newSViv(Ogre::VET_COLOUR)); newCONSTSUB(stash_Ogre, "VET_SHORT1", newSViv(Ogre::VET_SHORT1)); newCONSTSUB(stash_Ogre, "VET_SHORT2", newSViv(Ogre::VET_SHORT2)); newCONSTSUB(stash_Ogre, "VET_SHORT3", newSViv(Ogre::VET_SHORT3)); newCONSTSUB(stash_Ogre, "VET_SHORT4", newSViv(Ogre::VET_SHORT4)); newCONSTSUB(stash_Ogre, "VET_UBYTE4", newSViv(Ogre::VET_UBYTE4)); newCONSTSUB(stash_Ogre, "VET_COLOUR_ARGB", newSViv(Ogre::VET_COLOUR_ARGB)); newCONSTSUB(stash_Ogre, "VET_COLOUR_ABGR", newSViv(Ogre::VET_COLOUR_ABGR)); // enum: TrackVertexColourEnum newCONSTSUB(stash_Ogre, "TVC_NONE", newSViv(Ogre::TVC_NONE)); newCONSTSUB(stash_Ogre, "TVC_AMBIENT", newSViv(Ogre::TVC_AMBIENT)); newCONSTSUB(stash_Ogre, "TVC_DIFFUSE", newSViv(Ogre::TVC_DIFFUSE)); newCONSTSUB(stash_Ogre, "TVC_SPECULAR", newSViv(Ogre::TVC_SPECULAR)); newCONSTSUB(stash_Ogre, "TVC_EMISSIVE", newSViv(Ogre::TVC_EMISSIVE)); // enum: GuiVerticalAlignment newCONSTSUB(stash_Ogre, "GVA_TOP", newSViv(Ogre::GVA_TOP)); newCONSTSUB(stash_Ogre, "GVA_CENTER", newSViv(Ogre::GVA_CENTER)); newCONSTSUB(stash_Ogre, "GVA_BOTTOM", newSViv(Ogre::GVA_BOTTOM)); // enum: FogMode newCONSTSUB(stash_Ogre, "FOG_NONE", newSViv(Ogre::FOG_NONE)); newCONSTSUB(stash_Ogre, "FOG_EXP", newSViv(Ogre::FOG_EXP)); newCONSTSUB(stash_Ogre, "FOG_EXP2", newSViv(Ogre::FOG_EXP2)); newCONSTSUB(stash_Ogre, "FOG_LINEAR", newSViv(Ogre::FOG_LINEAR)); // enum: BillboardOrigin newCONSTSUB(stash_Ogre, "BBO_TOP_LEFT", newSViv(Ogre::BBO_TOP_LEFT)); newCONSTSUB(stash_Ogre, "BBO_TOP_CENTER", newSViv(Ogre::BBO_TOP_CENTER)); newCONSTSUB(stash_Ogre, "BBO_TOP_RIGHT", newSViv(Ogre::BBO_TOP_RIGHT)); newCONSTSUB(stash_Ogre, "BBO_CENTER_LEFT", newSViv(Ogre::BBO_CENTER_LEFT)); newCONSTSUB(stash_Ogre, "BBO_CENTER", newSViv(Ogre::BBO_CENTER)); newCONSTSUB(stash_Ogre, "BBO_CENTER_RIGHT", newSViv(Ogre::BBO_CENTER_RIGHT)); newCONSTSUB(stash_Ogre, "BBO_BOTTOM_LEFT", newSViv(Ogre::BBO_BOTTOM_LEFT)); newCONSTSUB(stash_Ogre, "BBO_BOTTOM_CENTER", newSViv(Ogre::BBO_BOTTOM_CENTER)); newCONSTSUB(stash_Ogre, "BBO_BOTTOM_RIGHT", newSViv(Ogre::BBO_BOTTOM_RIGHT)); // enum: PixelComponentType newCONSTSUB(stash_Ogre, "PCT_BYTE", newSViv(Ogre::PCT_BYTE)); newCONSTSUB(stash_Ogre, "PCT_SHORT", newSViv(Ogre::PCT_SHORT)); newCONSTSUB(stash_Ogre, "PCT_FLOAT16", newSViv(Ogre::PCT_FLOAT16)); newCONSTSUB(stash_Ogre, "PCT_FLOAT32", newSViv(Ogre::PCT_FLOAT32)); newCONSTSUB(stash_Ogre, "PCT_COUNT", newSViv(Ogre::PCT_COUNT)); // enum: SortMode newCONSTSUB(stash_Ogre, "SM_DIRECTION", newSViv(Ogre::SM_DIRECTION)); newCONSTSUB(stash_Ogre, "SM_DISTANCE", newSViv(Ogre::SM_DISTANCE)); // enum: SkeletonAnimationBlendMode newCONSTSUB(stash_Ogre, "ANIMBLEND_AVERAGE", newSViv(Ogre::ANIMBLEND_AVERAGE)); newCONSTSUB(stash_Ogre, "ANIMBLEND_CUMULATIVE", newSViv(Ogre::ANIMBLEND_CUMULATIVE)); // enum: BillboardRotationType newCONSTSUB(stash_Ogre, "BBR_VERTEX", newSViv(Ogre::BBR_VERTEX)); newCONSTSUB(stash_Ogre, "BBR_TEXCOORD", newSViv(Ogre::BBR_TEXCOORD)); // enum: TextureFilterOptions newCONSTSUB(stash_Ogre, "TFO_NONE", newSViv(Ogre::TFO_NONE)); newCONSTSUB(stash_Ogre, "TFO_BILINEAR", newSViv(Ogre::TFO_BILINEAR)); newCONSTSUB(stash_Ogre, "TFO_TRILINEAR", newSViv(Ogre::TFO_TRILINEAR)); newCONSTSUB(stash_Ogre, "TFO_ANISOTROPIC", newSViv(Ogre::TFO_ANISOTROPIC)); // enum: LogMessageLevel newCONSTSUB(stash_Ogre, "LML_TRIVIAL", newSViv(Ogre::LML_TRIVIAL)); newCONSTSUB(stash_Ogre, "LML_NORMAL", newSViv(Ogre::LML_NORMAL)); newCONSTSUB(stash_Ogre, "LML_CRITICAL", newSViv(Ogre::LML_CRITICAL)); // enum: GuiMetricsMode newCONSTSUB(stash_Ogre, "GMM_RELATIVE", newSViv(Ogre::GMM_RELATIVE)); newCONSTSUB(stash_Ogre, "GMM_PIXELS", newSViv(Ogre::GMM_PIXELS)); newCONSTSUB(stash_Ogre, "GMM_RELATIVE_ASPECT_ADJUSTED", newSViv(Ogre::GMM_RELATIVE_ASPECT_ADJUSTED)); // enum: TextureUsage newCONSTSUB(stash_Ogre, "TU_STATIC", newSViv(Ogre::TU_STATIC)); newCONSTSUB(stash_Ogre, "TU_DYNAMIC", newSViv(Ogre::TU_DYNAMIC)); newCONSTSUB(stash_Ogre, "TU_WRITE_ONLY", newSViv(Ogre::TU_WRITE_ONLY)); newCONSTSUB(stash_Ogre, "TU_STATIC_WRITE_ONLY", newSViv(Ogre::TU_STATIC_WRITE_ONLY)); newCONSTSUB(stash_Ogre, "TU_DYNAMIC_WRITE_ONLY", newSViv(Ogre::TU_DYNAMIC_WRITE_ONLY)); newCONSTSUB(stash_Ogre, "TU_DYNAMIC_WRITE_ONLY_DISCARDABLE", newSViv(Ogre::TU_DYNAMIC_WRITE_ONLY_DISCARDABLE)); newCONSTSUB(stash_Ogre, "TU_AUTOMIPMAP", newSViv(Ogre::TU_AUTOMIPMAP)); newCONSTSUB(stash_Ogre, "TU_RENDERTARGET", newSViv(Ogre::TU_RENDERTARGET)); newCONSTSUB(stash_Ogre, "TU_DEFAULT", newSViv(Ogre::TU_DEFAULT)); // enum: RenderQueueGroupID newCONSTSUB(stash_Ogre, "RENDER_QUEUE_BACKGROUND", newSViv(Ogre::RENDER_QUEUE_BACKGROUND)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_SKIES_EARLY", newSViv(Ogre::RENDER_QUEUE_SKIES_EARLY)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_1", newSViv(Ogre::RENDER_QUEUE_1)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_2", newSViv(Ogre::RENDER_QUEUE_2)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_WORLD_GEOMETRY_1", newSViv(Ogre::RENDER_QUEUE_WORLD_GEOMETRY_1)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_3", newSViv(Ogre::RENDER_QUEUE_3)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_4", newSViv(Ogre::RENDER_QUEUE_4)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_MAIN", newSViv(Ogre::RENDER_QUEUE_MAIN)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_6", newSViv(Ogre::RENDER_QUEUE_6)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_7", newSViv(Ogre::RENDER_QUEUE_7)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_WORLD_GEOMETRY_2", newSViv(Ogre::RENDER_QUEUE_WORLD_GEOMETRY_2)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_8", newSViv(Ogre::RENDER_QUEUE_8)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_9", newSViv(Ogre::RENDER_QUEUE_9)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_SKIES_LATE", newSViv(Ogre::RENDER_QUEUE_SKIES_LATE)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_OVERLAY", newSViv(Ogre::RENDER_QUEUE_OVERLAY)); newCONSTSUB(stash_Ogre, "RENDER_QUEUE_MAX", newSViv(Ogre::RENDER_QUEUE_MAX)); // enum: PixelFormatFlags newCONSTSUB(stash_Ogre, "PFF_HASALPHA", newSViv(Ogre::PFF_HASALPHA)); newCONSTSUB(stash_Ogre, "PFF_COMPRESSED", newSViv(Ogre::PFF_COMPRESSED)); newCONSTSUB(stash_Ogre, "PFF_FLOAT", newSViv(Ogre::PFF_FLOAT)); newCONSTSUB(stash_Ogre, "PFF_DEPTH", newSViv(Ogre::PFF_DEPTH)); newCONSTSUB(stash_Ogre, "PFF_NATIVEENDIAN", newSViv(Ogre::PFF_NATIVEENDIAN)); newCONSTSUB(stash_Ogre, "PFF_LUMINANCE", newSViv(Ogre::PFF_LUMINANCE)); // enum: IlluminationStage newCONSTSUB(stash_Ogre, "IS_AMBIENT", newSViv(Ogre::IS_AMBIENT)); newCONSTSUB(stash_Ogre, "IS_PER_LIGHT", newSViv(Ogre::IS_PER_LIGHT)); newCONSTSUB(stash_Ogre, "IS_DECAL", newSViv(Ogre::IS_DECAL)); // enum: CullingMode newCONSTSUB(stash_Ogre, "CULL_NONE", newSViv(Ogre::CULL_NONE)); newCONSTSUB(stash_Ogre, "CULL_CLOCKWISE", newSViv(Ogre::CULL_CLOCKWISE)); newCONSTSUB(stash_Ogre, "CULL_ANTICLOCKWISE", newSViv(Ogre::CULL_ANTICLOCKWISE)); // enum: VertexElementSemantic newCONSTSUB(stash_Ogre, "VES_POSITION", newSViv(Ogre::VES_POSITION)); newCONSTSUB(stash_Ogre, "VES_BLEND_WEIGHTS", newSViv(Ogre::VES_BLEND_WEIGHTS)); newCONSTSUB(stash_Ogre, "VES_BLEND_INDICES", newSViv(Ogre::VES_BLEND_INDICES)); newCONSTSUB(stash_Ogre, "VES_NORMAL", newSViv(Ogre::VES_NORMAL)); newCONSTSUB(stash_Ogre, "VES_DIFFUSE", newSViv(Ogre::VES_DIFFUSE)); newCONSTSUB(stash_Ogre, "VES_SPECULAR", newSViv(Ogre::VES_SPECULAR)); newCONSTSUB(stash_Ogre, "VES_TEXTURE_COORDINATES", newSViv(Ogre::VES_TEXTURE_COORDINATES)); newCONSTSUB(stash_Ogre, "VES_BINORMAL", newSViv(Ogre::VES_BINORMAL)); newCONSTSUB(stash_Ogre, "VES_TANGENT", newSViv(Ogre::VES_TANGENT)); // enum: FrustumPlane newCONSTSUB(stash_Ogre, "FRUSTUM_PLANE_NEAR", newSViv(Ogre::FRUSTUM_PLANE_NEAR)); newCONSTSUB(stash_Ogre, "FRUSTUM_PLANE_FAR", newSViv(Ogre::FRUSTUM_PLANE_FAR)); newCONSTSUB(stash_Ogre, "FRUSTUM_PLANE_LEFT", newSViv(Ogre::FRUSTUM_PLANE_LEFT)); newCONSTSUB(stash_Ogre, "FRUSTUM_PLANE_RIGHT", newSViv(Ogre::FRUSTUM_PLANE_RIGHT)); newCONSTSUB(stash_Ogre, "FRUSTUM_PLANE_TOP", newSViv(Ogre::FRUSTUM_PLANE_TOP)); newCONSTSUB(stash_Ogre, "FRUSTUM_PLANE_BOTTOM", newSViv(Ogre::FRUSTUM_PLANE_BOTTOM)); // enum: MaterialScriptSection newCONSTSUB(stash_Ogre, "MSS_NONE", newSViv(Ogre::MSS_NONE)); newCONSTSUB(stash_Ogre, "MSS_MATERIAL", newSViv(Ogre::MSS_MATERIAL)); newCONSTSUB(stash_Ogre, "MSS_TECHNIQUE", newSViv(Ogre::MSS_TECHNIQUE)); newCONSTSUB(stash_Ogre, "MSS_PASS", newSViv(Ogre::MSS_PASS)); newCONSTSUB(stash_Ogre, "MSS_TEXTUREUNIT", newSViv(Ogre::MSS_TEXTUREUNIT)); newCONSTSUB(stash_Ogre, "MSS_PROGRAM_REF", newSViv(Ogre::MSS_PROGRAM_REF)); newCONSTSUB(stash_Ogre, "MSS_PROGRAM", newSViv(Ogre::MSS_PROGRAM)); newCONSTSUB(stash_Ogre, "MSS_DEFAULT_PARAMETERS", newSViv(Ogre::MSS_DEFAULT_PARAMETERS)); newCONSTSUB(stash_Ogre, "MSS_TEXTURESOURCE", newSViv(Ogre::MSS_TEXTURESOURCE)); // enum: ShadowRenderableFlags newCONSTSUB(stash_Ogre, "SRF_INCLUDE_LIGHT_CAP", newSViv(Ogre::SRF_INCLUDE_LIGHT_CAP)); newCONSTSUB(stash_Ogre, "SRF_INCLUDE_DARK_CAP", newSViv(Ogre::SRF_INCLUDE_DARK_CAP)); newCONSTSUB(stash_Ogre, "SRF_EXTRUDE_TO_INFINITY", newSViv(Ogre::SRF_EXTRUDE_TO_INFINITY)); // enum: ManualCullingMode newCONSTSUB(stash_Ogre, "MANUAL_CULL_NONE", newSViv(Ogre::MANUAL_CULL_NONE)); newCONSTSUB(stash_Ogre, "MANUAL_CULL_BACK", newSViv(Ogre::MANUAL_CULL_BACK)); newCONSTSUB(stash_Ogre, "MANUAL_CULL_FRONT", newSViv(Ogre::MANUAL_CULL_FRONT)); // enum: CompareFunction newCONSTSUB(stash_Ogre, "CMPF_ALWAYS_FAIL", newSViv(Ogre::CMPF_ALWAYS_FAIL)); newCONSTSUB(stash_Ogre, "CMPF_ALWAYS_PASS", newSViv(Ogre::CMPF_ALWAYS_PASS)); newCONSTSUB(stash_Ogre, "CMPF_LESS", newSViv(Ogre::CMPF_LESS)); newCONSTSUB(stash_Ogre, "CMPF_LESS_EQUAL", newSViv(Ogre::CMPF_LESS_EQUAL)); newCONSTSUB(stash_Ogre, "CMPF_EQUAL", newSViv(Ogre::CMPF_EQUAL)); newCONSTSUB(stash_Ogre, "CMPF_NOT_EQUAL", newSViv(Ogre::CMPF_NOT_EQUAL)); newCONSTSUB(stash_Ogre, "CMPF_GREATER_EQUAL", newSViv(Ogre::CMPF_GREATER_EQUAL)); newCONSTSUB(stash_Ogre, "CMPF_GREATER", newSViv(Ogre::CMPF_GREATER)); HV *stash_Ogre__AnimableValue = gv_stashpv("Ogre::AnimableValue", TRUE); // enum: ValueType newCONSTSUB(stash_Ogre__AnimableValue, "INT", newSViv(Ogre::AnimableValue::INT)); newCONSTSUB(stash_Ogre__AnimableValue, "REAL", newSViv(Ogre::AnimableValue::REAL)); newCONSTSUB(stash_Ogre__AnimableValue, "VECTOR2", newSViv(Ogre::AnimableValue::VECTOR2)); newCONSTSUB(stash_Ogre__AnimableValue, "VECTOR3", newSViv(Ogre::AnimableValue::VECTOR3)); newCONSTSUB(stash_Ogre__AnimableValue, "VECTOR4", newSViv(Ogre::AnimableValue::VECTOR4)); newCONSTSUB(stash_Ogre__AnimableValue, "QUATERNION", newSViv(Ogre::AnimableValue::QUATERNION)); newCONSTSUB(stash_Ogre__AnimableValue, "COLOUR", newSViv(Ogre::AnimableValue::COLOUR)); HV *stash_Ogre__Animation = gv_stashpv("Ogre::Animation", TRUE); // enum: InterpolationMode newCONSTSUB(stash_Ogre__Animation, "IM_LINEAR", newSViv(Ogre::Animation::IM_LINEAR)); newCONSTSUB(stash_Ogre__Animation, "IM_SPLINE", newSViv(Ogre::Animation::IM_SPLINE)); // enum: RotationInterpolationMode newCONSTSUB(stash_Ogre__Animation, "RIM_LINEAR", newSViv(Ogre::Animation::RIM_LINEAR)); newCONSTSUB(stash_Ogre__Animation, "RIM_SPHERICAL", newSViv(Ogre::Animation::RIM_SPHERICAL)); HV *stash_Ogre__AxisAlignedBox = gv_stashpv("Ogre::AxisAlignedBox", TRUE); // enum: CornerEnum newCONSTSUB(stash_Ogre__AxisAlignedBox, "FAR_LEFT_BOTTOM", newSViv(Ogre::AxisAlignedBox::FAR_LEFT_BOTTOM)); newCONSTSUB(stash_Ogre__AxisAlignedBox, "FAR_LEFT_TOP", newSViv(Ogre::AxisAlignedBox::FAR_LEFT_TOP)); newCONSTSUB(stash_Ogre__AxisAlignedBox, "FAR_RIGHT_TOP", newSViv(Ogre::AxisAlignedBox::FAR_RIGHT_TOP)); newCONSTSUB(stash_Ogre__AxisAlignedBox, "FAR_RIGHT_BOTTOM", newSViv(Ogre::AxisAlignedBox::FAR_RIGHT_BOTTOM)); newCONSTSUB(stash_Ogre__AxisAlignedBox, "NEAR_RIGHT_BOTTOM", newSViv(Ogre::AxisAlignedBox::NEAR_RIGHT_BOTTOM)); newCONSTSUB(stash_Ogre__AxisAlignedBox, "NEAR_LEFT_BOTTOM", newSViv(Ogre::AxisAlignedBox::NEAR_LEFT_BOTTOM)); newCONSTSUB(stash_Ogre__AxisAlignedBox, "NEAR_LEFT_TOP", newSViv(Ogre::AxisAlignedBox::NEAR_LEFT_TOP)); newCONSTSUB(stash_Ogre__AxisAlignedBox, "NEAR_RIGHT_TOP", newSViv(Ogre::AxisAlignedBox::NEAR_RIGHT_TOP)); HV *stash_Ogre__BillboardChain = gv_stashpv("Ogre::BillboardChain", TRUE); // enum: TexCoordDirection newCONSTSUB(stash_Ogre__BillboardChain, "TCD_U", newSViv(Ogre::BillboardChain::TCD_U)); newCONSTSUB(stash_Ogre__BillboardChain, "TCD_V", newSViv(Ogre::BillboardChain::TCD_V)); HV *stash_Ogre__CompositionPass = gv_stashpv("Ogre::CompositionPass", TRUE); // enum: PassType newCONSTSUB(stash_Ogre__CompositionPass, "PT_CLEAR", newSViv(Ogre::CompositionPass::PT_CLEAR)); newCONSTSUB(stash_Ogre__CompositionPass, "PT_STENCIL", newSViv(Ogre::CompositionPass::PT_STENCIL)); newCONSTSUB(stash_Ogre__CompositionPass, "PT_RENDERSCENE", newSViv(Ogre::CompositionPass::PT_RENDERSCENE)); newCONSTSUB(stash_Ogre__CompositionPass, "PT_RENDERQUAD", newSViv(Ogre::CompositionPass::PT_RENDERQUAD)); HV *stash_Ogre__CompositionTargetPass = gv_stashpv("Ogre::CompositionTargetPass", TRUE); // enum: InputMode newCONSTSUB(stash_Ogre__CompositionTargetPass, "IM_NONE", newSViv(Ogre::CompositionTargetPass::IM_NONE)); newCONSTSUB(stash_Ogre__CompositionTargetPass, "IM_PREVIOUS", newSViv(Ogre::CompositionTargetPass::IM_PREVIOUS)); HV *stash_Ogre__Entity = gv_stashpv("Ogre::Entity", TRUE); // enum: VertexDataBindChoice newCONSTSUB(stash_Ogre__Entity, "BIND_ORIGINAL", newSViv(Ogre::Entity::BIND_ORIGINAL)); newCONSTSUB(stash_Ogre__Entity, "BIND_SOFTWARE_SKELETAL", newSViv(Ogre::Entity::BIND_SOFTWARE_SKELETAL)); newCONSTSUB(stash_Ogre__Entity, "BIND_SOFTWARE_MORPH", newSViv(Ogre::Entity::BIND_SOFTWARE_MORPH)); newCONSTSUB(stash_Ogre__Entity, "BIND_HARDWARE_MORPH", newSViv(Ogre::Entity::BIND_HARDWARE_MORPH)); HV *stash_Ogre__Exception = gv_stashpv("Ogre::Exception", TRUE); // enum: ExceptionCodes newCONSTSUB(stash_Ogre__Exception, "ERR_CANNOT_WRITE_TO_FILE", newSViv(Ogre::Exception::ERR_CANNOT_WRITE_TO_FILE)); newCONSTSUB(stash_Ogre__Exception, "ERR_INVALID_STATE", newSViv(Ogre::Exception::ERR_INVALID_STATE)); newCONSTSUB(stash_Ogre__Exception, "ERR_INVALIDPARAMS", newSViv(Ogre::Exception::ERR_INVALIDPARAMS)); newCONSTSUB(stash_Ogre__Exception, "ERR_RENDERINGAPI_ERROR", newSViv(Ogre::Exception::ERR_RENDERINGAPI_ERROR)); newCONSTSUB(stash_Ogre__Exception, "ERR_DUPLICATE_ITEM", newSViv(Ogre::Exception::ERR_DUPLICATE_ITEM)); newCONSTSUB(stash_Ogre__Exception, "ERR_ITEM_NOT_FOUND", newSViv(Ogre::Exception::ERR_ITEM_NOT_FOUND)); newCONSTSUB(stash_Ogre__Exception, "ERR_FILE_NOT_FOUND", newSViv(Ogre::Exception::ERR_FILE_NOT_FOUND)); newCONSTSUB(stash_Ogre__Exception, "ERR_INTERNAL_ERROR", newSViv(Ogre::Exception::ERR_INTERNAL_ERROR)); newCONSTSUB(stash_Ogre__Exception, "ERR_RT_ASSERTION_FAILED", newSViv(Ogre::Exception::ERR_RT_ASSERTION_FAILED)); newCONSTSUB(stash_Ogre__Exception, "ERR_NOT_IMPLEMENTED", newSViv(Ogre::Exception::ERR_NOT_IMPLEMENTED)); HV *stash_Ogre__GpuProgramParameters = gv_stashpv("Ogre::GpuProgramParameters", TRUE); // enum: AutoConstantType newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_WORLD_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_WORLD_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_WORLD_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_WORLD_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TRANSPOSE_WORLD_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_TRANSPOSE_WORLD_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_TRANSPOSE_WORLD_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_TRANSPOSE_WORLD_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_WORLD_MATRIX_ARRAY_3x4", newSViv(Ogre::GpuProgramParameters::ACT_WORLD_MATRIX_ARRAY_3x4)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_WORLD_MATRIX_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_WORLD_MATRIX_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_VIEW_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_VIEW_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_VIEW_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_VIEW_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TRANSPOSE_VIEW_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_TRANSPOSE_VIEW_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_TRANSPOSE_VIEW_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_TRANSPOSE_VIEW_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_PROJECTION_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_PROJECTION_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_PROJECTION_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_PROJECTION_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TRANSPOSE_PROJECTION_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_TRANSPOSE_PROJECTION_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_TRANSPOSE_PROJECTION_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_TRANSPOSE_PROJECTION_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_VIEWPROJ_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_VIEWPROJ_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_VIEWPROJ_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_VIEWPROJ_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TRANSPOSE_VIEWPROJ_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_TRANSPOSE_VIEWPROJ_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_TRANSPOSE_VIEWPROJ_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_TRANSPOSE_VIEWPROJ_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_WORLDVIEW_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_WORLDVIEW_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_WORLDVIEW_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_WORLDVIEW_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TRANSPOSE_WORLDVIEW_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_TRANSPOSE_WORLDVIEW_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_TRANSPOSE_WORLDVIEW_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_TRANSPOSE_WORLDVIEW_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_WORLDVIEWPROJ_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_WORLDVIEWPROJ_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_WORLDVIEWPROJ_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_WORLDVIEWPROJ_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TRANSPOSE_WORLDVIEWPROJ_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_TRANSPOSE_WORLDVIEWPROJ_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_TRANSPOSE_WORLDVIEWPROJ_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_TRANSPOSE_WORLDVIEWPROJ_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_RENDER_TARGET_FLIPPING", newSViv(Ogre::GpuProgramParameters::ACT_RENDER_TARGET_FLIPPING)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_FOG_COLOUR", newSViv(Ogre::GpuProgramParameters::ACT_FOG_COLOUR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_FOG_PARAMS", newSViv(Ogre::GpuProgramParameters::ACT_FOG_PARAMS)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_SURFACE_AMBIENT_COLOUR", newSViv(Ogre::GpuProgramParameters::ACT_SURFACE_AMBIENT_COLOUR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_SURFACE_DIFFUSE_COLOUR", newSViv(Ogre::GpuProgramParameters::ACT_SURFACE_DIFFUSE_COLOUR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_SURFACE_SPECULAR_COLOUR", newSViv(Ogre::GpuProgramParameters::ACT_SURFACE_SPECULAR_COLOUR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_SURFACE_EMISSIVE_COLOUR", newSViv(Ogre::GpuProgramParameters::ACT_SURFACE_EMISSIVE_COLOUR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_SURFACE_SHININESS", newSViv(Ogre::GpuProgramParameters::ACT_SURFACE_SHININESS)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_AMBIENT_LIGHT_COLOUR", newSViv(Ogre::GpuProgramParameters::ACT_AMBIENT_LIGHT_COLOUR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_DIFFUSE_COLOUR", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_DIFFUSE_COLOUR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_SPECULAR_COLOUR", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_SPECULAR_COLOUR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_ATTENUATION", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_ATTENUATION)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_SPOTLIGHT_PARAMS", newSViv(Ogre::GpuProgramParameters::ACT_SPOTLIGHT_PARAMS)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_POSITION", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_POSITION)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_POSITION_OBJECT_SPACE", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_POSITION_OBJECT_SPACE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_POSITION_VIEW_SPACE", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_POSITION_VIEW_SPACE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_DIRECTION", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_DIRECTION)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_DIRECTION_OBJECT_SPACE", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_DIRECTION_OBJECT_SPACE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_DIRECTION_VIEW_SPACE", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_DIRECTION_VIEW_SPACE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_DISTANCE_OBJECT_SPACE", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_DISTANCE_OBJECT_SPACE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_POWER_SCALE", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_POWER_SCALE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_DIFFUSE_COLOUR_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_DIFFUSE_COLOUR_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_SPECULAR_COLOUR_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_SPECULAR_COLOUR_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_ATTENUATION_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_ATTENUATION_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_POSITION_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_POSITION_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_POSITION_OBJECT_SPACE_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_POSITION_OBJECT_SPACE_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_POSITION_VIEW_SPACE_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_POSITION_VIEW_SPACE_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_DIRECTION_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_DIRECTION_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_DIRECTION_OBJECT_SPACE_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_DIRECTION_OBJECT_SPACE_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_DIRECTION_VIEW_SPACE_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_DIRECTION_VIEW_SPACE_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_DISTANCE_OBJECT_SPACE_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_DISTANCE_OBJECT_SPACE_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_LIGHT_POWER_SCALE_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_LIGHT_POWER_SCALE_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_SPOTLIGHT_PARAMS_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_SPOTLIGHT_PARAMS_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_DERIVED_AMBIENT_LIGHT_COLOUR", newSViv(Ogre::GpuProgramParameters::ACT_DERIVED_AMBIENT_LIGHT_COLOUR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_DERIVED_SCENE_COLOUR", newSViv(Ogre::GpuProgramParameters::ACT_DERIVED_SCENE_COLOUR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_DERIVED_LIGHT_DIFFUSE_COLOUR", newSViv(Ogre::GpuProgramParameters::ACT_DERIVED_LIGHT_DIFFUSE_COLOUR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_DERIVED_LIGHT_SPECULAR_COLOUR", newSViv(Ogre::GpuProgramParameters::ACT_DERIVED_LIGHT_SPECULAR_COLOUR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_DERIVED_LIGHT_DIFFUSE_COLOUR_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_DERIVED_LIGHT_DIFFUSE_COLOUR_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_DERIVED_LIGHT_SPECULAR_COLOUR_ARRAY", newSViv(Ogre::GpuProgramParameters::ACT_DERIVED_LIGHT_SPECULAR_COLOUR_ARRAY)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_SHADOW_EXTRUSION_DISTANCE", newSViv(Ogre::GpuProgramParameters::ACT_SHADOW_EXTRUSION_DISTANCE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_CAMERA_POSITION", newSViv(Ogre::GpuProgramParameters::ACT_CAMERA_POSITION)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_CAMERA_POSITION_OBJECT_SPACE", newSViv(Ogre::GpuProgramParameters::ACT_CAMERA_POSITION_OBJECT_SPACE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TEXTURE_VIEWPROJ_MATRIX", newSViv(Ogre::GpuProgramParameters::ACT_TEXTURE_VIEWPROJ_MATRIX)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_CUSTOM", newSViv(Ogre::GpuProgramParameters::ACT_CUSTOM)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TIME", newSViv(Ogre::GpuProgramParameters::ACT_TIME)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TIME_0_X", newSViv(Ogre::GpuProgramParameters::ACT_TIME_0_X)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_COSTIME_0_X", newSViv(Ogre::GpuProgramParameters::ACT_COSTIME_0_X)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_SINTIME_0_X", newSViv(Ogre::GpuProgramParameters::ACT_SINTIME_0_X)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TANTIME_0_X", newSViv(Ogre::GpuProgramParameters::ACT_TANTIME_0_X)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TIME_0_X_PACKED", newSViv(Ogre::GpuProgramParameters::ACT_TIME_0_X_PACKED)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TIME_0_1", newSViv(Ogre::GpuProgramParameters::ACT_TIME_0_1)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_COSTIME_0_1", newSViv(Ogre::GpuProgramParameters::ACT_COSTIME_0_1)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_SINTIME_0_1", newSViv(Ogre::GpuProgramParameters::ACT_SINTIME_0_1)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TANTIME_0_1", newSViv(Ogre::GpuProgramParameters::ACT_TANTIME_0_1)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TIME_0_1_PACKED", newSViv(Ogre::GpuProgramParameters::ACT_TIME_0_1_PACKED)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TIME_0_2PI", newSViv(Ogre::GpuProgramParameters::ACT_TIME_0_2PI)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_COSTIME_0_2PI", newSViv(Ogre::GpuProgramParameters::ACT_COSTIME_0_2PI)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_SINTIME_0_2PI", newSViv(Ogre::GpuProgramParameters::ACT_SINTIME_0_2PI)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TANTIME_0_2PI", newSViv(Ogre::GpuProgramParameters::ACT_TANTIME_0_2PI)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TIME_0_2PI_PACKED", newSViv(Ogre::GpuProgramParameters::ACT_TIME_0_2PI_PACKED)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_FRAME_TIME", newSViv(Ogre::GpuProgramParameters::ACT_FRAME_TIME)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_FPS", newSViv(Ogre::GpuProgramParameters::ACT_FPS)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_VIEWPORT_WIDTH", newSViv(Ogre::GpuProgramParameters::ACT_VIEWPORT_WIDTH)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_VIEWPORT_HEIGHT", newSViv(Ogre::GpuProgramParameters::ACT_VIEWPORT_HEIGHT)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_VIEWPORT_WIDTH", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_VIEWPORT_WIDTH)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_VIEWPORT_HEIGHT", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_VIEWPORT_HEIGHT)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_VIEWPORT_SIZE", newSViv(Ogre::GpuProgramParameters::ACT_VIEWPORT_SIZE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_VIEW_DIRECTION", newSViv(Ogre::GpuProgramParameters::ACT_VIEW_DIRECTION)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_VIEW_SIDE_VECTOR", newSViv(Ogre::GpuProgramParameters::ACT_VIEW_SIDE_VECTOR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_VIEW_UP_VECTOR", newSViv(Ogre::GpuProgramParameters::ACT_VIEW_UP_VECTOR)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_FOV", newSViv(Ogre::GpuProgramParameters::ACT_FOV)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_NEAR_CLIP_DISTANCE", newSViv(Ogre::GpuProgramParameters::ACT_NEAR_CLIP_DISTANCE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_FAR_CLIP_DISTANCE", newSViv(Ogre::GpuProgramParameters::ACT_FAR_CLIP_DISTANCE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_PASS_NUMBER", newSViv(Ogre::GpuProgramParameters::ACT_PASS_NUMBER)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_PASS_ITERATION_NUMBER", newSViv(Ogre::GpuProgramParameters::ACT_PASS_ITERATION_NUMBER)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_ANIMATION_PARAMETRIC", newSViv(Ogre::GpuProgramParameters::ACT_ANIMATION_PARAMETRIC)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TEXEL_OFFSETS", newSViv(Ogre::GpuProgramParameters::ACT_TEXEL_OFFSETS)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_SCENE_DEPTH_RANGE", newSViv(Ogre::GpuProgramParameters::ACT_SCENE_DEPTH_RANGE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_SHADOW_SCENE_DEPTH_RANGE", newSViv(Ogre::GpuProgramParameters::ACT_SHADOW_SCENE_DEPTH_RANGE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_TEXTURE_SIZE", newSViv(Ogre::GpuProgramParameters::ACT_TEXTURE_SIZE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_INVERSE_TEXTURE_SIZE", newSViv(Ogre::GpuProgramParameters::ACT_INVERSE_TEXTURE_SIZE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACT_PACKED_TEXTURE_SIZE", newSViv(Ogre::GpuProgramParameters::ACT_PACKED_TEXTURE_SIZE)); // enum: ElementType newCONSTSUB(stash_Ogre__GpuProgramParameters, "ET_INT", newSViv(Ogre::GpuProgramParameters::ET_INT)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ET_REAL", newSViv(Ogre::GpuProgramParameters::ET_REAL)); // enum: ACDataType newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACDT_NONE", newSViv(Ogre::GpuProgramParameters::ACDT_NONE)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACDT_INT", newSViv(Ogre::GpuProgramParameters::ACDT_INT)); newCONSTSUB(stash_Ogre__GpuProgramParameters, "ACDT_REAL", newSViv(Ogre::GpuProgramParameters::ACDT_REAL)); HV *stash_Ogre__HardwareBuffer = gv_stashpv("Ogre::HardwareBuffer", TRUE); // enum: LockOptions newCONSTSUB(stash_Ogre__HardwareBuffer, "HBL_NORMAL", newSViv(Ogre::HardwareBuffer::HBL_NORMAL)); newCONSTSUB(stash_Ogre__HardwareBuffer, "HBL_DISCARD", newSViv(Ogre::HardwareBuffer::HBL_DISCARD)); newCONSTSUB(stash_Ogre__HardwareBuffer, "HBL_READ_ONLY", newSViv(Ogre::HardwareBuffer::HBL_READ_ONLY)); newCONSTSUB(stash_Ogre__HardwareBuffer, "HBL_NO_OVERWRITE", newSViv(Ogre::HardwareBuffer::HBL_NO_OVERWRITE)); // enum: Usage newCONSTSUB(stash_Ogre__HardwareBuffer, "HBU_STATIC", newSViv(Ogre::HardwareBuffer::HBU_STATIC)); newCONSTSUB(stash_Ogre__HardwareBuffer, "HBU_DYNAMIC", newSViv(Ogre::HardwareBuffer::HBU_DYNAMIC)); newCONSTSUB(stash_Ogre__HardwareBuffer, "HBU_WRITE_ONLY", newSViv(Ogre::HardwareBuffer::HBU_WRITE_ONLY)); newCONSTSUB(stash_Ogre__HardwareBuffer, "HBU_DISCARDABLE", newSViv(Ogre::HardwareBuffer::HBU_DISCARDABLE)); newCONSTSUB(stash_Ogre__HardwareBuffer, "HBU_STATIC_WRITE_ONLY", newSViv(Ogre::HardwareBuffer::HBU_STATIC_WRITE_ONLY)); newCONSTSUB(stash_Ogre__HardwareBuffer, "HBU_DYNAMIC_WRITE_ONLY", newSViv(Ogre::HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY)); newCONSTSUB(stash_Ogre__HardwareBuffer, "HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE", newSViv(Ogre::HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE)); HV *stash_Ogre__HardwareBufferManager = gv_stashpv("Ogre::HardwareBufferManager", TRUE); // enum: BufferLicenseType newCONSTSUB(stash_Ogre__HardwareBufferManager, "BLT_MANUAL_RELEASE", newSViv(Ogre::HardwareBufferManager::BLT_MANUAL_RELEASE)); newCONSTSUB(stash_Ogre__HardwareBufferManager, "BLT_AUTOMATIC_RELEASE", newSViv(Ogre::HardwareBufferManager::BLT_AUTOMATIC_RELEASE)); HV *stash_Ogre__HardwareIndexBuffer = gv_stashpv("Ogre::HardwareIndexBuffer", TRUE); // enum: IndexType newCONSTSUB(stash_Ogre__HardwareIndexBuffer, "IT_16BIT", newSViv(Ogre::HardwareIndexBuffer::IT_16BIT)); newCONSTSUB(stash_Ogre__HardwareIndexBuffer, "IT_32BIT", newSViv(Ogre::HardwareIndexBuffer::IT_32BIT)); HV *stash_Ogre__Image = gv_stashpv("Ogre::Image", TRUE); // enum: Filter newCONSTSUB(stash_Ogre__Image, "FILTER_NEAREST", newSViv(Ogre::Image::FILTER_NEAREST)); newCONSTSUB(stash_Ogre__Image, "FILTER_LINEAR", newSViv(Ogre::Image::FILTER_LINEAR)); newCONSTSUB(stash_Ogre__Image, "FILTER_BILINEAR", newSViv(Ogre::Image::FILTER_BILINEAR)); newCONSTSUB(stash_Ogre__Image, "FILTER_BOX", newSViv(Ogre::Image::FILTER_BOX)); newCONSTSUB(stash_Ogre__Image, "FILTER_TRIANGLE", newSViv(Ogre::Image::FILTER_TRIANGLE)); newCONSTSUB(stash_Ogre__Image, "FILTER_BICUBIC", newSViv(Ogre::Image::FILTER_BICUBIC)); HV *stash_Ogre__InstancedGeometry__InstancedObject = gv_stashpv("Ogre::InstancedGeometry::InstancedObject", TRUE); // enum: TransformSpace newCONSTSUB(stash_Ogre__InstancedGeometry__InstancedObject, "TS_LOCAL", newSViv(Ogre::InstancedGeometry::InstancedObject::TS_LOCAL)); newCONSTSUB(stash_Ogre__InstancedGeometry__InstancedObject, "TS_PARENT", newSViv(Ogre::InstancedGeometry::InstancedObject::TS_PARENT)); newCONSTSUB(stash_Ogre__InstancedGeometry__InstancedObject, "TS_WORLD", newSViv(Ogre::InstancedGeometry::InstancedObject::TS_WORLD)); HV *stash_Ogre__Light = gv_stashpv("Ogre::Light", TRUE); // enum: LightTypes newCONSTSUB(stash_Ogre__Light, "LT_POINT", newSViv(Ogre::Light::LT_POINT)); newCONSTSUB(stash_Ogre__Light, "LT_DIRECTIONAL", newSViv(Ogre::Light::LT_DIRECTIONAL)); newCONSTSUB(stash_Ogre__Light, "LT_SPOTLIGHT", newSViv(Ogre::Light::LT_SPOTLIGHT)); HV *stash_Ogre__Math = gv_stashpv("Ogre::Math", TRUE); // enum: AngleUnit newCONSTSUB(stash_Ogre__Math, "AU_DEGREE", newSViv(Ogre::Math::AU_DEGREE)); newCONSTSUB(stash_Ogre__Math, "AU_RADIAN", newSViv(Ogre::Math::AU_RADIAN)); HV *stash_Ogre__Node = gv_stashpv("Ogre::Node", TRUE); // enum: TransformSpace newCONSTSUB(stash_Ogre__Node, "TS_LOCAL", newSViv(Ogre::Node::TS_LOCAL)); newCONSTSUB(stash_Ogre__Node, "TS_PARENT", newSViv(Ogre::Node::TS_PARENT)); newCONSTSUB(stash_Ogre__Node, "TS_WORLD", newSViv(Ogre::Node::TS_WORLD)); HV *stash_Ogre__Particle = gv_stashpv("Ogre::Particle", TRUE); // enum: ParticleType newCONSTSUB(stash_Ogre__Particle, "Visual", newSViv(Ogre::Particle::Visual)); newCONSTSUB(stash_Ogre__Particle, "Emitter", newSViv(Ogre::Particle::Emitter)); HV *stash_Ogre__Pass = gv_stashpv("Ogre::Pass", TRUE); // enum: BuiltinHashFunction newCONSTSUB(stash_Ogre__Pass, "MIN_TEXTURE_CHANGE", newSViv(Ogre::Pass::MIN_TEXTURE_CHANGE)); newCONSTSUB(stash_Ogre__Pass, "MIN_GPU_PROGRAM_CHANGE", newSViv(Ogre::Pass::MIN_GPU_PROGRAM_CHANGE)); HV *stash_Ogre__PatchSurface = gv_stashpv("Ogre::PatchSurface", TRUE); // enum: ._100 newCONSTSUB(stash_Ogre__PatchSurface, "AUTO_LEVEL", newSViv(Ogre::PatchSurface::AUTO_LEVEL)); // enum: VisibleSide newCONSTSUB(stash_Ogre__PatchSurface, "VS_FRONT", newSViv(Ogre::PatchSurface::VS_FRONT)); newCONSTSUB(stash_Ogre__PatchSurface, "VS_BACK", newSViv(Ogre::PatchSurface::VS_BACK)); newCONSTSUB(stash_Ogre__PatchSurface, "VS_BOTH", newSViv(Ogre::PatchSurface::VS_BOTH)); // enum: PatchSurfaceType newCONSTSUB(stash_Ogre__PatchSurface, "PST_BEZIER", newSViv(Ogre::PatchSurface::PST_BEZIER)); HV *stash_Ogre__Plane = gv_stashpv("Ogre::Plane", TRUE); // enum: Side newCONSTSUB(stash_Ogre__Plane, "NO_SIDE", newSViv(Ogre::Plane::NO_SIDE)); newCONSTSUB(stash_Ogre__Plane, "POSITIVE_SIDE", newSViv(Ogre::Plane::POSITIVE_SIDE)); newCONSTSUB(stash_Ogre__Plane, "NEGATIVE_SIDE", newSViv(Ogre::Plane::NEGATIVE_SIDE)); newCONSTSUB(stash_Ogre__Plane, "BOTH_SIDE", newSViv(Ogre::Plane::BOTH_SIDE)); HV *stash_Ogre__QueuedRenderableCollection = gv_stashpv("Ogre::QueuedRenderableCollection", TRUE); // enum: OrganisationMode newCONSTSUB(stash_Ogre__QueuedRenderableCollection, "OM_PASS_GROUP", newSViv(Ogre::QueuedRenderableCollection::OM_PASS_GROUP)); newCONSTSUB(stash_Ogre__QueuedRenderableCollection, "OM_SORT_DESCENDING", newSViv(Ogre::QueuedRenderableCollection::OM_SORT_DESCENDING)); newCONSTSUB(stash_Ogre__QueuedRenderableCollection, "OM_SORT_ASCENDING", newSViv(Ogre::QueuedRenderableCollection::OM_SORT_ASCENDING)); HV *stash_Ogre__RenderOperation = gv_stashpv("Ogre::RenderOperation", TRUE); // enum: OperationType newCONSTSUB(stash_Ogre__RenderOperation, "OT_POINT_LIST", newSViv(Ogre::RenderOperation::OT_POINT_LIST)); newCONSTSUB(stash_Ogre__RenderOperation, "OT_LINE_LIST", newSViv(Ogre::RenderOperation::OT_LINE_LIST)); newCONSTSUB(stash_Ogre__RenderOperation, "OT_LINE_STRIP", newSViv(Ogre::RenderOperation::OT_LINE_STRIP)); newCONSTSUB(stash_Ogre__RenderOperation, "OT_TRIANGLE_LIST", newSViv(Ogre::RenderOperation::OT_TRIANGLE_LIST)); newCONSTSUB(stash_Ogre__RenderOperation, "OT_TRIANGLE_STRIP", newSViv(Ogre::RenderOperation::OT_TRIANGLE_STRIP)); newCONSTSUB(stash_Ogre__RenderOperation, "OT_TRIANGLE_FAN", newSViv(Ogre::RenderOperation::OT_TRIANGLE_FAN)); HV *stash_Ogre__RenderTarget = gv_stashpv("Ogre::RenderTarget", TRUE); // enum: StatFlags newCONSTSUB(stash_Ogre__RenderTarget, "SF_NONE", newSViv(Ogre::RenderTarget::SF_NONE)); newCONSTSUB(stash_Ogre__RenderTarget, "SF_FPS", newSViv(Ogre::RenderTarget::SF_FPS)); newCONSTSUB(stash_Ogre__RenderTarget, "SF_AVG_FPS", newSViv(Ogre::RenderTarget::SF_AVG_FPS)); newCONSTSUB(stash_Ogre__RenderTarget, "SF_BEST_FPS", newSViv(Ogre::RenderTarget::SF_BEST_FPS)); newCONSTSUB(stash_Ogre__RenderTarget, "SF_WORST_FPS", newSViv(Ogre::RenderTarget::SF_WORST_FPS)); newCONSTSUB(stash_Ogre__RenderTarget, "SF_TRIANGLE_COUNT", newSViv(Ogre::RenderTarget::SF_TRIANGLE_COUNT)); newCONSTSUB(stash_Ogre__RenderTarget, "SF_ALL", newSViv(Ogre::RenderTarget::SF_ALL)); HV *stash_Ogre__Resource = gv_stashpv("Ogre::Resource", TRUE); // enum: LoadingState newCONSTSUB(stash_Ogre__Resource, "LOADSTATE_UNLOADED", newSViv(Ogre::Resource::LOADSTATE_UNLOADED)); newCONSTSUB(stash_Ogre__Resource, "LOADSTATE_LOADING", newSViv(Ogre::Resource::LOADSTATE_LOADING)); newCONSTSUB(stash_Ogre__Resource, "LOADSTATE_LOADED", newSViv(Ogre::Resource::LOADSTATE_LOADED)); newCONSTSUB(stash_Ogre__Resource, "LOADSTATE_UNLOADING", newSViv(Ogre::Resource::LOADSTATE_UNLOADING)); HV *stash_Ogre__SceneManager = gv_stashpv("Ogre::SceneManager", TRUE); // enum: PrefabType newCONSTSUB(stash_Ogre__SceneManager, "PT_PLANE", newSViv(Ogre::SceneManager::PT_PLANE)); newCONSTSUB(stash_Ogre__SceneManager, "PT_CUBE", newSViv(Ogre::SceneManager::PT_CUBE)); newCONSTSUB(stash_Ogre__SceneManager, "PT_SPHERE", newSViv(Ogre::SceneManager::PT_SPHERE)); // enum: SpecialCaseRenderQueueMode newCONSTSUB(stash_Ogre__SceneManager, "SCRQM_INCLUDE", newSViv(Ogre::SceneManager::SCRQM_INCLUDE)); newCONSTSUB(stash_Ogre__SceneManager, "SCRQM_EXCLUDE", newSViv(Ogre::SceneManager::SCRQM_EXCLUDE)); // enum: IlluminationRenderStage newCONSTSUB(stash_Ogre__SceneManager, "IRS_NONE", newSViv(Ogre::SceneManager::IRS_NONE)); newCONSTSUB(stash_Ogre__SceneManager, "IRS_RENDER_TO_TEXTURE", newSViv(Ogre::SceneManager::IRS_RENDER_TO_TEXTURE)); newCONSTSUB(stash_Ogre__SceneManager, "IRS_RENDER_RECEIVER_PASS", newSViv(Ogre::SceneManager::IRS_RENDER_RECEIVER_PASS)); HV *stash_Ogre__SceneQuery = gv_stashpv("Ogre::SceneQuery", TRUE); // enum: WorldFragmentType newCONSTSUB(stash_Ogre__SceneQuery, "WFT_NONE", newSViv(Ogre::SceneQuery::WFT_NONE)); newCONSTSUB(stash_Ogre__SceneQuery, "WFT_PLANE_BOUNDED_REGION", newSViv(Ogre::SceneQuery::WFT_PLANE_BOUNDED_REGION)); newCONSTSUB(stash_Ogre__SceneQuery, "WFT_SINGLE_INTERSECTION", newSViv(Ogre::SceneQuery::WFT_SINGLE_INTERSECTION)); newCONSTSUB(stash_Ogre__SceneQuery, "WFT_CUSTOM_GEOMETRY", newSViv(Ogre::SceneQuery::WFT_CUSTOM_GEOMETRY)); newCONSTSUB(stash_Ogre__SceneQuery, "WFT_RENDER_OPERATION", newSViv(Ogre::SceneQuery::WFT_RENDER_OPERATION)); HV *stash_Ogre__Serializer = gv_stashpv("Ogre::Serializer", TRUE); // enum: Endian newCONSTSUB(stash_Ogre__Serializer, "ENDIAN_NATIVE", newSViv(Ogre::Serializer::ENDIAN_NATIVE)); newCONSTSUB(stash_Ogre__Serializer, "ENDIAN_BIG", newSViv(Ogre::Serializer::ENDIAN_BIG)); newCONSTSUB(stash_Ogre__Serializer, "ENDIAN_LITTLE", newSViv(Ogre::Serializer::ENDIAN_LITTLE)); HV *stash_Ogre__TextureUnitState = gv_stashpv("Ogre::TextureUnitState", TRUE); // enum: EnvMapType newCONSTSUB(stash_Ogre__TextureUnitState, "ENV_PLANAR", newSViv(Ogre::TextureUnitState::ENV_PLANAR)); newCONSTSUB(stash_Ogre__TextureUnitState, "ENV_CURVED", newSViv(Ogre::TextureUnitState::ENV_CURVED)); newCONSTSUB(stash_Ogre__TextureUnitState, "ENV_REFLECTION", newSViv(Ogre::TextureUnitState::ENV_REFLECTION)); newCONSTSUB(stash_Ogre__TextureUnitState, "ENV_NORMAL", newSViv(Ogre::TextureUnitState::ENV_NORMAL)); // enum: ContentType newCONSTSUB(stash_Ogre__TextureUnitState, "CONTENT_NAMED", newSViv(Ogre::TextureUnitState::CONTENT_NAMED)); newCONSTSUB(stash_Ogre__TextureUnitState, "CONTENT_SHADOW", newSViv(Ogre::TextureUnitState::CONTENT_SHADOW)); // enum: TextureCubeFace newCONSTSUB(stash_Ogre__TextureUnitState, "CUBE_FRONT", newSViv(Ogre::TextureUnitState::CUBE_FRONT)); newCONSTSUB(stash_Ogre__TextureUnitState, "CUBE_BACK", newSViv(Ogre::TextureUnitState::CUBE_BACK)); newCONSTSUB(stash_Ogre__TextureUnitState, "CUBE_LEFT", newSViv(Ogre::TextureUnitState::CUBE_LEFT)); newCONSTSUB(stash_Ogre__TextureUnitState, "CUBE_RIGHT", newSViv(Ogre::TextureUnitState::CUBE_RIGHT)); newCONSTSUB(stash_Ogre__TextureUnitState, "CUBE_UP", newSViv(Ogre::TextureUnitState::CUBE_UP)); newCONSTSUB(stash_Ogre__TextureUnitState, "CUBE_DOWN", newSViv(Ogre::TextureUnitState::CUBE_DOWN)); // enum: TextureAddressingMode newCONSTSUB(stash_Ogre__TextureUnitState, "TAM_WRAP", newSViv(Ogre::TextureUnitState::TAM_WRAP)); newCONSTSUB(stash_Ogre__TextureUnitState, "TAM_MIRROR", newSViv(Ogre::TextureUnitState::TAM_MIRROR)); newCONSTSUB(stash_Ogre__TextureUnitState, "TAM_CLAMP", newSViv(Ogre::TextureUnitState::TAM_CLAMP)); newCONSTSUB(stash_Ogre__TextureUnitState, "TAM_BORDER", newSViv(Ogre::TextureUnitState::TAM_BORDER)); // enum: TextureEffectType newCONSTSUB(stash_Ogre__TextureUnitState, "ET_ENVIRONMENT_MAP", newSViv(Ogre::TextureUnitState::ET_ENVIRONMENT_MAP)); newCONSTSUB(stash_Ogre__TextureUnitState, "ET_PROJECTIVE_TEXTURE", newSViv(Ogre::TextureUnitState::ET_PROJECTIVE_TEXTURE)); newCONSTSUB(stash_Ogre__TextureUnitState, "ET_UVSCROLL", newSViv(Ogre::TextureUnitState::ET_UVSCROLL)); newCONSTSUB(stash_Ogre__TextureUnitState, "ET_USCROLL", newSViv(Ogre::TextureUnitState::ET_USCROLL)); newCONSTSUB(stash_Ogre__TextureUnitState, "ET_VSCROLL", newSViv(Ogre::TextureUnitState::ET_VSCROLL)); newCONSTSUB(stash_Ogre__TextureUnitState, "ET_ROTATE", newSViv(Ogre::TextureUnitState::ET_ROTATE)); newCONSTSUB(stash_Ogre__TextureUnitState, "ET_TRANSFORM", newSViv(Ogre::TextureUnitState::ET_TRANSFORM)); // enum: BindingType newCONSTSUB(stash_Ogre__TextureUnitState, "BT_FRAGMENT", newSViv(Ogre::TextureUnitState::BT_FRAGMENT)); newCONSTSUB(stash_Ogre__TextureUnitState, "BT_VERTEX", newSViv(Ogre::TextureUnitState::BT_VERTEX)); // enum: TextureTransformType newCONSTSUB(stash_Ogre__TextureUnitState, "TT_TRANSLATE_U", newSViv(Ogre::TextureUnitState::TT_TRANSLATE_U)); newCONSTSUB(stash_Ogre__TextureUnitState, "TT_TRANSLATE_V", newSViv(Ogre::TextureUnitState::TT_TRANSLATE_V)); newCONSTSUB(stash_Ogre__TextureUnitState, "TT_SCALE_U", newSViv(Ogre::TextureUnitState::TT_SCALE_U)); newCONSTSUB(stash_Ogre__TextureUnitState, "TT_SCALE_V", newSViv(Ogre::TextureUnitState::TT_SCALE_V)); newCONSTSUB(stash_Ogre__TextureUnitState, "TT_ROTATE", newSViv(Ogre::TextureUnitState::TT_ROTATE)); HV *stash_Ogre__VertexAnimationTrack = gv_stashpv("Ogre::VertexAnimationTrack", TRUE); // enum: TargetMode newCONSTSUB(stash_Ogre__VertexAnimationTrack, "TM_SOFTWARE", newSViv(Ogre::VertexAnimationTrack::TM_SOFTWARE)); newCONSTSUB(stash_Ogre__VertexAnimationTrack, "TM_HARDWARE", newSViv(Ogre::VertexAnimationTrack::TM_HARDWARE)); HV *stash_Ogre__VertexCacheProfiler = gv_stashpv("Ogre::VertexCacheProfiler", TRUE); // enum: CacheType newCONSTSUB(stash_Ogre__VertexCacheProfiler, "FIFO", newSViv(Ogre::VertexCacheProfiler::FIFO)); newCONSTSUB(stash_Ogre__VertexCacheProfiler, "LRU", newSViv(Ogre::VertexCacheProfiler::LRU)); ////////// GENERATED CONSTANTS END // special additions.... // stash_Ogre__Math is from above newCONSTSUB(stash_Ogre__Math, "POS_INFINITY", newSVnv(Ogre::Math::POS_INFINITY)); newCONSTSUB(stash_Ogre__Math, "NEG_INFINITY", newSVnv(Ogre::Math::NEG_INFINITY)); newCONSTSUB(stash_Ogre__Math, "PI", newSVnv(Ogre::Math::PI)); newCONSTSUB(stash_Ogre__Math, "TWO_PI", newSVnv(Ogre::Math::TWO_PI)); newCONSTSUB(stash_Ogre__Math, "HALF_PI", newSVnv(Ogre::Math::HALF_PI)); newCONSTSUB(stash_Ogre__Math, "fDeg2Rad", newSVnv(Ogre::Math::fDeg2Rad)); newCONSTSUB(stash_Ogre__Math, "fRad2Deg", newSVnv(Ogre::Math::fRad2Deg)); } Ogre-0.60/PerlOGREFrameListener.h0000644000175000017500000000112412146460465016756 0ustar slanningslanning#ifndef _PERLOGRE_FRAMELISTENER_H_ #define _PERLOGRE_FRAMELISTENER_H_ #include "PerlOGRECallback.h" using namespace std; // this class implements Ogre::FrameListener, // so it can be passed to Root->addFrameListener // but still allowing implementing the callbacks from Perl class PerlOGREFrameListener : public PerlOGRECallback, public Ogre::FrameListener { public: PerlOGREFrameListener(SV *pobj); // FrameListener interface bool frameStarted(const Ogre::FrameEvent &evt); bool frameEnded(const Ogre::FrameEvent &evt); }; #endif /* define _PERLOGRE_FRAMELISTENER_H_ */ Ogre-0.60/PerlOGREControllerFunction.h0000644000175000017500000000057212146460465020055 0ustar slanningslanning#ifndef _PERLOGRE_CONTROLLERFUNCTION_H_ #define _PERLOGRE_CONTROLLERFUNCTION_H_ #include "PerlOGRECallback.h" class PerlOGREControllerFunction : public PerlOGRECallback, public Ogre::ControllerFunction { public: PerlOGREControllerFunction(SV *pobj); Ogre::Real calculate(Ogre::Real sourceValue); }; #endif /* define _PERLOGRE_CONTROLLERFUNCTION_H_ */ Ogre-0.60/PerlOGREControllerValue.h0000644000175000017500000000061412146460465017341 0ustar slanningslanning#ifndef _PERLOGRE_CONTROLLERVALUE_H_ #define _PERLOGRE_CONTROLLERVALUE_H_ #include "PerlOGRECallback.h" class PerlOGREControllerValue : public PerlOGRECallback, public Ogre::ControllerValue { public: PerlOGREControllerValue(SV *pobj); virtual Ogre::Real getValue() const; virtual void setValue(Ogre::Real value); }; #endif /* define _PERLOGRE_CONTROLLERVALUE_H_ */ Ogre-0.60/PerlOGRECallbackManager.cpp0000644000175000017500000001156312146460465017550 0ustar slanningslanning#include "PerlOGRECallbackManager.h" #include using namespace std; PerlOGRECallbackManager::PerlOGRECallbackManager() { } PerlOGRECallbackManager::~PerlOGRECallbackManager() { // clean up addFrameListener for (FrameListenerMap::iterator it = mFrameListenerMap.begin(); it != mFrameListenerMap.end(); ++it) { delete it->second; } mFrameListenerMap.clear(); // clean up addWindowEventListener mWinEvtListenerWindowMMap.clear(); for (WinEvtListenerMap::iterator it = mWinEvtListenerMap.begin(); it != mWinEvtListenerMap.end(); ++it) { delete it->second; } mWinEvtListenerMap.clear(); } void PerlOGRECallbackManager::addFrameListener(SV *pobj, Ogre::Root *root) { if (sv_isobject(pobj)) { PerlOGREFrameListener *fl = new PerlOGREFrameListener(pobj); HV *stash = SvSTASH(SvRV(pobj)); string pkgname(HvNAME(stash)); // add to the manager // (note: won't insert if pkgname already has a listener, // that's how maps work) pair insertPair; insertPair = mFrameListenerMap.insert(FrameListenerMap::value_type(pkgname, static_cast(fl))); if (insertPair.second) { // add to Root if inserting worked (i.e. didn't already exist) root->addFrameListener(fl); } else { warn("FrameListener %s not added (probably already added)\n", pkgname.c_str()); } } else { croak("Argument to addFrameListener has to be an object\n"); } } void PerlOGRECallbackManager::removeFrameListener(SV *pobj, Ogre::Root *root) { // get package name from object HV *stash = SvSTASH(SvRV(pobj)); string pkgname(HvNAME(stash)); FrameListenerMap::iterator it = mFrameListenerMap.find(pkgname); if (it != mFrameListenerMap.end()) { // remove from Root root->removeFrameListener(it->second); // remove from the manager delete it->second; mFrameListenerMap.erase(it); } else { warn("removeFrameListener: %s didn't have a FrameListener, so not removed", pkgname.c_str()); } } void PerlOGRECallbackManager::addWindowEventListener(SV *pobj, Ogre::RenderWindow *win) { if (sv_isobject(pobj)) { PerlOGREWindowEventListener *wel = new PerlOGREWindowEventListener(pobj); // As with FrameListener, we keep track of the Perl pkgname for each // C++ listener HV *stash = SvSTASH(SvRV(pobj)); string pkgname(HvNAME(stash)); mWinEvtListenerMap.insert(WinEvtListenerMap::value_type(pkgname, static_cast(wel))); // Now, we can have multiple listeners per window, // and multiple windows per listener, // so we also keep track of which Windows are associated // with each Perl package // find out if pkg is already mapped to this win; // if so, don't insert and ignore all this bool doInsert = true; WinEvtListenerWindowMMap::iterator it = mWinEvtListenerWindowMMap.find(pkgname); while (it != mWinEvtListenerWindowMMap.end() && it->first == pkgname) { if (it->second == win) { doInsert = false; break; } ++it; } if (doInsert) { mWinEvtListenerWindowMMap.insert(WinEvtListenerWindowMMap::value_type(pkgname, win)); // do the C++ (the whole point of this manager crap :) Ogre::WindowEventUtilities::addWindowEventListener(win, wel); } } else { croak("Argument to addWindowEventListener has to be an object\n"); } } void PerlOGRECallbackManager::removeWindowEventListener(SV *pobj, Ogre::RenderWindow *win) { HV *stash = SvSTASH(SvRV(pobj)); string pkgname(HvNAME(stash)); WinEvtListenerMap::iterator mit = mWinEvtListenerMap.find(pkgname); if (mit != mWinEvtListenerMap.end()) { // First remove the listener->window mapping WinEvtListenerWindowMMap::iterator mmit = mWinEvtListenerWindowMMap.find(pkgname); while (mmit != mWinEvtListenerWindowMMap.end() && mmit->first == pkgname) { if (mmit->second == win) { // do the C++ part Ogre::WindowEventUtilities::removeWindowEventListener(win, mit->second); // and take it out of the manager mWinEvtListenerWindowMMap.erase(mmit); } ++mmit; } // Also, if that was the last window, get rid of the // pkgname-listener mapping if (mWinEvtListenerWindowMMap.empty()) { delete mit->second; // cleanup object created in addWindowEventListener mWinEvtListenerMap.erase(mit); } } else { warn("removeWindowEventListener: %s didn't have a WindowEventListener, so not removed", pkgname.c_str()); } } Ogre-0.60/examples/0000755000175000017500000000000012162410433014351 5ustar slanningslanningOgre-0.60/examples/skeletalanim.pl0000755000175000017500000002204312146460465017377 0ustar slanningslanning#!/usr/bin/perl # This is OGRE's sample application "SkeletalAnimation" in Perl; # see Samples/SkeletalAnimation/ in the OGRE distribution. package SkeletalAnimationFrameListener; use strict; use warnings; use Ogre::ExampleFrameListener; @SkeletalAnimationFrameListener::ISA = qw(Ogre::ExampleFrameListener); use Ogre 0.30; use Ogre::Degree; use Ogre::Quaternion; use Ogre::Vector3; sub new { # appconf replaces all the global variables # that the C++ version used my ($pkg, $win, $cam, $appconf) = @_; my $super = $pkg->SUPER::new($win, $cam); my $self = bless $super, $pkg; foreach my $key (keys %$appconf) { $self->{$key} = $appconf->{$key}; } $self->{mUP} = Ogre::Vector3->new(0, 1, 0); return $self; } sub frameStarted { my ($self, $evt) = @_; return 0 unless $self->SUPER::frameStarted($evt); for (my $i = 0; $i < $self->{NUM_JAIQUAS}; $i++) { my $inc = $evt->timeSinceLastFrame * $self->{mAnimationSpeed}->[$i]; if ($self->{mAnimState}->[$i]->getTimePosition + $inc >= $self->{mAnimChop}) { # Loop # Need to reposition the scene node origin since animation includes translation # Calculate as an offset to the end position, rotated by the # amount the animation turns the character my $scenenode = $self->{mSceneNode}->[$i]; my $rot = Ogre::Quaternion->new($self->{mAnimationRotation}, $self->{mUP}); my $snorient = $scenenode->getOrientation; my $startoffset = $snorient * -$self->{mSneakStartOffset}; my $endoffset = $self->{mSneakEndOffset}; my $offset = $rot * $startoffset; my $currEnd = $snorient * $endoffset + $scenenode->getPosition; $scenenode->setPosition($currEnd + $offset); $scenenode->rotate($rot); my $timepos = $self->{mAnimState}->[$i]->getTimePosition + $inc - $self->{mAnimChop}; $self->{mAnimState}->[$i]->setTimePosition($timepos); } else { $self->{mAnimState}->[$i]->addTime($inc); } } return 1; } 1; package SkeletalApplication; use strict; use warnings; use Ogre::ExampleApplication; @SkeletalApplication::ISA = qw(Ogre::ExampleApplication); use Ogre 0.30 qw(:ShadowTechnique); use Ogre::Animation qw(:InterpolationMode :RotationInterpolationMode); use Ogre::ColourValue; use Ogre::Light qw(:LightTypes); use Ogre::Math; use Ogre::Plane; use Ogre::Quaternion; use Ogre::Radian; use Ogre::ResourceGroupManager qw(:GroupName); use Ogre::SkeletonManager; use Ogre::TimeIndex; use Ogre::Vector3; sub new { my ($pkg) = @_; my $super = $pkg->SUPER::new(); my $self = bless $super, $pkg; $self->{appconf} = { mDebugText => '', mAnimationSpeed => [], mAnimState => [], mSneakStartOffset => Ogre::Vector3->new(), mSneakEndOffset => Ogre::Vector3->new(), mOrientations => [], mBasePositions => [], mSceneNode => [], mAnimationRotation => Ogre::Degree->new(-60), mAnimChop => 7.96666, mAnimChopBlend => 0.3, NUM_JAIQUAS => 6, }; return $self; } sub createScene { my ($self) = @_; my $scenemgr = $self->{mSceneMgr}; $scenemgr->setShadowTechnique(SHADOWTYPE_TEXTURE_MODULATIVE); $scenemgr->setShadowTextureSize(512); $scenemgr->setShadowColour(Ogre::ColourValue->new(0.6, 0.6, 0.6)); # Setup animation default Ogre::Animation->setDefaultInterpolationMode(IM_LINEAR); Ogre::Animation->setDefaultRotationInterpolationMode(RIM_LINEAR); # ambient light $scenemgr->setAmbientLight(Ogre::ColourValue->new(0.5, 0.5, 0.5)); # The jaiqua sneak animation doesn't loop properly, so lets hack it so it does # We want to copy the initial keyframes of all bones, but alter the Spineroot # to give it an offset of where the animation ends my $skelmgr = Ogre::SkeletonManager->getSingletonPtr; my $skel = $skelmgr->load("jaiqua.skeleton", DEFAULT_RESOURCE_GROUP_NAME); my $anim = $skel->getAnimation("Sneak"); # Note: getNodeTrackAref replaces getNodeTrackIterator foreach my $track (@{ $anim->getNodeTrackAref }) { # Note: C++ API passes in pointer for 2nd arg to fish out the KeyFrame, # but the Perl interface just returns it instead my $oldKf = $track->getInterpolatedKeyFrame(Ogre::TimeIndex->new($self->{appconf}{mAnimChop})); # Drop all keyframes after the chop while ($track->getKeyFrame($track->getNumKeyFrames - 1)->getTime >= $self->{appconf}{mAnimChop} - $self->{appconf}{mAnimChopBlend}) { $track->removeKeyFrame($track->getNumKeyFrames - 1); } my $newKf = $track->createNodeKeyFrame($self->{appconf}{mAnimChop}); my $startKf = $track->getNodeKeyFrame(0); my $bone = $skel->getBone($track->getHandle); if ($bone->getName eq "Spineroot") { $self->{appconf}{mSneakStartOffset} = $startKf->getTranslate + $bone->getInitialPosition; $self->{appconf}{mSneakEndOffset} = $oldKf->getTranslate + $bone->getInitialPosition; $self->{appconf}{mSneakStartOffset}->setY($self->{appconf}{mSneakEndOffset}->y); # Adjust spine root relative to new location $newKf->setRotation($oldKf->getRotation); $newKf->setTranslate($oldKf->getTranslate); $newKf->setScale($oldKf->getScale); } else { $newKf->setRotation($startKf->getRotation); $newKf->setTranslate($startKf->getTranslate); $newKf->setScale($startKf->getScale); } } my $rotInc = Ogre::Math->TWO_PI / $self->{appconf}{NUM_JAIQUAS}; my $rot = 0.0; my $ent; for (my $i = 0; $i < $self->{appconf}{NUM_JAIQUAS}; $i++) { my $q = Ogre::Quaternion->new(); # quaternion ==> rotation $q->FromAngleAxis(Ogre::Radian->new($rot), Ogre::Vector3->new(0, 1, 0)); $self->{appconf}{mOrientations}->[$i] = $q; $self->{appconf}{mBasePositions}->[$i] = $q * Ogre::Vector3->new(0, 0, -20); $ent = $scenemgr->createEntity("jaiqua$i", "jaiqua.mesh"); $self->{appconf}{mSceneNode}->[$i] = $scenemgr->getRootSceneNode->createChildSceneNode(); $self->{appconf}{mSceneNode}->[$i]->attachObject($ent); $self->{appconf}{mSceneNode}->[$i]->rotate($q); $self->{appconf}{mSceneNode}->[$i]->translate($self->{appconf}{mBasePositions}->[$i]); $self->{appconf}{mAnimState}->[$i] = $ent->getAnimationState("Sneak"); $self->{appconf}{mAnimState}->[$i]->setEnabled(1); $self->{appconf}{mAnimState}->[$i]->setLoop(0); # manual loop since translation involved $self->{appconf}{mAnimationSpeed}->[$i] = Ogre::Math->RangeRandom(0.5, 1.5); $rot += $rotInc; } # Give it a little ambience with lights my $l = $scenemgr->createLight("BlueLight"); $l->setType(LT_SPOTLIGHT); $l->setPosition(-200, 150, -100); # xxx : need to do 'neg' overload for Vector3 ? my $dir = - $l->getPosition(); $dir->normalise(); $l->setDirection($dir); $l->setDiffuseColour(0.5, 0.5, 1.0); $l = $scenemgr->createLight("GreenLight"); $l->setType(LT_SPOTLIGHT); $l->setPosition(0, 150, -100); # xxx : need to do 'neg' overload for Vector3 ? $dir = - $l->getPosition(); $dir->normalise(); $l->setDirection($dir); $l->setDiffuseColour(0.5, 1.0, 0.5); # position the camera $self->{mCamera}->setPosition(100, 20, 0); $self->{mCamera}->lookAt(0, 10, 0); # Report whether hardware skinning is enabled or not my $t = $ent->getSubEntity(0)->getMaterial->getBestTechnique; my $p = $t->getPass(0); if ($p->hasVertexProgram && $p->getVertexProgram->isSkeletalAnimationIncluded) { $self->{appconf}{mDebugText} = "Hardware skinning is enabled"; } else { $self->{appconf}{mDebugText} = "Software skinning is enabled"; } my $plane = Ogre::Plane->new(); $plane->setNormal(Ogre::Vector3->new(0, 1, 0)); $plane->setD(100); my $meshmgr = Ogre::MeshManager->getSingletonPtr(); $meshmgr->createPlane("Myplane", DEFAULT_RESOURCE_GROUP_NAME, $plane, 1500, 1500, 20, 20, 1, 1, 60, 60, Ogre::Vector3->new(0, 0, 1)); my $pPlaneEnt = $scenemgr->createEntity("plane", "Myplane"); $pPlaneEnt->setMaterialName("Examples/Rockwall"); $pPlaneEnt->setCastShadows(0); my $kidnode = $scenemgr->getRootSceneNode->createChildSceneNode(Ogre::Vector3->new(0, 99, 0)); $kidnode->attachObject($pPlaneEnt); } sub createFrameListener { my ($self) = @_; $self->{mFrameListener} = SkeletalAnimationFrameListener->new($self->{mWindow}, $self->{mCamera}, $self->{appconf}); # $self->{mFrameListener}->showDebugOverlay(1); $self->{mRoot}->addFrameListener($self->{mFrameListener}); } 1; package main; # uncomment this if the packages are in separate files: # use SkeletalApplication; SkeletalApplication->new->go(); Ogre-0.60/examples/cameratrack.pl0000755000175000017500000001044212146460465017203 0ustar slanningslanning#!/usr/bin/perl # This is OGRE's sample application "CameraTrack" in Perl; # see Samples/CameraTrack/ in the OGRE distribution. package CameraTrackListener; use strict; use warnings; use Ogre::ExampleFrameListener; @CameraTrackListener::ISA = qw(Ogre::ExampleFrameListener); use Ogre 0.29; sub new { # note: "mAnimState" is a global variable in the C++ version, # but I moved it into the App package my ($pkg, $win, $cam, $animstate) = @_; my $super = $pkg->SUPER::new($win, $cam); my $self = bless $super, $pkg; $self->{mAnimState} = $animstate; return $self; } sub frameStarted { my ($self, $evt) = @_; return 0 unless $self->SUPER::frameStarted($evt); $self->{mAnimState}->addTime($evt->timeSinceLastFrame); return 1; } 1; package CameraTrackApplication; use strict; use warnings; use Ogre::ExampleApplication; @CameraTrackApplication::ISA = qw(Ogre::ExampleApplication); use Ogre 0.29 qw(:FogMode); use Ogre::Animation qw(:InterpolationMode); use Ogre::ColourValue; use Ogre::Plane; use Ogre::ResourceGroupManager qw(:GroupName); use Ogre::Vector3; sub new { my ($pkg) = @_; my $super = $pkg->SUPER::new(); my $self = bless $super, $pkg; return $self; } sub createScene { my ($self) = @_; my $scenemgr = $self->{mSceneMgr}; # ambient light $scenemgr->setAmbientLight(Ogre::ColourValue->new(0.2, 0.2, 0.2)); # sky dome $scenemgr->setSkyDome(1, "Examples/CloudySky", 5, 8); # create a light (defaults: point light, white diffuse) my $light = $scenemgr->createLight("MainLight"); $light->setPosition(20, 80, 50); # floor plane mesh my $plane = Ogre::Plane->new(); $plane->setNormal(Ogre::Vector3->new(0, 1, 0)); $plane->setD(200); my $meshmgr = Ogre::MeshManager->getSingletonPtr(); $meshmgr->createPlane("FloorPlane", DEFAULT_RESOURCE_GROUP_NAME, $plane, 200000, 200000, 20, 20, 1, 1, 50, 50, Ogre::Vector3->new(0, 0, 1)); # create floor entity my $ent = $scenemgr->createEntity("floor", "FloorPlane"); $ent->setMaterialName("Examples/RustySteel"); # Attach to child of root node, better for culling (otherwise bounds are the combination of the 2) $scenemgr->getRootSceneNode->createChildSceneNode->attachObject($ent); # add a head my $headnode = $scenemgr->getRootSceneNode->createChildSceneNode(); my $ent = $scenemgr->createEntity("head", "ogrehead.mesh"); $headnode->attachObject($ent); # make camera track head $self->{mCamera}->setAutoTracking(1, $headnode); # create cam node and attach cam my $camnode = $scenemgr->getRootSceneNode->createChildSceneNode(); $camnode->attachObject($self->{mCamera}); # set up spline animation of node my $anim = $scenemgr->createAnimation("CameraTrack", 10); # spline it for nice curves $anim->setInterpolationMode(IM_SPLINE); # Create a track to animate the camera's node my $track = $anim->createNodeTrack(0, $camnode); # set up keyframes my $key = $track->createNodeKeyFrame(0); $key = $track->createNodeKeyFrame(2.5); $key->setTranslate(Ogre::Vector3->new(500, 500, -1000)); $key = $track->createNodeKeyFrame(5); $key->setTranslate(Ogre::Vector3->new(-1500, 1000, -600)); $key = $track->createNodeKeyFrame(7.5); $key->setTranslate(Ogre::Vector3->new(0, -100, 0)); $key = $track->createNodeKeyFrame(10); $key->setTranslate(Ogre::Vector3->new(0, 0, 0)); # Create a new animation state to track this $self->{mAnimState} = $scenemgr->createAnimationState("CameraTrack"); $self->{mAnimState}->setEnabled(1); # Put in a bit of fog for the hell of it $scenemgr->setFog(FOG_EXP, Ogre::ColourValue->new(), 0.0002); } sub createFrameListener { my ($self) = @_; $self->{mFrameListener} = CameraTrackListener->new($self->{mWindow}, $self->{mCamera}, $self->{mAnimState}); $self->{mFrameListener}->showDebugOverlay(1); $self->{mRoot}->addFrameListener($self->{mFrameListener}); } 1; package main; # uncomment this if the packages are in separate files: # use CameraTrackApplication; CameraTrackApplication->new->go(); Ogre-0.60/examples/sky.pl0000755000175000017500000000545312162406635015537 0ustar slanningslanning#!/usr/bin/perl # This is OGRE's "Basic Tutorial 3", but in Perl. # Read that tutorial. # Note: in createScene, I made it where you can set # $fog and $sky parameters. package TutorialApplication; use strict; use warnings; use Ogre::ExampleApplication; @TutorialApplication::ISA = qw(Ogre::ExampleApplication); use Ogre 0.27 qw(:SceneType :FogMode); use Ogre::ColourValue; use Ogre::Plane; use Ogre::ResourceGroupManager qw(:GroupName); use Ogre::SceneManager; use Ogre::Quaternion; use Ogre::Vector3; sub chooseSceneManager { my ($self) = @_; $self->{mSceneMgr} = $self->{mRoot}->createSceneManager(ST_EXTERIOR_CLOSE, "Tute3"); } sub createScene { my ($self) = @_; my $mgr = $self->{mSceneMgr}; # select which fog you want to use my $fog = '0'; my $darkfog = 0; if ($fog) { my $fadeColour = $darkfog ? Ogre::ColourValue->new(0.1, 0.1, 0.1) : Ogre::ColourValue->new(0.9, 0.9, 0.9); $self->{mWindow}->getViewport(0)->setBackgroundColour($fadeColour); if ($fog eq 'linear') { if ($darkfog) { $mgr->setFog(FOG_LINEAR, $fadeColour, 0.0, 10, 150); } else { $mgr->setFog(FOG_LINEAR, $fadeColour, 0.0, 50, 500); } } elsif ($fog eq 'exp') { $mgr->setFog(FOG_EXP, $fadeColour, 0.005); } elsif ($fog eq 'exp2') { $mgr->setFog(FOG_EXP2, $fadeColour, 0.003); } } # load the terrain (do this after setFog) $mgr->setWorldGeometry("terrain.cfg"); # select which scene you want to show my $sky = 'dome'; if ($sky eq 'box') { $mgr->setSkyBox(1, "Examples/SpaceSkyBox", 5000, 0, Ogre::Quaternion->new(1, 0, 0, 0), DEFAULT_RESOURCE_GROUP_NAME ); } elsif ($sky eq 'dome') { $mgr->setSkyDome(1, "Examples/CloudySky", 5, 8, 4000, 1, Ogre::Quaternion->new(1, 0, 0, 0), 16, 16, -1, DEFAULT_RESOURCE_GROUP_NAME ); } elsif ($sky eq 'plane') { my $plane = Ogre::Plane->new(); # Note: Ogre::Plane->new(Ogre::Vector3->new(0, -1, 0), 10) # is not the same! $plane->setD($darkfog ? 10 : 1000); $plane->setNormal(Ogre::Vector3->new(0, -1, 0)); # annoying here that last arg is required $mgr->setSkyPlane(1, $plane, "Examples/SpaceSkyPlane", ($darkfog ? 100 : 1500), 45, 1, 0.5, 150, 150, DEFAULT_RESOURCE_GROUP_NAME); } } 1; package main; # uncomment this if the packages are in separate files: # use TutorialApplication; TutorialApplication->new->go(); Ogre-0.60/examples/lighting.pl0000755000175000017500000002036212146460465016535 0ustar slanningslanning#!/usr/bin/perl # This is OGRE's sample application "Lighting" in Perl; # see Samples/Lighting/ in the OGRE distribution. # note: this example is a bit incomplete # because I didn't implement the part that was commented out # in the C++ version, so it doesn't even use the ControllerValue # or ControllerFunction classes yet... package LightFlasher; # implements ControllerValueReal (ControllerValue) interface # N.B. DO NOT INHERIT from ControllerValueReal use strict; use warnings; use Ogre 0.32; use Ogre::ColourValue; sub new { my ($pkg, $light, $billboard, $maxColour) = @_; my $self = bless { mLight => $light, mBillboard => $billboard, mMaxColour => $maxColour, intensity => undef, }, $pkg; return $self; } # getValue and setValue are for implementing ControllerValueReal sub getValue { my ($self) = @_; return $self->{intensity}; } sub setValue { my ($self, $value) = @_; $self->{intensity} = $value; my $maxColour = $self->{mMaxColour}; my $newColour = Ogre::ColourValue->new($maxColour->r * $value, $maxColour->g * $value, $maxColour->b * $value); $self->{mLight}->setDiffuseColour($newColour); $self->{mBillboard}->setColour($newColour); } 1; package LightFlasherControllerFunction; # implements ControllerFunctionReal (ControllerFunction) interface # N.B. DO NOT INHERIT from ControllerFunctionReal use strict; use warnings; use Ogre 0.32 qw(:WaveformType); use Ogre::WaveformControllerFunction; # Note: it is OK to inherit from other ControllerFunction classes like here @LightFlasherControllerFunction::ISA = qw(Ogre::WaveformControllerFunction); sub new { my ($pkg, $wavetype, $frequency, $phase) = @_; # all taken care of by base class my $super = $pkg->SUPER::new($wavetype, 0, $frequency, $phase, 1, 1); my $self = bless $super, $pkg; return $self; } 1; package LightingListener; use strict; use warnings; use Ogre::ExampleFrameListener; @LightingListener::ISA = qw(Ogre::ExampleFrameListener); use Ogre 0.32; sub new { # note: mAnimStateList is a global in the C++ sample, # but I passed it as an arg here from the app class my ($pkg, $win, $cam, $animStateList) = @_; my $super = $pkg->SUPER::new($win, $cam); my $self = bless $super, $pkg; $self->{mAnimStateList} = $animStateList; return $self; } sub frameStarted { my ($self, $evt) = @_; return 0 unless $self->SUPER::frameStarted($evt); my $deltaT = $evt->timeSinceLastFrame; $_->addTime($deltaT) for @{ $self->{mAnimStateList} }; return 1; } 1; package LightingApplication; use strict; use warnings; use Ogre::ExampleApplication; @LightingApplication::ISA = qw(Ogre::ExampleApplication); use Ogre 0.32; use Ogre::Animation qw(:InterpolationMode); use Ogre::ColourValue; use Ogre::Light qw(:LightTypes); use Ogre::Vector3; sub new { my ($pkg) = @_; my $super = $pkg->SUPER::new(); my $self = bless $super, $pkg; $self->{mAnimStateList} = []; # gets passed to frame listener # skip all the declarations done in C++ return $self; } sub createScene { my ($self) = @_; my $scenemgr = $self->{mSceneMgr}; $scenemgr->setAmbientLight(Ogre::ColourValue->new(0.1, 0.1, 0.1)); $scenemgr->setSkyBox(1, "Examples/SpaceSkyBox"); my $head = $scenemgr->createEntity("head", "ogrehead.mesh"); $scenemgr->getRootSceneNode->attachObject($head); $self->setupTrailLights(); } sub setupTrailLights { my ($self) = @_; my $scenemgr = $self->{mSceneMgr}; $scenemgr->setAmbientLight(Ogre::ColourValue->new(0.5, 0.5, 0.5)); my $dir = Ogre::Vector3->new(-1, -1, 0.5); $dir->normalise(); my $l = $scenemgr->createLight("light1"); $l->setType(LT_DIRECTIONAL); $l->setDirection($dir); # note: instead of calling createMovableObject with a params arg, # as the C++ sample does, we call createRibbonTrail plus two methods. # At least for now it has to be done that way # because of the way the XS is currently implemented # (need static_cast, etc., within the XS for createMovableObject) my $trail = $scenemgr->createRibbonTrail("1"); $trail->setNumberOfChains(2); $trail->setMaxChainElements(80); $trail->setMaterialName("Examples/LightRibbonTrail"); $trail->setTrailLength(400); $scenemgr->getRootSceneNode()->createChildSceneNode()->attachObject($trail); # Create 3 nodes for trail to follow my $animNode = $scenemgr->getRootSceneNode()->createChildSceneNode(); $animNode->setPosition(50,30,0); my $anim = $scenemgr->createAnimation("an1", 14); $anim->setInterpolationMode(IM_SPLINE); my $track = $anim->createNodeTrack(1, $animNode); my $kf = $track->createNodeKeyFrame(0); $kf->setTranslate(Ogre::Vector3->new(50,30,0)); $kf = $track->createNodeKeyFrame(2); $kf->setTranslate(Ogre::Vector3->new(100, -30, 0)); $kf = $track->createNodeKeyFrame(4); $kf->setTranslate(Ogre::Vector3->new(120, -100, 150)); $kf = $track->createNodeKeyFrame(6); $kf->setTranslate(Ogre::Vector3->new(30, -100, 50)); $kf = $track->createNodeKeyFrame(8); $kf->setTranslate(Ogre::Vector3->new(-50, 30, -50)); $kf = $track->createNodeKeyFrame(10); $kf->setTranslate(Ogre::Vector3->new(-150, -20, -100)); $kf = $track->createNodeKeyFrame(12); $kf->setTranslate(Ogre::Vector3->new(-50, -30, 0)); $kf = $track->createNodeKeyFrame(14); $kf->setTranslate(Ogre::Vector3->new(50,30,0)); my $animState = $scenemgr->createAnimationState("an1"); $animState->setEnabled(1); push @{ $self->{mAnimStateList} }, $animState; $trail->setInitialColour(0, 1.0, 0.8, 0); $trail->setColourChange(0, 0.5, 0.5, 0.5, 0.5); $trail->setInitialWidth(0, 5); $trail->addNode($animNode); # Add light my $l2 = $scenemgr->createLight("l2"); my $color = $trail->getInitialColour(0); $l2->setDiffuseColour($color); $animNode->attachObject($l2); # Add billboard my $bbs = $scenemgr->createBillboardSet("bb", 1); # xxx: I didn't add the Vector3 arg version yet $bbs->createBillboard(0, 0, 0, $color); $bbs->setMaterialName("Examples/Flare"); $animNode->attachObject($bbs); # another animation $animNode = $scenemgr->getRootSceneNode()->createChildSceneNode(); $animNode->setPosition(-50,100,0); $anim = $scenemgr->createAnimation("an2", 10); $anim->setInterpolationMode(IM_SPLINE); $track = $anim->createNodeTrack(1, $animNode); $kf = $track->createNodeKeyFrame(0); $kf->setTranslate(Ogre::Vector3->new(-50,100,0)); $kf = $track->createNodeKeyFrame(2); $kf->setTranslate(Ogre::Vector3->new(-100, 150, -30)); $kf = $track->createNodeKeyFrame(4); $kf->setTranslate(Ogre::Vector3->new(-200, 0, 40)); $kf = $track->createNodeKeyFrame(6); $kf->setTranslate(Ogre::Vector3->new(0, -150, 70)); $kf = $track->createNodeKeyFrame(8); $kf->setTranslate(Ogre::Vector3->new(50, 0, 30)); $kf = $track->createNodeKeyFrame(10); $kf->setTranslate(Ogre::Vector3->new(-50,100,0)); $animState = $scenemgr->createAnimationState("an2"); $animState->setEnabled(1); push @{ $self->{mAnimStateList} }, $animState; $trail->setInitialColour(1, 0.0, 1.0, 0.4); $trail->setColourChange(1, 0.5, 0.5, 0.5, 0.5); $trail->setInitialWidth(1, 5); $trail->addNode($animNode); # Add light $l2 = $scenemgr->createLight("l3"); $l2->setDiffuseColour($trail->getInitialColour(1)); $animNode->attachObject($l2); # Add billboard $bbs = $scenemgr->createBillboardSet("bb2", 1); $bbs->createBillboard(0, 0, 0, $trail->getInitialColour(1)); $bbs->setMaterialName("Examples/Flare"); $animNode->attachObject($bbs); } sub createFrameListener { my ($self) = @_; $self->{mFrameListener} = LightingListener->new($self->{mWindow}, $self->{mCamera}, $self->{mAnimStateList}); # $self->{mFrameListener}->showDebugOverlay(1); $self->{mRoot}->addFrameListener($self->{mFrameListener}); } 1; package main; # uncomment this if the packages are in separate files: # use LightingApplication; LightingApplication->new->go(); Ogre-0.60/examples/ninja.pl0000755000175000017500000001704112146460465016027 0ustar slanningslanning#!/usr/bin/perl # This example builds on robot.pl. # Instead of showing the robot, it shows the ninja # from the basic OGRE tutorials. And I must add, # he's looking BADASS in the colored spotlight. # In addition, this example relies on OIS (which I also wrapped # and put on CPAN) to handle keyboard input. # I didn't wrap Ogre::FrameListener yet, though, # so the input handling is primitive and awkward for now. # (This is basically OGRE's Basic Tutorial 6, # with setupCEGUI(), createFrameListener(), and ExitListener removed, # and the ninja and lighting from Basic Tutorial 2.) use strict; use warnings; main(); exit(0); sub main { my $app = Application->new(); $app->go(); } package Application; use Ogre 0.27 qw(:SceneType :ShadowTechnique); use Ogre::ConfigFile; use Ogre::ColourValue; use Ogre::Degree; use Ogre::Light qw(:LightTypes); use Ogre::Node qw(:TransformSpace); use Ogre::Plane; use Ogre::Root; use Ogre::ResourceGroupManager qw(:GroupName); use Ogre::SceneManager; use Ogre::Vector3; use OIS; use OIS::InputManager; use OIS::Keyboard qw(:KeyCode); use Time::HiRes qw(usleep); sub new { my ($pkg, %args) = @_; my $self = bless { 'root' => undef, 'keyboard' => undef, 'inputManager' => undef, }, $pkg; return $self; } sub DESTROY { my ($self) = @_; if (defined($self->{inputManager})) { $self->{inputManager}->destroyInputObject($self->{keyboard}) if defined($self->{keyboard}); OIS::InputManager->destroyInputSystem($self->{inputManager}); } delete $self->{root}; } sub go { my ($self) = @_; $self->createRoot(); $self->defineResources(); $self->setupRenderSystem(); $self->createRenderWindow(); $self->initializeResourceGroups(); $self->setupScene(); $self->setupInputSystem(); $self->startRenderLoop(); } sub createRoot { my ($self) = @_; # plugins.cfg should symlink to /etc/OGRE/plugins.cfg (at least on Ubuntu) # (ogre.cfg and Ogre.log are automatically created by the config dialog) $self->{root} = Ogre::Root->new('plugins.cfg', 'ogre.cfg', 'Ogre.log'); } sub defineResources { my ($self) = @_; my $cf = Ogre::ConfigFile->new(); # resources.cfg and its required media files are included in this directory. # You may want to change this, and use different media. # Look in the source distribution for OGRE under Samples/Media/ . $cf->load('resources.cfg'); # note: this is a Perlish replacement for iterators used in C++ my $secs = $cf->getSections(); foreach my $sec (@$secs) { my $secname = $sec->{name}; my $settings = $sec->{settings}; foreach my $setting (@$settings) { my ($typename, $archname) = @$setting; # xxx: getSingletonPtr could move outside the foreach loops my $rgm = Ogre::ResourceGroupManager->getSingletonPtr(); $rgm->addResourceLocation($archname, $typename, $secname); } } } sub setupRenderSystem { my ($self) = @_; my $root = $self->{root}; if (! $root->restoreConfig() && ! $root->showConfigDialog()) { die "User cancelled the config dialog!\n"; } } sub createRenderWindow { my ($self) = @_; $self->{root}->initialise(1, 'Tutorial Render Window'); } sub initializeResourceGroups { my ($self) = @_; my $tm = Ogre::TextureManager->getSingletonPtr(); $tm->setDefaultNumMipmaps(5); my $rgm = Ogre::ResourceGroupManager->getSingletonPtr(); $rgm->initialiseAllResourceGroups(); } sub setupScene { my ($self) = @_; my $root = $self->{root}; my $mgr = $root->createSceneManager(ST_GENERIC, 'Default SceneManager'); my $cam = $mgr->createCamera('Camera'); $cam->setPosition(400, 150, 150); $cam->lookAt(0, 50, 0); $cam->setNearClipDistance(5); # xxx: annoying, in the C++ API all args after $cam are optional my $vp = $root->getAutoCreatedWindow()->addViewport($cam, 0, 0, 0, 1, 1); # xxx: annoying, C++ API has all values optional for ColourValue $vp->setBackgroundColour(Ogre::ColourValue->new(0.5, 0.5, 0.5, 1)); $cam->setAspectRatio($vp->getActualWidth / $vp->getActualHeight); $mgr->setAmbientLight(Ogre::ColourValue->new(0, 0, 0, 1)); $mgr->setShadowTechnique(SHADOWTYPE_STENCIL_ADDITIVE); # note: more meshes are in Samples/Media/models/ , # though obviously none as cool as the ninja my $ent = $mgr->createEntity("Ninja", "ninja.mesh"); $ent->setCastShadows(1); my $node1 = $mgr->getRootSceneNode()->createChildSceneNode("NinjaNode"); $node1->attachObject($ent); my $plane = Ogre::Plane->new(Ogre::Vector3->new(0, 1, 0), 0); my $meshmgr = Ogre::MeshManager->getSingletonPtr(); $meshmgr->createPlane("ground", DEFAULT_RESOURCE_GROUP_NAME, $plane, 1500, 1500, 20, 20, 1, 1, 5, 5, Ogre::Vector3->new(0, 0, 1)); $ent = $mgr->createEntity("GroundEntity", "ground"); $mgr->getRootSceneNode()->createChildSceneNode("GroundNode")->attachObject($ent); $ent->setMaterialName("Examples/Rockwall"); $ent->setCastShadows(0); # xxx: annoying, C++ API has "relativeTo" value optional # xxx: also have to use Degree instead of Radian $node1->yaw(Ogre::Degree->new(-150), TS_LOCAL); $node1->pitch(Ogre::Degree->new(-10), TS_LOCAL); my $light = $mgr->createLight("Light1"); $light->setType(LT_POINT); $light->setPosition(0, 150, 250); $light->setDiffuseColour(1.0, 0.0, 0.0); $light->setSpecularColour(1.0, 0.0, 0.0); $light = $mgr->createLight("Light3"); $light->setType(LT_DIRECTIONAL); $light->setDiffuseColour(0.25, 0.25, 0.0); $light->setSpecularColour(0.25, 0.25, 0.0); $light->setDirection(0, -1, 1); $light = $mgr->createLight("Light2"); $light->setType(LT_SPOTLIGHT); $light->setDiffuseColour(0, 0, 1); $light->setSpecularColour(0, 0, 1); $light->setDirection(-1, -1, 0); $light->setPosition(300, 300, 0); # xxx: again, sorry only Degree for now (no Radian) $light->setSpotlightRange(Ogre::Degree->new(35), Ogre::Degree->new(50)); } sub setupInputSystem { my ($self) = @_; # this part is a little abbreviated from tutorial 6, # see the "Using OIS" tutorial my $win = $self->{root}->getAutoCreatedWindow(); my $windowHnd = $win->getCustomAttributePtr('WINDOW'); $self->{inputManager} = OIS::InputManager->createInputSystemPtr($windowHnd); $self->{keyboard} = $self->{inputManager}->createInputObjectKeyboard(0); } sub startRenderLoop { my ($self) = @_; my $root = $self->{root}; my $win = $root->getAutoCreatedWindow(); my $keyboard = $self->{keyboard}; my $esc = &KC_ESCAPE; # I do it this way just to avoid implementing FrameListener, # which I haven't wrapped yet (normally you do $root->startRendering()). while ($root->renderOneFrame()) { $keyboard->capture(); last if $keyboard->isKeyDown($esc); # xxx: I don't understand why this is necessary, # I thought all render targets were automatically # updated by renderOneFrame. Oh, well. $win->update(); # I just added this to take some heat off the processor. # Comment it out if you want higher FPS. :) # It's maybe interesting to note that I get about 300FPS, # while "Basic Tutorial 2" in C++ runs at about 350FPS; # although the tutorial does have a bit of extra with CEGUI # (on the *other* other hand, this isn't using startRendering), # it's still not too shabby for Perl, eh? usleep 10000; } } 1; Ogre-0.60/examples/particleFX.pl0000755000175000017500000001016212146460465016766 0ustar slanningslanning#!/usr/bin/perl # This is OGRE's sample application "ParticleFX" in Perl; # see Samples/ParticleFX/ in the OGRE distribution. package ParticleFrameListener; # Event handler to add ability to alter curvature use strict; use warnings; use Ogre::ExampleFrameListener; @ParticleFrameListener::ISA = qw(Ogre::ExampleFrameListener); use Ogre 0.29; use Ogre::Degree; use Ogre::ParticleSystem; sub new { my ($pkg, $win, $cam, $fountainNode) = @_; my $super = $pkg->SUPER::new($win, $cam); my $self = bless $super, $pkg; $self->{mFountainNode} = $fountainNode; return $self; } sub frameStarted { my ($self, $evt) = @_; return 0 unless $self->SUPER::frameStarted($evt); # Rotate fountains $self->{mFountainNode}->yaw(Ogre::Degree->new($evt->timeSinceLastFrame * 30)); return 1; } 1; package ParticleApplication; use strict; use warnings; use Ogre::ExampleApplication; @ParticleApplication::ISA = qw(Ogre::ExampleApplication); use Ogre 0.29; use Ogre::ColourValue; use Ogre::Vector3; sub new { my ($pkg) = @_; my $super = $pkg->SUPER::new(); my $self = bless $super, $pkg; $self->{mFountainNode} = undef; return $self; } # override the mandatory create scene method sub createScene { my ($self) = @_; my $scenemgr = $self->{mSceneMgr}; # ambient light $scenemgr->setAmbientLight(Ogre::ColourValue->new(0.5, 0.5, 0.5)); # ogre head entity my $ent = $scenemgr->createEntity("head", "ogrehead.mesh"); $scenemgr->getRootSceneNode->createChildSceneNode->attachObject($ent); # XXX Note: for some reason createParticleSystem by itself was creating # a ParticleSystem that was "pre-attached", and this caused # $scenenode->attachObject to throw an exception (already attached), # so I made a work-around method "createAndAttachParticleSystem" # that does the create and attach in one go. I have no idea why # that works..... # Green nimbus around Ogre my $nnode = $scenemgr->getRootSceneNode->createChildSceneNode(); $scenemgr->createAndAttachParticleSystem("Nimbus", "Examples/GreenyNimbus", $nnode); # fireworks! my $fwnode = $scenemgr->getRootSceneNode->createChildSceneNode(); $scenemgr->createAndAttachParticleSystem("Fireworks", "Examples/Fireworks", $fwnode); # shared node for 2 fountains $self->{mFountainNode} = $scenemgr->getRootSceneNode->createChildSceneNode(); # fountain 1 my $fnode = $self->{mFountainNode}->createChildSceneNode(); $fnode->translate(200, -100, 0); $fnode->rotate(Ogre::Vector3->new(0, 0, 1), Ogre::Degree->new(20)); $scenemgr->createAndAttachParticleSystem("fountain1", "Examples/PurpleFountain", $fnode); # fountain 2 $fnode = $self->{mFountainNode}->createChildSceneNode(); $fnode->translate(-200, -100, 0); $fnode->rotate(Ogre::Vector3->new(0, 0, 1), Ogre::Degree->new(-20)); $scenemgr->createAndAttachParticleSystem("fountain2", "Examples/PurpleFountain", $fnode); # rain my $rnode = $scenemgr->getRootSceneNode->createChildSceneNode(); $rnode->translate(0, 1000, 0); $scenemgr->createAndAttachParticleSystem("rain", "Examples/Rain", $rnode); # xxx: this idiocy is also a result of the createParticleSystem problem # explained above my $psys4 = $scenemgr->getParticleSystem("rain"); $psys4->fastForward(5); # so it looks more natural # aureola around ogre perpendicular to ground my $anode = $scenemgr->getRootSceneNode->createChildSceneNode(); $scenemgr->createAndAttachParticleSystem("Aureola", "Examples/Aureola", $anode); Ogre::ParticleSystem->setDefaultNonVisibleUpdateTimeout(5); } sub createFrameListener { my ($self) = @_; $self->{mFrameListener} = ParticleFrameListener->new($self->{mWindow}, $self->{mCamera}, $self->{mFountainNode}); # $self->{mFrameListener}->showDebugOverlay(1); $self->{mRoot}->addFrameListener($self->{mFrameListener}); } 1; package main; # uncomment this if the packages are in separate files: # use ParticleApplication; ParticleApplication->new->go(); Ogre-0.60/examples/resources.cfg0000644000175000017500000000154512146460465017065 0ustar slanningslanning# Resource locations to be added to the 'boostrap' path # This also contains the minimum you need to use the Ogre example framework [Bootstrap] Zip=Samples/Media/packs/OgreCore.zip # Resource locations to be added to the default path [General] FileSystem=Samples/Media FileSystem=Samples/Media/fonts FileSystem=Samples/Media/materials/programs FileSystem=Samples/Media/materials/scripts FileSystem=Samples/Media/materials/textures FileSystem=Samples/Media/models FileSystem=Samples/Media/overlays FileSystem=Samples/Media/particle FileSystem=Samples/Media/gui FileSystem=Samples/Media/DeferredShadingMedia FileSystem=Samples/Media/PCZAppMedia Zip=Samples/Media/packs/cubemap.zip Zip=Samples/Media/packs/cubemapsJS.zip Zip=Samples/Media/packs/dragon.zip Zip=Samples/Media/packs/fresneldemo.zip Zip=Samples/Media/packs/ogretestmap.zip Zip=Samples/Media/packs/skybox.zip Ogre-0.60/examples/animate.pl0000755000175000017500000001460012146460465016344 0ustar slanningslanning#!/usr/bin/perl # This is OGRE's "Intermediate Tutorial 1" in Perl. # Read that tutorial: # http://www.ogre3d.org/wiki/index.php/Intermediate_Tutorial_1 package MoveDemoListener; use strict; use warnings; use Ogre::ExampleFrameListener; @MoveDemoListener::ISA = qw(Ogre::ExampleFrameListener); use Ogre 0.30; use Ogre::Quaternion; use Ogre::Vector3; # these are readonly, don't change them my $ZERO = Ogre::Vector3->new(0, 0, 0); my $UNIT_X = Ogre::Vector3->new(1, 0, 0); sub new { my ($pkg, $win, $cam, $sn, $ent, $walk) = @_; my $super = $pkg->SUPER::new($win, $cam, 0, 0); my $self = bless $super, $pkg; $self->{mEntity} = $ent; # The Entity we are animating $self->{mNode} = $sn; # The SceneNode that the Entity is attached to $self->{mWalkList} = $walk; # The list of points we are walking to $self->{mWalkSpeed} = 35; # The speed at which the object is moving $self->{mDistance} = 0; # The distance the object has left to travel # direction object is moving, and destination it's moving towards $self->{mDirection} = $ZERO; $self->{mDestination} = $ZERO; return $self; } # This is called to start the object moving to the next position in mWalkList. sub nextLocation { my ($self) = @_; # we're done, no where else to go return 0 unless @{ $self->{mWalkList} }; # our next destination $self->{mDestination} = shift @{ $self->{mWalkList} }; $self->{mDirection} = $self->{mDestination} - $self->{mNode}->getPosition(); $self->{mDistance} = $self->{mDirection}->normalise(); return 1; } sub frameStarted { my ($self, $evt) = @_; # if the robot's not moving if ($self->{mDirection} == $ZERO) { # comparing Vector3s is now possible! # if there's another location to go to if ($self->nextLocation()) { # don't just stand there! $self->setAnimationLoop('Walk'); } } # the robot's moving now else { my $move = $self->{mWalkSpeed} * $evt->timeSinceLastFrame; $self->{mDistance} -= $move; # if we'd overshoot the target, jump to it instead if ($self->{mDistance} <= 0) { $self->{mNode}->setPosition($self->{mDestination}); $self->{mDirection} = $ZERO; # since we're at the destination, setup for next point if (! $self->nextLocation()) { # no more locations, so just act menacing $self->setAnimationLoop('Idle'); } else { # rotate the robot my $orient = $self->{mNode}->getOrientation; my $src = $orient * $UNIT_X; my $quat = $src->getRotationTo($self->{mDirection}); $self->{mNode}->rotate($quat); } } else { $self->{mNode}->translate($self->{mDirection} * $move); } } $self->{mAnimationState}->addTime($evt->timeSinceLastFrame); return $self->SUPER::frameStarted($evt); } sub setAnimationLoop { my ($self, $state) = @_; $self->{mAnimationState} = $self->{mEntity}->getAnimationState($state); $self->{mAnimationState}->setLoop(1); $self->{mAnimationState}->setEnabled(1); } package MoveDemoApplication; use strict; use warnings; use Ogre::ExampleApplication; @MoveDemoApplication::ISA = qw(Ogre::ExampleApplication); use Ogre 0.30; use Ogre::Degree; use Ogre::ColourValue; use Ogre::Vector3; sub new { my ($pkg) = @_; # call ExampleFrameListener's constructor my $super = $pkg->SUPER::new(); my $self = bless $super, $pkg; $self->{mEntity} = undef; # The Entity of the object we are animating $self->{mNode} = undef; # The SceneNode of the object we are moving $self->{mWalkList} = []; # The waypoints return $self; } sub createScene { my ($self) = @_; # set default lighting $self->{mSceneMgr}->setAmbientLight(Ogre::ColourValue->new(1, 1, 1)); # create entity $self->{mEntity} = $self->{mSceneMgr}->createEntity("Robot", "robot.mesh"); # create scene node $self->{mNode} = $self->{mSceneMgr}->getRootSceneNode->createChildSceneNode("RobotNode", Ogre::Vector3->new(0, 0, 25)); $self->{mNode}->attachObject($self->{mEntity}); # note: in C++ this is a deque; we call that an array in Perl :) push @{ $self->{mWalkList} }, Ogre::Vector3->new(550, 0, 50); push @{ $self->{mWalkList} }, Ogre::Vector3->new(-100, 0, -200); # create objects so we can see movement # Knot1 my $ent = $self->{mSceneMgr}->createEntity("Knot1", "knot.mesh"); my $node = $self->{mSceneMgr}->getRootSceneNode->createChildSceneNode("Knot1Node", Ogre::Vector3->new(0, -10, 25)); $node->attachObject($ent); $node->setScale(0.1, 0.1, 0.1); # Knot2 $ent = $self->{mSceneMgr}->createEntity("Knot2", "knot.mesh"); $node = $self->{mSceneMgr}->getRootSceneNode->createChildSceneNode("Knot2Node", Ogre::Vector3->new(550, -10, 50)); $node->attachObject($ent); $node->setScale(0.1, 0.1, 0.1); # Knot3 $ent = $self->{mSceneMgr}->createEntity("Knot3", "knot.mesh"); $node = $self->{mSceneMgr}->getRootSceneNode->createChildSceneNode("Knot3Node", Ogre::Vector3->new(-100, -10, -200)); $node->attachObject($ent); $node->setScale(0.1, 0.1, 0.1); # set the camera $self->{mCamera}->setPosition(90, 280, 535); $self->{mCamera}->pitch(Ogre::Degree->new(-30)); $self->{mCamera}->yaw(Ogre::Degree->new(-15)); } sub createFrameListener { my ($self) = @_; $self->{mFrameListener} = MoveDemoListener->new($self->{mWindow}, $self->{mCamera}, $self->{mNode}, $self->{mEntity}, $self->{mWalkList}, ); $self->{mFrameListener}->showDebugOverlay(1); $self->{mRoot}->addFrameListener($self->{mFrameListener}); } 1; package main; # uncomment this if the packages are in separate files: # use MoveDemoApplication; MoveDemoApplication->new->go(); Ogre-0.60/examples/terrain.pl0000755000175000017500000001023512146460465016372 0ustar slanningslanning#!/usr/bin/perl # This is OGRE's sample application "Terrain" in Perl; # see Samples/Terrain/ in the OGRE distribution. package TerrainFrameListener; use strict; use warnings; use Ogre::ExampleFrameListener; @TerrainFrameListener::ISA = qw(Ogre::ExampleFrameListener); use Ogre 0.29; use Ogre::Ray; use Ogre::Vector3; sub new { my ($pkg, $win, $cam, $rsq) = @_; my $super = $pkg->SUPER::new($win, $cam); my $self = bless $super, $pkg; # this is the global raySceneQuery in the C++ app $self->{mRaySceneQuery} = $rsq; $self->{mMoveSpeed} = 50; # this is the static Ray in the C++ app $self->{mUpdateRay} = Ogre::Ray->new(); $self->{mDOWN} = Ogre::Vector3->new(0, -1, 0); return $self; } sub frameStarted { my ($self, $evt) = @_; return 0 unless $self->SUPER::frameStarted($evt); # clamp to terrain $self->{mUpdateRay}->setOrigin($self->{mCamera}->getPosition); $self->{mUpdateRay}->setDirection($self->{mDOWN}); $self->{mRaySceneQuery}->setRay($self->{mUpdateRay}); my $qryResult = $self->{mRaySceneQuery}->execute(); foreach my $entry (@$qryResult) { next unless defined $entry->{worldFragment}; my $cam = $self->{mCamera}; my $campos = $cam->getPosition; my $ground_y = $entry->{worldFragment}->singleIntersection->y; $cam->setPosition($campos->x, $ground_y + 10, $campos->z); } return 1; } 1; package TerrainApplication; use strict; use warnings; use Ogre::ExampleApplication; @TerrainApplication::ISA = qw(Ogre::ExampleApplication); use Ogre 0.29 qw(:Capabilities :FogMode); use Ogre::ColourValue; use Ogre::Plane; use Ogre::Quaternion; use Ogre::Ray; use Ogre::Vector3; sub new { my ($pkg) = @_; my $super = $pkg->SUPER::new(); my $self = bless $super, $pkg; $self->{mRaySceneQuery} = undef; return $self; } sub DESTROY { my ($self) = @_; delete $self->{mRaySceneQuery} if defined $self->{mRaySceneQuery}; } sub chooseSceneManager { my ($self) = @_; $self->{mSceneMgr} = $self->{mRoot}->createSceneManager("TerrainSceneManager"); } sub createCamera { my ($self) = @_; my $cam = $self->{mSceneMgr}->createCamera("PlayerCam"); $cam->setPosition(Ogre::Vector3->new(128, 25, 128)); $cam->lookAt(Ogre::Vector3->new(0, 0, -300)); $cam->setNearClipDistance(1); $cam->setFarClipDistance(1000); $self->{mCamera} = $cam; } sub createScene { my ($self) = @_; my $scenemgr = $self->{mSceneMgr}; # ambient light $scenemgr->setAmbientLight(Ogre::ColourValue->new(0.5, 0.5, 0.5)); # point light my $light = $scenemgr->createLight("MainLight"); $light->setPosition(20, 80, 50); # Fog # NB it's VERY important to set this before calling setWorldGeometry # because the vertex program picked will be different my $fadeColour = Ogre::ColourValue->new(0.93, 0.86, 0.76); $scenemgr->setFog(FOG_LINEAR, $fadeColour, 0.001, 500, 1000); $self->{mWindow}->getViewport(0)->setBackgroundColour($fadeColour); # terrain $scenemgr->setWorldGeometry($self->{mResourcePath} . "terrain.cfg"); if ($self->{mRoot}->getRenderSystem->getCapabilities->hasCapability(RSC_INFINITE_FAR_PLANE)) { $self->{mCamera}->setFarClipDistance(0); } my $plane = Ogre::Plane->new(); $plane->setD(5000); $plane->setNormal(- Ogre::Vector3->new(0, 1, 0)); my $cam = $self->{mCamera}; $cam->setPosition(707, 2500, 528); $cam->setOrientation(Ogre::Quaternion->new(-0.3486, 0.0122, 0.9365, 0.0329)); my $ray = Ogre::Ray->new($cam->getPosition, Ogre::Vector3->new(0, -1, 0)); $self->{mRaySceneQuery} = $scenemgr->createRayQuery($ray); } sub createFrameListener { my ($self) = @_; $self->{mFrameListener} = TerrainFrameListener->new($self->{mWindow}, $self->{mCamera}, $self->{mRaySceneQuery}); # $self->{mFrameListener}->showDebugOverlay(1); $self->{mRoot}->addFrameListener($self->{mFrameListener}); } 1; package main; # uncomment this if the packages are in separate files: # use TerrainApplication; TerrainApplication->new->go(); Ogre-0.60/examples/README.txt0000644000175000017500000000633012162410277016057 0ustar slanningslanningSetup required to run examples This directory contains examples of using the Perl bindings for OGRE. To run the examples, you need to have two config files in the current directory: plugins.cfg and resources.cfg. plugins.cfg might be a pointer to a system-wide file; for example, on Ubuntu you should `ln -s /usr/share/OGRE/plugins.cfg`. [XXX: needs updated for 1.7.2] resources.cfg is taken from the Samples/Common/bin directory in OGRE, but I put it here also. For resources.cfg, you need to make sure it points to the Samples directory from OGRE 1.6. (It's important to point to 1.6 media, not 1.4, because some of the syntax has changed. You can edit resources.cfg to point wherever you want.) If you checked out Ogre's source from subversion as mentioned in README.txt, then create a symlink to the Samples directory like this: ln -s $HOME/ogre/src/ogre/v1-6/Samples Brief descriptions of the examples - robot.pl: very minimal, just shows a robot that's been rotated and scaled a bit (taken from one of the basic OGRE tutorials; if you're not familiar with the tutorials, probably should do them before trying this) - ninja.pl: another minimal demo, this time using OIS to handle input (just exiting the application when ESC is pressed), and the robot is replaced by a cool-looking ninja under different lighting - listeningninja.pl: same cool ninja scene, but showing how to implement a FrameListener to handle user input (e.g. keyboard) - buffered.pl: demo of buffered input handling, this implements OGRE's "Basic Tutorial 5" # NB: sky.pl, darksky.pl, and terrain.pl aren't currently working # because they used TerrainSceneManager, which was removed in 1.8.0 # and I haven't fixed them yet # http://www.ogre3d.org/tikiwiki/tiki-index.php?page=ByatisNotes #- sky.pl: demo of Terrain, Sky, and Fog, this implements OGRE's # "Basic Tutorial 3" # #- darksky.pl: same as sky.pl but more evil-looking # #- terrain.pl: implementing OGRE's "Terrain" sample app, this demos # using RaySceneQuery to maintain the camera at a fixed distance # above a terrain (if you've played "Medieval: Total War", it's like # moving the camera over the 3D-battle terrains). - animate.pl: watch the robot walk (note: this is still a little incomplete, so the robot will "moonwalk" once he reaches the first waypoint - I have to wrap a few more Node and Quaternion methods, and fix some overloaded operators) #- gtk2robot.pl, wx.pl: NOT WORKING YET, but if it were it should # show how to make gtk2 and wxPerl work with Ogre. - cameratrack.pl: demo of animation tracks and camera auto-tracking, implements OGRE's "CameraTrack" sample application - particleFX.pl: pretty particle effects demo, implements OGRE's "ParticleFX" sample application - skeletalanim.pl: implements OGRE's "SkeletalAnimation" sample application (very cool with the ladies sneaking around :) - lighting.pl: OGRE's "Lighting" sample app, shows how to use ControllerValue and ControllerFunction interfaces, as well as using RibbonTrails and animations (note: this is still incomplete, though it works fine) - manualobject.pl: use ManualObject to draw arbitrary shapes (taken from several wiki articles) #- sdlrobot.pl: render Ogre in an SDL-Perl application # needs updating Ogre-0.60/examples/sdlrobot.pl0000755000175000017500000001034212146460465016555 0ustar slanningslanning#!/usr/bin/perl use strict; use warnings; use Time::HiRes qw/time usleep/; use Ogre 0.38 qw(:SceneType); use Ogre::ConfigFile; use Ogre::ColourValue; use Ogre::Light qw(:LightTypes); use Ogre::Root; use Ogre::ResourceGroupManager; use Ogre::RenderWindow; use Ogre::TextureManager; use SDL; use SDL::Event; use SDL::App; my ($W, $H, $D) = (1024, 768, 0); main(); exit; # http://www.ogre3d.org/wiki/index.php/Hello_World_with_minimal_Ogre_init # http://www.ogre3d.org/wiki/index.php/Using_SDL_Input#New.2C_Experimental_Way_.28OGRE_v1.6_and_Later.29 sub main { my $app = SDL::App->new( '-title' => 'Ogre on SDL', '-width' => $W, '-height' => $H, '-depth' => $D, '-opengl' => 1, #'-double_buffer' => 1, ); my $root = Ogre::Root->new('plugins.cfg', 'ogre.cfg', 'Ogre.log'); defineResources(); setupRenderSystem($root); $root->initialise(0); # tell Ogre not to make an OpenGL window # this is how it works on Linux, at least - # will need some work on Windows my $renderwindow = $root->createRenderWindow( 'OgreRenderWindow', $W, $H, 0, {currentGLContext => 'True'}, # tell Ogre to use the SDL OpenGL context ); Ogre::ResourceGroupManager->getSingletonPtr->initialiseAllResourceGroups(); $renderwindow->setVisible(1); my $cam = setupScene($root, $renderwindow); moveCamPos($cam, 200); #my $framelistener = createFrameListener($root, $renderwindow, $cam); # $app->grab_input(....); mainLoop($root, $renderwindow, $cam); } sub mainLoop { my ($root, $renderwindow, $cam) = @_; my $event = SDL::Event->new(); my $done = 0; GAMELOOP: while (!$done) { sync_to(1); $event->pump(); while ($event->poll()) { if (($event->type == SDL_QUIT) || ($event->key_sym eq SDLK_q)) { $done = 1; last; } if ($event->key_sym == SDLK_RIGHT) { moveCamPos($cam, 200); } elsif ($event->key_sym == SDLK_LEFT) { moveCamPos($cam, -200); } renderOne($root); } last GAMELOOP if $done; } } sub sync_to { my $n = shift; # xxx: figure out time to sleep # my $t = time; my $sleep = 100000; usleep ($sleep); } sub createFrameListener { # } sub renderOne { my ($root) = @_; $root->renderOneFrame(); # Ogre renders to the SDL window # SDL::GLSwapBuffers(); } sub moveCamPos { my ($cam, $z) = @_; $cam->setPosition(0, 0, $z); $cam->lookAt(0, 50, 0); } sub setupScene { my ($root, $renderwindow) = @_; my $mgr = $root->createSceneManager(ST_GENERIC, 'Default SceneManager'); my $cam = $mgr->createCamera('Camera'); $cam->setNearClipDistance(5); my $vp = $renderwindow->addViewport($cam, 0, 0, 0, 1, 1); $vp->setBackgroundColour(Ogre::ColourValue->new(0.5, 0.5, 0.5, 1)); $cam->setAspectRatio($vp->getActualWidth / $vp->getActualHeight); $mgr->setAmbientLight(Ogre::ColourValue->new(0.8, 0.7, 0.6, 1)); my $ent1 = $mgr->createEntity('Robot', 'robot.mesh'); my $node1 = $mgr->getRootSceneNode()->createChildSceneNode('RobotNode'); $node1->attachObject($ent1); my $light = $mgr->createLight('Light1'); $light->setType(LT_POINT); $light->setPosition(0, 0, 200); $light->setDiffuseColour(1.0, 0.0, 0.0); $light->setSpecularColour(1.0, 0.0, 0.0); return $cam; } sub setupRenderSystem { my $root = shift; if (! $root->restoreConfig() && ! $root->showConfigDialog()) { die "User cancelled the config dialog!\n"; } } sub defineResources { my $cf = Ogre::ConfigFile->new(); $cf->load('resources.cfg'); my $secs = $cf->getSections(); foreach my $sec (@$secs) { my $secname = $sec->{name}; my $settings = $sec->{settings}; foreach my $setting (@$settings) { my ($typename, $archname) = @$setting; # xxx: getSingletonPtr could move outside the foreach loops my $rgm = Ogre::ResourceGroupManager->getSingletonPtr(); $rgm->addResourceLocation($archname, $typename, $secname); } } } Ogre-0.60/examples/darksky.pl0000755000175000017500000000557712146460465016413 0ustar slanningslanning#!/usr/bin/perl # This is OGRE's "Basic Tutorial 3", but in Perl. # Read that tutorial. # Note: in createScene, I made it where you can set # $fog and $sky parameters. package TutorialApplication; use strict; use warnings; use Ogre::ExampleApplication; @TutorialApplication::ISA = qw(Ogre::ExampleApplication); use Ogre 0.27 qw(:SceneType :FogMode); use Ogre::ColourValue; use Ogre::Plane; use Ogre::ResourceGroupManager qw(:GroupName); use Ogre::SceneManager; use Ogre::Quaternion; use Ogre::Vector3; sub chooseSceneManager { my ($self) = @_; $self->{mSceneMgr} = $self->{mRoot}->createSceneManager(ST_EXTERIOR_CLOSE, "Tute3"); } sub createScene { my ($self) = @_; my $mgr = $self->{mSceneMgr}; # select which fog you want to use my $fog = 'exp'; my $darkfog = 1; if ($fog) { my $fadeColour = $darkfog ? Ogre::ColourValue->new(0.1, 0.1, 0.1) : Ogre::ColourValue->new(0.9, 0.9, 0.9); $self->{mWindow}->getViewport(0)->setBackgroundColour($fadeColour); if ($fog eq 'linear') { if ($darkfog) { $mgr->g(FOG_LINEAR, $fadeColour, 0.0, 10, 150); } else { $mgr->setFog(FOG_LINEAR, $fadeColour, 0.0, 50, 500); } } elsif ($fog eq 'exp') { $mgr->setFog(FOG_EXP, $fadeColour, 0.005); } elsif ($fog eq 'exp2') { $mgr->setFog(FOG_EXP2, $fadeColour, 0.003); } } # load the terrain (do this after setFog) $mgr->setWorldGeometry("terrain.cfg"); # select which scene you want to show my $sky = 'plane'; # (note: unfortunately for now all the args are required to these setSky* methods) if ($sky eq 'box') { $mgr->setSkyBox(1, "Examples/SpaceSkyBox", 5000, 0, Ogre::Quaternion->new(1, 0, 0, 0), DEFAULT_RESOURCE_GROUP_NAME ); } elsif ($sky eq 'dome') { $mgr->setSkyDome(1, "Examples/CloudySky", 5, 8, 4000, 1, Ogre::Quaternion->new(1, 0, 0, 0), 16, 16, -1, DEFAULT_RESOURCE_GROUP_NAME ); } elsif ($sky eq 'plane') { my $plane = Ogre::Plane->new(); # Note: Ogre::Plane->new(Ogre::Vector3->new(0, -1, 0), 10) # is not the same! $plane->setD($darkfog ? 10 : 1000); $plane->setNormal(Ogre::Vector3->new(0, -1, 0)); # annoying here that last arg is required $mgr->setSkyPlane(1, $plane, "Examples/SpaceSkyPlane", ($darkfog ? 100 : 1500), 45, 1, 0.5, 150, 150, DEFAULT_RESOURCE_GROUP_NAME); } } 1; package main; # uncomment this if the packages are in separate files: # use TutorialApplication; TutorialApplication->new->go(); Ogre-0.60/examples/listeningninja.pl0000755000175000017500000001621112146460465017742 0ustar slanningslanning#!/usr/bin/perl use strict; use warnings; main(); exit(0); sub main { my $app = Application->new(); $app->go(); } package ExitListener; # implements Ogre::FrameListener use OIS; use OIS::Keyboard qw(:KeyCode); sub new { my ($pkg, $keyboard) = @_; die "Missing keyboard argument\n" unless defined($keyboard) and $keyboard->isa('OIS::Keyboard'); my $self = bless { 'keyboard' => $keyboard, # OIS::Keyboard }, $pkg; return $self; } sub frameStarted { my ($self, $evt) = @_; my $kb = $self->{'keyboard'}; $kb->capture(); # quit if ESC key is pressed # XXX: I just completely do not understand this... # In ninja.pl (look at the bottom), this worked: &KC_ESCAPE . # Now I have to call it as a class method. WTF??? # (Note: I've supposedly exported this "constant" above with :KeyCode.) return ! $kb->isKeyDown(OIS::Keyboard->KC_ESCAPE); } ## not used here # sub frameEnded { # # } package Application; use Ogre 0.27 qw(:SceneType :ShadowTechnique); use Ogre::ConfigFile; use Ogre::ColourValue; use Ogre::Degree; use Ogre::Light qw(:LightTypes); use Ogre::Node qw(:TransformSpace); use Ogre::Plane; use Ogre::Root; use Ogre::ResourceGroupManager qw(:GroupName); use Ogre::SceneManager; use Ogre::Vector3; use OIS; use OIS::InputManager; use OIS::Keyboard qw(:KeyCode); sub new { my ($pkg, %args) = @_; my $self = bless { 'root' => undef, 'keyboard' => undef, 'mouse' => undef, 'inputManager' => undef, }, $pkg; return $self; } sub DESTROY { my ($self) = @_; if (defined($self->{inputManager})) { for (qw(keyboard mouse)) { $self->{inputManager}->destroyInputObject($self->{$_}) if defined($self->{$_}); } OIS::InputManager->destroyInputSystem($self->{inputManager}); } delete $self->{root}; } sub go { my ($self) = @_; $self->createRoot(); $self->defineResources(); $self->setupRenderSystem(); $self->createRenderWindow(); $self->initializeResourceGroups(); $self->setupScene(); $self->setupInputSystem(); $self->createFrameListener(); $self->startRenderLoop(); } sub createRoot { my ($self) = @_; # plugins.cfg should symlink to /etc/OGRE/plugins.cfg (at least on Ubuntu) # (ogre.cfg and Ogre.log are automatically created by the config dialog) $self->{root} = Ogre::Root->new('plugins.cfg', 'ogre.cfg', 'Ogre.log'); } sub defineResources { my ($self) = @_; my $cf = Ogre::ConfigFile->new(); # resources.cfg and its required media files are included in this directory. # You may want to change this, and use different media. # Look in the source distribution for OGRE under Samples/Media/ . $cf->load('resources.cfg'); # note: this is a Perlish replacement for iterators used in C++ my $secs = $cf->getSections(); foreach my $sec (@$secs) { my $secname = $sec->{name}; my $settings = $sec->{settings}; foreach my $setting (@$settings) { my ($typename, $archname) = @$setting; # xxx: getSingletonPtr could move outside the foreach loops my $rgm = Ogre::ResourceGroupManager->getSingletonPtr(); $rgm->addResourceLocation($archname, $typename, $secname); } } } sub setupRenderSystem { my ($self) = @_; my $root = $self->{root}; if (! $root->restoreConfig() && ! $root->showConfigDialog()) { die "User cancelled the config dialog!\n"; } } sub createRenderWindow { my ($self) = @_; $self->{root}->initialise(1, 'Tutorial Render Window'); } sub initializeResourceGroups { my ($self) = @_; my $tm = Ogre::TextureManager->getSingletonPtr(); $tm->setDefaultNumMipmaps(5); my $rgm = Ogre::ResourceGroupManager->getSingletonPtr(); $rgm->initialiseAllResourceGroups(); } sub setupScene { my ($self) = @_; my $root = $self->{root}; my $mgr = $root->createSceneManager(ST_GENERIC, 'Default SceneManager'); my $cam = $mgr->createCamera('Camera'); $cam->setPosition(400, 150, 150); $cam->lookAt(0, 50, 0); $cam->setNearClipDistance(5); # xxx: annoying, in the C++ API all args after $cam are optional my $vp = $root->getAutoCreatedWindow()->addViewport($cam, 0, 0, 0, 1, 1); # xxx: annoying, C++ API has all values optional for ColourValue $vp->setBackgroundColour(Ogre::ColourValue->new(0.5, 0.5, 0.5, 1)); $cam->setAspectRatio($vp->getActualWidth / $vp->getActualHeight); $mgr->setAmbientLight(Ogre::ColourValue->new(0, 0, 0, 1)); $mgr->setShadowTechnique(SHADOWTYPE_STENCIL_ADDITIVE); # note: more meshes are in Samples/Media/models/ , # though obviously none as cool as the ninja my $ent = $mgr->createEntity("Ninja", "ninja.mesh"); $ent->setCastShadows(1); my $node1 = $mgr->getRootSceneNode()->createChildSceneNode("NinjaNode"); $node1->attachObject($ent); my $plane = Ogre::Plane->new(Ogre::Vector3->new(0, 1, 0), 0); my $meshmgr = Ogre::MeshManager->getSingletonPtr(); $meshmgr->createPlane("ground", DEFAULT_RESOURCE_GROUP_NAME, $plane, 1500, 1500, 20, 20, 1, 1, 5, 5, Ogre::Vector3->new(0, 0, 1)); $ent = $mgr->createEntity("GroundEntity", "ground"); $mgr->getRootSceneNode()->createChildSceneNode("GroundNode")->attachObject($ent); $ent->setMaterialName("Examples/Rockwall"); $ent->setCastShadows(0); # xxx: annoying, C++ API has "relativeTo" value optional # xxx: also have to use Degree instead of Radian $node1->yaw(Ogre::Degree->new(-150), TS_LOCAL); $node1->pitch(Ogre::Degree->new(-10), TS_LOCAL); my $light = $mgr->createLight("Light1"); $light->setType(LT_POINT); $light->setPosition(0, 150, 250); $light->setDiffuseColour(1.0, 0.0, 0.0); $light->setSpecularColour(1.0, 0.0, 0.0); $light = $mgr->createLight("Light3"); $light->setType(LT_DIRECTIONAL); $light->setDiffuseColour(0.25, 0.25, 0.0); $light->setSpecularColour(0.25, 0.25, 0.0); $light->setDirection(0, -1, 1); $light = $mgr->createLight("Light2"); $light->setType(LT_SPOTLIGHT); $light->setDiffuseColour(0, 0, 1); $light->setSpecularColour(0, 0, 1); $light->setDirection(-1, -1, 0); $light->setPosition(300, 300, 0); # xxx: again, sorry only Degree for now (no Radian) $light->setSpotlightRange(Ogre::Degree->new(35), Ogre::Degree->new(50)); } sub setupInputSystem { my ($self) = @_; # this part is a little abbreviated from tutorial 6, # see the "Using OIS" tutorial my $win = $self->{root}->getAutoCreatedWindow(); my $windowHnd = $win->getCustomAttributePtr('WINDOW'); $self->{inputManager} = OIS::InputManager->createInputSystemPtr($windowHnd); # 0 means unbuffered input $self->{keyboard} = $self->{inputManager}->createInputObjectKeyboard(0); $self->{mouse} = $self->{inputManager}->createInputObjectMouse(0); } sub createFrameListener { my ($self) = @_; my $listener = ExitListener->new($self->{keyboard}); $self->{root}->addFrameListener($listener); } sub startRenderLoop { my ($self) = @_; $self->{root}->startRendering(); } 1; Ogre-0.60/examples/buffered.pl0000755000175000017500000002030212146460465016504 0ustar slanningslanning#!/usr/bin/perl # This is OGRE's "Basic Tutorial 5" but in Perl. # Read that tutorial, but see keyPressed() if you want # to know what the key commands are. # Note: normally you'd want to put these packages in separate files # (and call `use' when needed, uncomment below). # Note that package 'main' is at bottom. package TutorialFrameListener; # implements ExampleFrameListener, OIS::MouseListener, OIS::KeyListener use strict; use warnings; use Ogre::ExampleFrameListener; @TutorialFrameListener::ISA = qw(Ogre::ExampleFrameListener); use Ogre 0.27; use Ogre::Node qw(:TransformSpace); use OIS 0.03; use OIS::Keyboard; use OIS::Mouse; sub new { my ($pkg, $win, $cam, $sceneMgr) = @_; # call ExampleFrameListener's constructor my $super = $pkg->SUPER::new($win, $cam, 1, 1); my $self = bless $super, $pkg; $self->{mRotate} = 0.13; # the rotate constant $self->{mMove} = 250; # the movement constant $self->{mSceneMgr} = $sceneMgr; # the current SceneManager $self->{mContinue} = 1; # whether to continue rendering or not # value to move in the correct direction $self->{mDirection} = Ogre::Vector3->new(0, 0, 0); # the SceneNode the camera is currently attached to $self->{mCamNode} = $cam->getParentSceneNode(); # note: mMouse, mKeyboard are from ExampleFrameListener constructor $self->{mMouse}->setEventCallback($self); $self->{mKeyboard}->setEventCallback($self); return $self; } # FrameListener sub frameStarted { my ($self, $evt) = @_; if ($self->{mMouse}) { $self->{mMouse}->capture(); } if ($self->{mKeyboard}) { $self->{mKeyboard}->capture(); } # xxx: have yet to overload * for Vector3, # so can't just multiply it by $t my $t = $evt->timeSinceLastFrame; my $d = $self->{mDirection}; $self->{mCamNode}->translate($t * $d->x, $t * $d->y, $t * $d->z, TS_LOCAL); return $self->{mContinue}; } # MouseListener sub mouseMoved { my ($self, $evt) = @_; my $state = $evt->state; if ($state->buttonDown(OIS::Mouse->MB_Right)) { $self->{mCamNode}->yaw(Ogre::Degree->new(- $self->{mRotate} * $state->X->rel), TS_WORLD); $self->{mCamNode}->pitch(Ogre::Degree->new(- $self->{mRotate} * $state->Y->rel), TS_LOCAL); } return 1; } # MouseListener sub mousePressed { my ($self, $evt, $id) = @_; my $light = $self->{mSceneMgr}->getLight("Light1"); # left click toggles light on/off if ($id == OIS::Mouse->MB_Left) { $light->setVisible(! $light->isVisible); } return 1; } # note: it's more efficient to leave out callback methods # if they're not overridden # MouseListener # sub mouseReleased { # my ($self, $evt, $id) = @_; # return 1; # } # KeyListener sub keyPressed { my ($self, $evt) = @_; my $key = $evt->key; # stop rendering if ESC is pressed if ($key == OIS::Keyboard->KC_ESCAPE) { $self->{mContinue} = 0; } # switch between two cameras elsif ($key == OIS::Keyboard->KC_1) { $self->{mCamera}->getParentSceneNode->detachObject($self->{mCamera}); $self->{mCamNode} = $self->{mSceneMgr}->getSceneNode("CamNode1"); $self->{mCamNode}->attachObject($self->{mCamera}); } elsif ($key == OIS::Keyboard->KC_2) { $self->{mCamera}->getParentSceneNode->detachObject($self->{mCamera}); $self->{mCamNode} = $self->{mSceneMgr}->getSceneNode("CamNode2"); $self->{mCamNode}->attachObject($self->{mCamera}); } # keyboard movement elsif ($key == OIS::Keyboard->KC_UP || $key == OIS::Keyboard->KC_W) { # xxx: this is what I want: # $self->{mDirection}{z} -= $self->{mMove}; $self->{mDirection}->setZ($self->{mDirection}->z - $self->{mMove}); } elsif ($key == OIS::Keyboard->KC_DOWN || $key == OIS::Keyboard->KC_S) { $self->{mDirection}->setZ($self->{mDirection}->z + $self->{mMove}); } elsif ($key == OIS::Keyboard->KC_LEFT || $key == OIS::Keyboard->KC_A) { $self->{mDirection}->setX($self->{mDirection}->x - $self->{mMove}); } elsif ($key == OIS::Keyboard->KC_RIGHT || $key == OIS::Keyboard->KC_D) { $self->{mDirection}->setX($self->{mDirection}->x + $self->{mMove}); } elsif ($key == OIS::Keyboard->KC_PGDOWN || $key == OIS::Keyboard->KC_E) { $self->{mDirection}->setY($self->{mDirection}->y - $self->{mMove}); } elsif ($key == OIS::Keyboard->KC_PGUP || $key == OIS::Keyboard->KC_Q) { $self->{mDirection}->setY($self->{mDirection}->y + $self->{mMove}); } return 1; } # KeyListener sub keyReleased { my ($self, $evt) = @_; my $key = $evt->key; # undo change to mDirection vector when key is released if ($key == OIS::Keyboard->KC_UP || $key == OIS::Keyboard->KC_W) { $self->{mDirection}->setZ($self->{mDirection}->z + $self->{mMove}); } elsif ($key == OIS::Keyboard->KC_DOWN || $key == OIS::Keyboard->KC_S) { $self->{mDirection}->setZ($self->{mDirection}->z - $self->{mMove}); } elsif ($key == OIS::Keyboard->KC_LEFT || $key == OIS::Keyboard->KC_A) { $self->{mDirection}->setX($self->{mDirection}->x + $self->{mMove}); } elsif ($key == OIS::Keyboard->KC_RIGHT || $key == OIS::Keyboard->KC_D) { $self->{mDirection}->setX($self->{mDirection}->x - $self->{mMove}); } elsif ($key == OIS::Keyboard->KC_PGDOWN || $key == OIS::Keyboard->KC_E) { $self->{mDirection}->setY($self->{mDirection}->y + $self->{mMove}); } elsif ($key == OIS::Keyboard->KC_PGUP || $key == OIS::Keyboard->KC_Q) { $self->{mDirection}->setY($self->{mDirection}->y - $self->{mMove}); } return 1; } 1; package TutorialApplication; use strict; use warnings; use Ogre 0.27; use Ogre::ColourValue; use Ogre::Degree; use Ogre::Light qw(:LightTypes); use Ogre::Vector3; # uncomment this if the packages are in separate files # use TutorialFrameListener; use Ogre::ExampleApplication; @TutorialApplication::ISA = qw(Ogre::ExampleApplication); sub createCamera { my ($self) = @_; $self->{mCamera} = $self->{mSceneMgr}->createCamera("PlayerCam"); $self->{mCamera}->setNearClipDistance(5); } sub createScene { my ($self) = @_; $self->{mSceneMgr}->setAmbientLight(Ogre::ColourValue->new(0.25, 0.25, 0.25)); # add the ninja my $ent = $self->{mSceneMgr}->createEntity("Ninja", "ninja.mesh"); my $node = $self->{mSceneMgr}->getRootSceneNode()->createChildSceneNode("NinjaNode"); $node->attachObject($ent); # create the light my $light = $self->{mSceneMgr}->createLight("Light1"); $light->setType(LT_POINT); $light->setPosition(250, 150, 250); $light->setDiffuseColour(1, 1, 1); $light->setSpecularColour(1, 1, 1); # Create the scene node $node = $self->{mSceneMgr}->getRootSceneNode()->createChildSceneNode("CamNode1", Ogre::Vector3->new(-400, 200, 400)); # Make it look towards the ninja $node->yaw(Ogre::Degree->new(-45)); # Create the pitch node $node = $node->createChildSceneNode("PitchNode1"); $node->attachObject($self->{mCamera}); # create the second camera node/pitch node $node = $self->{mSceneMgr}->getRootSceneNode()->createChildSceneNode("CamNode2", Ogre::Vector3->new(0, 200, 400)); $node = $node->createChildSceneNode("PitchNode2"); } sub createFrameListener { my ($self) = @_; # Create the FrameListener $self->{mFrameListener} = TutorialFrameListener->new($self->{mWindow}, $self->{mCamera}, $self->{mSceneMgr}); $self->{mRoot}->addFrameListener($self->{mFrameListener}); # Show the frame stats overlay $self->{mFrameListener}->showDebugOverlay(1); } 1; package main; use strict; use warnings; # uncomment this if the packages are in separate files # use TutorialApplication; main(); exit(0); sub main { my $app = TutorialApplication->new(); $app->go(); } Ogre-0.60/examples/gtk2robot.pl0000755000175000017500000001521112146460465016642 0ustar slanningslanning#!/usr/bin/perl # An example of using gtk2-perl with Ogre. # With this you can create a normal-style GUI app that # renders to an Ogre widget. This example is basically # just robot.pl but now displayed in an Ogre widget # inside a Gtk2::Widget. # # Note: this example requires that you have the Gtk2 # Perl module installed. # # It combines code ideas from several places: # - GtkOgre widget by Christian Lindequist Larsen, # see http://dword.dk/ . # - gtk2-perl: apps from the examples directory # and snippets from the docs. # - Also see robot.pl. use strict; use warnings; main(); exit(0); sub main { my $app = App::Robot->new(); $app->go(); } package App::Robot; # Note: this is really sloppy, # as I just shove both Gtk2 and Ogre stuff # into one package. It's only meant to be # a proof of principle. use Glib qw(:constants); use Gtk2 -init; use Ogre 0.28 qw(:SceneType); use Ogre::ConfigFile; use Ogre::ColourValue; use Ogre::Degree; use Ogre::Light qw(:LightTypes); use Ogre::Node qw(:TransformSpace); use Ogre::Root; use Ogre::ResourceGroupManager; use Ogre::SceneManager; sub new { my ($pkg, %args) = @_; my $self = bless {}, $pkg; $self->createRoot(); $self->defineResources(); $self->createGtkWindow(); return $self; } sub DESTROY { my ($self) = @_; delete $self->{root}; } sub go { my ($self) = @_; $self->setupRenderSystem(); $self->createRenderWindow(); $self->initializeResourceGroups(); $self->setupScene(); $self->startRenderLoop(); } sub createGtkWindow { my ($self) = @_; my $window = Gtk2::Window->new('toplevel'); $window->signal_connect(delete_event => sub { Gtk2->main_quit; return FALSE; }); $window->set_default_size(600, 400); $window->set_title("This is a Gtk2::Window"); # Note: we have to draw to something that is drawable, # and apparently Gtk2::Window isn't when it's at toplevel. my $vbox = Gtk2::VBox->new(); $window->add($vbox); # This is just to "prove" that it's actually Gtk2, not Ogre :) my $button = Gtk2::Button->new('Quit'); $button->signal_connect(clicked => sub { Gtk2->main_quit() }); $vbox->pack_start($button, TRUE, TRUE, 0); my $hbox = Gtk2::HBox->new(); $vbox->pack_end($hbox, TRUE, TRUE, 0); my $button2 = Gtk2::Button->new('Dance!'); $button2->signal_connect(clicked => sub { $self->toggleCameraPosition }); $hbox->pack_start($button2, TRUE, TRUE, 0); $self->{drawbutton} = $button2; $window->show_all(); $self->{window} = $window; } sub toggleCameraPosition { my ($self) = @_; $self->{mCamPos} = ($self->{mCamPos} == 200) ? -200 : 200; $self->{mCamera}->setPosition(0, 0, $self->{mCamPos}); $self->{mCamera}->lookAt(0, 50, 0); } sub createRoot { my ($self) = @_; # plugins.cfg should symlink to /etc/OGRE/plugins.cfg (at least on Ubuntu) # (ogre.cfg and Ogre.log are automatically created by the config dialog) $self->{root} = Ogre::Root->new('plugins.cfg', 'ogre.cfg', 'Ogre.log'); } sub defineResources { my ($self) = @_; my $cf = Ogre::ConfigFile->new(); # resources.cfg and its required media files are included in this directory. # You may want to change this, and use different media. # Look in the source distribution for OGRE under Samples/Media/ . $cf->load('resources.cfg'); # note: this is a Perlish replacement for iterators used in C++ my $secs = $cf->getSections(); foreach my $sec (@$secs) { my $secname = $sec->{name}; my $settings = $sec->{settings}; foreach my $setting (@$settings) { my ($typename, $archname) = @$setting; # xxx: getSingletonPtr could move outside the foreach loops my $rgm = Ogre::ResourceGroupManager->getSingletonPtr(); $rgm->addResourceLocation($archname, $typename, $secname); } } } sub setupRenderSystem { my ($self) = @_; my $root = $self->{root}; if (! $root->restoreConfig() && ! $root->showConfigDialog()) { die "User cancelled the config dialog!\n"; } } sub createRenderWindow { my ($self) = @_; # Note: we don't pass true, which creates a default window; # instead we set the render window manually to be the Gtk window $self->{root}->initialise(0, "this won't be displayed anyway"); # Note: we're drawing to a hbox, not the toplevel window. # I think it might be wrong, actually, how I implemented getWindowHandleString. # The examples I saw online were for custom widgets # which get added to Gtk ones, so they get the "parent" window. # I don't know if that's generally what we want. (??) my $handle = Ogre->getWindowHandleString($self->{drawbutton}); my $allocation = $self->{drawbutton}->allocation; my ($w, $h) = ($allocation->width, $allocation->height); $self->{mRenderWindow} = $self->{root}->createRenderWindow("OgreRenderWindow", $w, $h, 0, {parentWindowHandle => $handle}); } sub initializeResourceGroups { my ($self) = @_; my $tm = Ogre::TextureManager->getSingletonPtr(); $tm->setDefaultNumMipmaps(5); my $rgm = Ogre::ResourceGroupManager->getSingletonPtr(); $rgm->initialiseAllResourceGroups(); } sub setupScene { my ($self) = @_; my $root = $self->{root}; my $mgr = $root->createSceneManager(ST_GENERIC, 'Default SceneManager'); my $cam = $mgr->createCamera('Camera'); $self->{mCamPos} = 200; $cam->setPosition(0, 0, $self->{mCamPos}); $cam->lookAt(0, 50, 0); $cam->setNearClipDistance(5); $self->{mCamera} = $cam; my $vp = $self->{mRenderWindow}->addViewport($cam, 0, 0, 0, 1, 1); # xxx: annoying, C++ API has all values optional for ColourValue $vp->setBackgroundColour(Ogre::ColourValue->new(0.5, 0.5, 0.5, 1)); $cam->setAspectRatio($vp->getActualWidth / $vp->getActualHeight); $mgr->setAmbientLight(Ogre::ColourValue->new(0.8, 0.7, 0.6, 1)); my $ent1 = $mgr->createEntity('Robot', 'robot.mesh'); my $node1 = $mgr->getRootSceneNode()->createChildSceneNode('RobotNode'); $node1->attachObject($ent1); my $light = $mgr->createLight('Light1'); $light->setType(LT_POINT); $light->setPosition(0, 150, 250); $light->setDiffuseColour(1.0, 0.0, 0.0); $light->setSpecularColour(1.0, 0.0, 0.0); } sub update { my ($self) = @_; #$self->{root}->renderOneFrame(); $self->{mRenderWindow}->update(); return 1; # so Timeout repeats } sub startRenderLoop { my ($self) = @_; # update frame every 0.1 sec (for no reason, really) Glib::Timeout->add(100, sub { $_[0]->update() }, $self); Gtk2->main(); } 1; Ogre-0.60/examples/robot.pl0000755000175000017500000000756512146460465016067 0ustar slanningslanning#!/usr/bin/perl # Minimal example showing that the binding "works". # It just shows the robot from the basic OGRE tutorials, # a little rotated and scaled. # (Note: as there is no input handling, you'll have to Ctrl-C # the application after closing the window.) use strict; use warnings; main(); exit(0); sub main { my $app = App::Robot->new(); $app->go(); } package App::Robot; use Ogre 0.27 qw(:SceneType); use Ogre::ConfigFile; use Ogre::ColourValue; use Ogre::Degree; use Ogre::Light qw(:LightTypes); use Ogre::Node qw(:TransformSpace); use Ogre::Root; use Ogre::ResourceGroupManager; use Ogre::SceneManager; sub new { my ($pkg, %args) = @_; my $self = bless {}, $pkg; return $self; } sub DESTROY { my ($self) = @_; delete $self->{root}; } sub go { my ($self) = @_; $self->createRoot(); $self->defineResources(); $self->setupRenderSystem(); $self->createRenderWindow(); $self->initializeResourceGroups(); $self->setupScene(); $self->startRenderLoop(); } sub createRoot { my ($self) = @_; # plugins.cfg should symlink to /etc/OGRE/plugins.cfg (at least on Ubuntu) # (ogre.cfg and Ogre.log are automatically created by the config dialog) $self->{root} = Ogre::Root->new('plugins.cfg', 'ogre.cfg', 'Ogre.log'); } sub defineResources { my ($self) = @_; my $cf = Ogre::ConfigFile->new(); # resources.cfg and its required media files are included in this directory. # You may want to change this, and use different media. # Look in the source distribution for OGRE under Samples/Media/ . $cf->load('resources.cfg'); # note: this is a Perlish replacement for iterators used in C++ my $secs = $cf->getSections(); foreach my $sec (@$secs) { my $secname = $sec->{name}; my $settings = $sec->{settings}; foreach my $setting (@$settings) { my ($typename, $archname) = @$setting; # xxx: getSingletonPtr could move outside the foreach loops my $rgm = Ogre::ResourceGroupManager->getSingletonPtr(); $rgm->addResourceLocation($archname, $typename, $secname); } } } sub setupRenderSystem { my ($self) = @_; my $root = $self->{root}; if (! $root->restoreConfig() && ! $root->showConfigDialog()) { die "User cancelled the config dialog!\n"; } } sub createRenderWindow { my ($self) = @_; $self->{root}->initialise(1, 'Tutorial Render Window'); } sub initializeResourceGroups { my ($self) = @_; my $tm = Ogre::TextureManager->getSingletonPtr(); $tm->setDefaultNumMipmaps(5); my $rgm = Ogre::ResourceGroupManager->getSingletonPtr(); $rgm->initialiseAllResourceGroups(); } sub setupScene { my ($self) = @_; my $root = $self->{root}; my $mgr = $root->createSceneManager(ST_GENERIC, 'Default SceneManager'); my $cam = $mgr->createCamera('Camera'); $cam->setPosition(0, 10, 500); $cam->lookAt(0, 0, 0); $cam->setNearClipDistance(5); my $vp = $root->getAutoCreatedWindow()->addViewport($cam, 0, 0, 0, 1, 1); $vp->setBackgroundColour(Ogre::ColourValue->new(0.5, 0.5, 0.5, 1)); $cam->setAspectRatio($vp->getActualWidth / $vp->getActualHeight); $mgr->setAmbientLight(Ogre::ColourValue->new(0.8, 0.7, 0.6, 1)); my $ent1 = $mgr->createEntity('Robot', 'robot.mesh'); my $node1 = $mgr->getRootSceneNode()->createChildSceneNode('RobotNode'); $node1->attachObject($ent1); $node1->yaw(Ogre::Degree->new(-90), TS_LOCAL); $node1->roll(Ogre::Degree->new(-45), TS_LOCAL); $node1->pitch(Ogre::Degree->new(-30), TS_LOCAL); $node1->scale(.5, 2, 1); my $light = $mgr->createLight('Light1'); $light->setType(LT_POINT); $light->setPosition(0, 150, 250); $light->setDiffuseColour(1.0, 0.0, 0.0); $light->setSpecularColour(1.0, 0.0, 0.0); } sub startRenderLoop { my ($self) = @_; $self->{root}->startRendering(); } 1; Ogre-0.60/examples/manualobject.pl0000755000175000017500000001342312146460465017374 0ustar slanningslanning#!/usr/bin/perl # Draw objects using ManualObject # http://www.ogre3d.org/docs/api/html/classOgre_1_1ManualObject.html # http://www.ogre3d.org/wiki/index.php/ManualObject # http://www.ogre3d.org/wiki/index.php/Line3D # http://www.ogre3d.org/wiki/index.php/Circle # # Note: sorry if the Perl gets a bit advanced in parts... # I put a much simpler (though less flexible) # version of drawing just a square after __END__. # # Note 2: you can move the camera around as normal # with the arrow keys, Pg Up and Pg Down keys, and mouse # (you can zoom in on the thick circle and hit 'r' to see the triangles) package ManualObjectApp; use strict; use warnings; use Ogre 0.35; use Ogre::Math; use Ogre::RenderOperation qw(:OperationType); use Ogre::ExampleApplication; @ManualObjectApp::ISA = qw(Ogre::ExampleApplication); my %SHAPES = ( 'square' => sub { [ [-100.0, -100.0, 0.0], [100.0, -100.0, 0.0], [100.0, 100.0, 0.0], [-100.0, 100.0, 0.0], ] }, 'line 3D' => sub { [ [-80, -70, 50], [40, -20, 10], ] }, 'circle XY' => \&circle_xy, 'circle thick' => \&circle_thick, ); sub createScene { my ($self) = @_; $self->{mCamera}->setPosition(250, 150, 300); $self->{mCamera}->lookAt(0, 0, 0); foreach my $shape (keys %SHAPES) { $self->createObject($shape, $SHAPES{$shape}->()); } } my %index_meth = ( 1 => 'index', 3 => 'triangle', 4 => 'quad', ); # maybe I shouldn't've made this so "fancy" # since it makes it harder to understand sub createObject { # $vertices is an array ref of array refs my ($self, $name, $vertices, $index_tri_quad) = @_; $index_tri_quad = 1 unless defined $index_tri_quad; my $manual = $self->{mSceneMgr}->createManualObject($name); $manual->begin($self->getMaterialName, $index_tri_quad == 1 ? OT_LINE_STRIP : OT_TRIANGLE_LIST); # position the vertices foreach my $vertex (@$vertices) { $manual->position(@$vertex); } # index the vertices foreach my $p (map {$index_tri_quad * $_} 0 .. (@$vertices / $index_tri_quad) - 1) { # this is $manual->index($p) or $manual->quad($p, $p + 1, ...) ... $manual->${\$index_meth{$index_tri_quad}}(map {$p + $_} 0 .. $index_tri_quad - 1); } $manual->index(0) if $index_tri_quad == 1; # connect to beginning $manual->end(); $self->{mSceneMgr}->getRootSceneNode->createChildSceneNode->attachObject($manual); } sub getMaterialName { my ($self) = @_; # "BaseWhiteNoLighting" comes from somewhere in the ogre Samples/ directory return "BaseWhiteNoLighting"; # you could alternatively create a material manually, here "manual1Material" # (see the Line3D example - URL at top) # but I still need to wrap the `create` method #MaterialPtr myManualObjectMaterial = MaterialManager::getSingleton().create("manual1Material","debugger"); #myManualObjectMaterial->setReceiveShadows(false); #myManualObjectMaterial->getTechnique(0)->setLightingEnabled(true); #myManualObjectMaterial->getTechnique(0)->getPass(0)->setDiffuse(0,0,1,0); #myManualObjectMaterial->getTechnique(0)->getPass(0)->setAmbient(0,0,1); #myManualObjectMaterial->getTechnique(0)->getPass(0)->setSelfIllumination(0,0,1); } sub circle_xy { my $z = -40; my $radius = 70; my $accuracy = 5; my $pi = Ogre::Math->PI; my @vertices = (); for (my $theta = 0; $theta <= 2 * $pi; $theta += ($pi / ($radius * $accuracy))) { push @vertices, [$radius * cos($theta), $radius * sin($theta), $z]; } return \@vertices; } # uses triangles for thickness sub circle_thick { my $z = 10; my $radius = 50; my $thickness = 4; # must be less than $radius.. my $accuracy = 5; my $pi = Ogre::Math->PI; my @vertices = (); for (my $theta = 0; $theta <= 2 * $pi; $theta += ($pi / ($radius * $accuracy))) { # NB: order is important here; only one side of the circle is visible # so its triangles' normals have to be facing you # (I guess that's a property of the material?) push @vertices, [($radius - $thickness) * cos($theta), ($radius - $thickness) * sin($theta), $z]; push @vertices, [($radius - $thickness) * cos($theta - $pi / ($radius * $accuracy)), ($radius - $thickness) * sin($theta - $pi / ($radius * $accuracy)), $z]; push @vertices, [$radius * cos($theta - $pi / ($radius * $accuracy)), $radius * sin($theta - $pi / ($radius * $accuracy)), $z]; push @vertices, [$radius * cos($theta), $radius * sin($theta), $z]; } # the 2nd return value tells createObject() to use quad (4) # instead of index (the default == 1) or triangle (3) return (\@vertices, 4); } 1; package main; ManualObjectApp->new->go(); __END__ #!/usr/bin/perl package ManualObjectApp; use strict; use warnings; use Ogre 0.35; use Ogre::Math; use Ogre::RenderOperation qw(:OperationType); use Ogre::ExampleApplication; @ManualObjectApp::ISA = qw(Ogre::ExampleApplication); sub createScene { my ($self) = @_; my $manual = $self->{mSceneMgr}->createManualObject("square"); $manual->begin("BaseWhiteNoLighting", OT_LINE_STRIP); $manual->position(-100.0, -100.0, 0.0); $manual->index(0); $manual->position(100.0, -100.0, 0.0); $manual->index(1); $manual->position(100.0, 100.0, 0.0); $manual->index(2); $manual->position(-100.0, 100.0, 0.0); $manual->index(3); $manual->index(0); # close the loop $manual->end(); $self->{mSceneMgr}->getRootSceneNode->createChildSceneNode->attachObject($manual); } 1; package main; ManualObjectApp->new->go(); Ogre-0.60/examples/wx.pl0000755000175000017500000001450512146460465015370 0ustar slanningslanning#!/usr/bin/perl # modified from Wx/samples/minimal.pl # and http://www.ogre3d.org/wiki/index.php/WxOgre_for_OGRE_v1.4 package OgrePane; use strict; use warnings; use Wx; use base qw(Wx::Control); use Wx::Timer; use Wx::Event qw(EVT_SIZE EVT_ERASE_BACKGROUND EVT_TIMER); use Ogre 0.28 qw(:SceneType); use Ogre::ColourValue; use Ogre::ConfigFile; use Ogre::ResourceGroupManager; my $ID_RENDERTIMER = Wx::NewId(); sub new { my ($class, $parent) = @_; my $self = $class->SUPER::new($parent, -1); # WX members $self->{mTimer} = Wx::Timer->new($self, $ID_RENDERTIMER); # Ogre members $self->{mRoot} = undef; $self->{mViewport} = undef; $self->{mCamera} = undef; $self->{mSceneMgr} = undef; $self->{mRenderWindow} = undef; $self->createOgreRenderWindow(); # Create all Ogre objects $self->toggleTimerRendering(); # Start the rendering timer EVT_SIZE($self, \&OnSize); EVT_ERASE_BACKGROUND($self, \&OnEraseBackground); EVT_TIMER($self, $ID_RENDERTIMER, \&OnRenderTimer); return $self; } sub DESTROY { my ($self) = @_; if ($self->{mViewport}) { $self->{mRenderWindow}->removeViewport($self->{mViewport}->getZOrder()); delete $self->{mViewPort}; } $self->{mRoot}->detachRenderTarget($self->{mRenderWindow}); delete $self->{mRenderWindow}; delete $self->{mRoot}; } sub getCamera { return $_[0]->{mCamera}; } sub setCamera { my ($self, $cam) = @_; $self->{mCamera} = $cam; } # This is the point of the example, # passing your own window to Ogre # instead of it creating a default one. sub createOgreRenderWindow { my ($self) = @_; $self->{mRoot} = Ogre::Root->new(); $self->{mRoot}->restoreConfig(); # You have to pass false here, in order to tell # OGRE not to create a default window for you. # note to self: need to make 2nd arg optional $self->{mRenderWindow} = $self->{mRoot}->initialise(0, "OGRE Render Window"); # Note: this is specially added for Perl # (and much more convenient than the C++ version :) # and returns the string needed by createRenderWindow. my $handle = Ogre->getWindowHandleString($self->GetHandle()); my ($w, $h) = $self->GetSizeWH(); $self->{mRenderWindow} = $self->{mRoot}->createRenderWindow("OgreRenderWindow", $w, $h, 0, {parentWindowHandle => $handle}); # the rest is normal stuff $self->{mSceneMgr} = $self->{mRoot}->createSceneManager(ST_GENERIC, "ExampleSMInstance"); $self->{mCamera} = $self->{mSceneMgr}->createCamera("PlayerCam"); # note to self: need to wrap Vector3 version $self->{mCamera}->setPosition(0,0,500); # note to self: need to wrap Vector3 version $self->{mCamera}->lookAt(0,0,-300); $self->{mCamera}->setNearClipDistance(5); $self->{mViewport} = $self->{mRenderWindow}->addViewport($self->{mCamera}); $self->{mViewport}->setBackgroundColour(Ogre::ColourValue->new()); } sub toggleTimerRendering { my ($self) = @_; if ($self->{mTimer}->IsRunning) { $self->{mTimer}->Stop(); } $self->{mTimer}->Start(10); } sub OnSize { my ($self, $evt) = @_; my ($w, $h) = $self->GetSizeWH(); $self->{mRenderWindow}->resize($w, $h); $self->{mRenderWindow}->windowMovedOrResized(); $self->{mCamera}->setAspectRatio($w / $h); $self->update(); } sub OnEraseBackground { my ($self, $evt) = @_; $self->update(); } sub OnRenderTimer { my ($self, $evt) = @_; $self->update(); } sub update { my ($self) = @_; $self->{mRoot}->renderOneFrame(); } 1; ################## package MainFrame; use strict; use warnings; use base qw(Wx::Frame); use Wx qw(wxOK wxICON_INFORMATION wxVERSION_STRING wxDefaultPosition wxDEFAULT_FRAME_STYLE wxNO_BORDER wxTE_MULTILINE wxLEFT wxBOTTOM wxTOP wxCENTER); use Wx::AUI; sub new { my ($class, $label) = @_; my $self = $class->SUPER::new(undef, -1, $label, wxDefaultPosition, Wx::Size->new(800, 600), wxDEFAULT_FRAME_STYLE); my $mgr = $self->{m_mgr} = Wx::AuiManager->new(); # notify wxAUI which frame to use # (xxx: the WxOgre_for_OGRE tutorial has SetFrame...) $mgr->SetManagedWindow($self); # create several text controls my $text1 = Wx::TextCtrl->new($self, -1, "Pane 1 - sample text", wxDefaultPosition, Wx::Size->new(250, 150), wxNO_BORDER | wxTE_MULTILINE); my $text2 = Wx::TextCtrl->new($self, -1, "Pane 2 - sample text", wxDefaultPosition, Wx::Size->new(250, 150), wxNO_BORDER | wxTE_MULTILINE); my $text3 = Wx::TextCtrl->new($self, -1, "Main content window", wxDefaultPosition, Wx::Size->new(250, 150), wxNO_BORDER | wxTE_MULTILINE); # add the panes to the manager $mgr->AddPane($text1, wxLEFT, "Pane Number One"); $mgr->AddPane($text2, wxBOTTOM, "Pane Number Two"); # xxx: unable to resolve overloaded method for "Wx::AuiManager::AddPane" # if I leave out the empty string $mgr->AddPane($text3, wxTOP, ""); $self->{wxOgrePane} = OgrePane->new($self); $mgr->AddPane($self->{wxOgrePane}, wxCENTER, "Ogre Pane"); # tell the manager to "commit" all the changes just made $mgr->Update(); return $self; } # called when the user selects the 'Exit' menu item sub OnQuit { my ($self, $event) = @_; # closes the frame $self->Close(1); } # called when the user selects the 'About' menu item sub OnAbout { my ($self, $event) = @_; # display a simple about box my $message = sprintf <{wxOgrePane}->update(); } 1; ############# package main; # create an instance of the Wx::App-derived class my $app = Wx::SimpleApp->new(); my $frame = MainFrame->new("wxOgre in Perl"); $app->SetTopWindow($frame); $frame->Show(); $frame->UpdateOgre(); $app->MainLoop(); Ogre-0.60/Makefile.PL0000644000175000017500000001144212162402430014505 0ustar slanningslanninguse strict; use warnings; use ExtUtils::MakeMaker; my $OGRE_REQ_VERSION = '1.8.0'; my $OIS_REQ_VERSION = '0.05'; main(); exit; sub main { my $fixed_args = fixed_args('Ogre'); my $varied_args = varied_args(); my $gpp_warn_args = gpp_warn_args(); WriteMakefile(%$fixed_args, %$varied_args, %$gpp_warn_args); } sub gpp_warn_args { # If you're using gcc >= 4.2, you'd get warnings like this during `make` : # OIS.c:1835: warning: deprecated conversion from string constant to 'char*' # The C code generated by `xsubpp` uses literal string constants # as args to functions expecting char*. This disables those warnings.... if (my_compiler() eq 'g++') { my $str = `g++ -dumpversion`; unless ($?) { chomp $str; my ($v, $s) = split /\./, $str; if (($v == 4 && $s >= 2) || $v > 4) { # http://www.nntp.perl.org/group/perl.perl5.porters/2012/03/msg184347.html my $ccflags = $Config::Config{ccflags} || ''; return {'CCFLAGS' => "-Wno-write-strings $ccflags"}; } } } # there will be no warnings, or we'll just tolerate them return {}; } sub fixed_args { my ($pkg) = @_; return { 'NAME' => $pkg, 'VERSION_FROM' => "$pkg.pm", 'ABSTRACT_FROM' => "$pkg.pm", 'AUTHOR' => 'Scott Lanning ', 'LD' => '$(CC)', 'OBJECT' => '$(O_FILES)', 'MAN3PODS' => {}, 'XSOPT' => '-C++', 'TYPEMAPS' => ['perlobject.map'], 'META_MERGE' => { no_index => { directory => [ qw/t examples genscripts / ], }, }, }; } sub varied_args { my (@errors, @cflags, @libs, @defines) = (); # Make sure OGRE libs are known by pkg-config my $pkgname = 'OGRE'; push @errors, check_pkg_config($pkgname, $OGRE_REQ_VERSION); if (@errors) { die(map { "$_$/" } @errors); } # Get include dirs and defines push @cflags, pkg_config($pkgname, 'cflags'); # Get lib dirs push @libs, pkg_config($pkgname, 'libs'); # Check if Gtk+ is installed $pkgname = 'gtk+-2.0'; @errors = check_pkg_config($pkgname, '2.0.0'); if (@errors) { print "\nNote: gtk+ support not enabled.\nReasons:\n", map({ "- $_$/" } @errors); print "See README.txt for information on enabling Gtk2 support.\n"; } else { print "\nEnabling gtk+ support.\n"; push @cflags, pkg_config($pkgname, 'cflags'); push @libs, pkg_config($pkgname, 'libs'); push @defines, '-DPERLOGRE_HAS_GTK2'; } my %prereqs = ( 'Test::More' => 0, ); # Check if optional Perl modules are installed. unless (eval { require OIS && $OIS::VERSION >= $OIS_REQ_VERSION }) { my $msg = "\nNote: the Perl module OIS >= $OIS_REQ_VERSION is not installed,\n" . "so you won't be able to run some examples\n" . "or use Ogre::ExampleFrameListener.\n" . "Installing OIS would be a very good idea\n" . "unless you have some other way to handle keyboard and mouse input.\n" . "It's fine to install it after installing Ogre.\n\n" . "Do you want to install OIS now?"; my $val = ExtUtils::MakeMaker::prompt($msg, 'n'); if ($val =~ /^y/i) { $prereqs{'OIS'} = $OIS_REQ_VERSION; print "\nOIS >= $OIS_REQ_VERSION added to prerequisites.\n"; } } return { 'PREREQ_PM' => \%prereqs, 'CC' => my_compiler(), 'INC' => join(' ', @cflags), 'LIBS' => join(' ', @libs), (@defines ? ('DEFINE' => join(' ', @defines)) : ()), }; } sub my_compiler { return $ENV{'CXX'} || 'g++'; } sub check_pkg_config { my ($pkg, $required_version) = @_; my $pc = 'pkg-config'; my @errors = (); # Check that pkg-config is installed my $pcver = `$pc --version`; if ($pcver eq '') { push @errors, "$pc not found"; } else { # Check that pkg-config knows about the package my $pkgexists = `$pc --exists $pkg`; if ($?) { push @errors, "Package $pkg not found by $pc"; } else { # Check that the package is the right version my $pkgver = `$pc --atleast-version='$required_version' $pkg`; if ($?) { push @errors, "Package $pkg is not the right version (at least $required_version)"; } } } return @errors; } sub pkg_config { my ($pkg, $option) = @_; my $str = `pkg-config --$option $pkg`; if ($?) { die "pkg-config --$option $pkg: $str\n"; } else { chomp $str; return $str; } } Ogre-0.60/perlOGREGUI.cpp0000644000175000017500000000265012146460465015242 0ustar slanningslanning#include "perlOGREGUI.h" #ifdef PERLOGRE_HAS_GTK2 // Don't assume I know what I'm doing; please send patches. Ogre::String getWindowHandleString(GtkWidget *widget) { Ogre::String handle; // GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); gtk_widget_realize(widget); GdkWindow *parent = gtk_widget_get_parent_window(widget); // gdk_window_show(parent); #if defined(__WIN32__) || defined(_WIN32) handle = Ogre::StringConverter::toString((unsigned long) GDK_WINDOW_HWND(parent)); #else // #elif defined(__WXGTK__) GdkDisplay* display = gdk_drawable_get_display(GDK_DRAWABLE(parent)); Display *xdisplay = GDK_DISPLAY_XDISPLAY(display); XSync(xdisplay, false); GdkScreen* screen = gdk_drawable_get_screen(GDK_DRAWABLE(parent)); Screen *xscreen = GDK_SCREEN_XSCREEN(screen); int screen_number = XScreenNumberOfScreen(xscreen); // XID xid_parent = GDK_WINDOW_XWINDOW(parent); // "parentWindowHandle" // handle = // Ogre::StringConverter::toString(reinterpret_cast(xdisplay)) + ":" + // Ogre::StringConverter::toString(static_cast(screen_number)) + ":" + // Ogre::StringConverter::toString(static_cast(xid_parent)); handle = Ogre::StringConverter::toString(static_cast(GDK_WINDOW_XID(parent))); #endif // dunno what MacOS needs - you tell me return handle; } #endif /* PERLOGRE_HAS_GTK2 */ Ogre-0.60/genscripts/0000755000175000017500000000000012162410433014714 5ustar slanningslanningOgre-0.60/genscripts/strip-api-docs.pl0000755000175000017500000000212612146460465020127 0ustar slanningslanning#!/usr/bin/perl # this is a utility script I use where I just copy API docs from my browser # and this will edit it into mostly useful XS (still requires editing, # but it's faster than doing it manually) # I usually do this after init-class.pl, then # ./genscripts/strip-api-docs.pl $CLASSNAME >> xs/$CLASSNAME.xs # [paste API text] # ^d use strict; use warnings; main(); exit(); sub main { die "usage: $0 classname < [text]\n" unless @ARGV; my $class = shift @ARGV; while (<>) { # lines that begin with whitespace are documentation, # I turn them into blank lines $_ = $/ if /^\s/; # skip methods beginning with underscore $_ = $/ if / \t_/; s/\(void\)/()/; s/ \(/(/; s/\) const/)/; s/=0$//; s/virtual //; s/ushort/unsigned short/g; s/const String &/String /g; # space followed by tab always separates # the return value from the method name; # I put the method on the next line with classname prepended s/ {1,2}\t/\n${class}::/; print; } } Ogre-0.60/genscripts/showmeths.pl0000755000175000017500000002403012146456743017314 0ustar slanningslanning#!/usr/bin/perl # Parses an XML file generated by `gccxml`, # which is an XML representation of the C++ header file, # to find all the methods of all the classes. # Big thanks to Vladimir Olenin for pointing out `gccxml`, # which made life much easier. use strict; use warnings; use Cwd; use File::Copy; use File::Path; use File::Slurp; use File::Spec; # Change this to the directory where Ogre.h is located on your system. # (maybe could get this from `pkg-config --cflags OGRE`) my $INCDIR = File::Spec->catdir(File::Spec->rootdir, 'usr', 'include', 'OGRE'); main(); exit(); sub main { # my $xmlfile = File::Spec->catfile(File::Spec->tmpdir, 'Ogre.xml'); my $xmlfile = File::Spec->catfile('Ogre.xml'); generate_xml($xmlfile); show_methods(parse_xml($xmlfile)); } sub show_methods { my ($ns, $classes, $methods, $types) = @_; # note: there's really only one namespace foreach my $nsid (sort keys %$ns) { # class ids schwartzed by class name # and skipping ones not in the namespace my @cids = map {$_->[0]} sort {$a->[1] cmp $b->[1]} map {[$_, $classes->{$_}{demangled}]} grep { exists $ns->{$nsid}{members}{$_} } keys %$classes; foreach my $cid (@cids) { my $class = $classes->{$cid}; print "CLASS $class->{demangled}\n"; # class method ids schwartzed by name, # by happy coincidence this usually puts constructors first my @methids = map {$_->[0]} sort {$a->[1] cmp $b->[1]} map {[$_, $methods->{$_}->{name}]} grep { exists $methods->{$_} } keys %{ $class->{members} }; foreach my $methid (@methids) { my $meth = $methods->{$methid}; print "METHOD: $meth->{demangled}\n"; print "NAME: $meth->{name}\n"; if (exists $meth->{args}) { print "ARGS:\n"; # foreach my $arg (@{ $meth->{args} }) { for my $i (0 .. @{ $meth->{args} } - 1) { my $arg = $meth->{args}[$i]; my $type = get_type($arg->{type}, $types, $classes); my $name = exists($arg->{name}) ? $arg->{name} : "arg$i"; print "\t$name; type=$type"; print '; default=', $arg->{default} if exists($arg->{default}); print $/; } } if (exists $meth->{returns}) { my $type = get_type($meth->{returns}, $types, $classes); print "RETURNS: $type\n"; } if (exists $meth->{access}) { print "ACCESS: $meth->{access}\n"; } print "CONST: $meth->{const}\n"; print "STATIC: $meth->{static}\n"; } } } } sub generate_xml { my ($xmlfile) = @_; return if -r $xmlfile; my $orig_dir = getcwd(); chdir($INCDIR) || die "Can't chdir to '$INCDIR': $!"; # xxx: I'm not even sure gccxml is available on non-unix systems... my @args = ('gccxml', 'Ogre.h', qq{-fxml=$xmlfile}); print STDERR "Generating XML... \n"; print STDERR qq{(note: an error about missing OgrePrerequisites is "normal")\n}; # rather than check system's return value, # which would normally make sense.... # check for the existence of the XML file system(@args); unless (-r $xmlfile && -s _) { die "system @args failed: $?"; } print "done\n"; chdir($orig_dir) || die "Can't chdir to '$orig_dir': $!"; } # Types are really tricky... sub get_type { my ($typeid, $types, $classes, @types_pointed) = @_; # Class or Struct if (exists $classes->{$typeid}) { my $ret = lc($classes->{$typeid}{label}) . ' ' . $classes->{$typeid}{demangled}; $ret .= ' [' . join(', ', @types_pointed) . ']' if @types_pointed; return $ret; } if (exists $types->{$typeid}) { my $label = $types->{$typeid}{label}; if ($label eq 'FundamentalType' or $label eq 'Typedef' or $label eq 'Enumeration') { my $ret = $types->{$typeid}{name}; $ret .= ' [' . join(', ', @types_pointed) . ']' if @types_pointed; return $ret; } if ($label eq 'FunctionType') { my $ret = $label; $ret .= ' [' . join(', ', @types_pointed) . ']' if @types_pointed; return $ret; } # anything that points to another type if (exists $types->{$typeid}{type}) { push @types_pointed, $types->{$typeid}{label}; return get_type($types->{$typeid}{type}, $types, $classes) } } print "WARN: unresolved type ID '$typeid'"; print ' [' . join(', ', @types_pointed) . ']' if @types_pointed; print $/; return $typeid; } # This is probably the worst-implemented xml parser ever. # You'd think I'd use a SAX parser, but no.... sub parse_xml { my ($file) = @_; my %ns = (); my %classes = (); my %methods = (); my $method_id = ''; my %types = (); my $functiontype_id = ''; print STDERR "Parsing XML... "; open(my $xml, $file) || die "Can't open '$file': $!"; while (<$xml>) { if (m{{demangled}) && $attr->{demangled} eq 'Ogre'; $ns{$attr->{id}}{demangled} = $attr->{demangled}; # members is a list of 'id' numbers # which point to any member of the namespace ('Ogre'). # This is just used to narrow down the ids so they # don't include any non-members. foreach my $member (map { split } $attr->{members}) { $ns{$attr->{id}}{members}{$member}++; } } elsif (m{<(Class|Struct) }) { my $label = $1; my $attr = get_attrs($_); # To resolve some types, we apparently need Classes outside the Ogre namespace # (e.g. class type_info....), so I commented out these `next' # next unless exists($attr->{demangled}) && $attr->{demangled} =~ /^Ogre/; # these are usually iterator or template classes, # so I skip them (maybe shouldn't skip the template ones) # next if $attr->{demangled} =~ /_|&/; # an empty class? useless # next unless exists($attr->{members}); $classes{$attr->{id}}{label} = $label; $classes{$attr->{id}}{demangled} = $attr->{demangled}; # like Namespace, this members is a list of ids $classes{$attr->{id}}{members} = {}; $attr->{members} = [] unless exists $attr->{members}; # ugh foreach my $member_id (map { split } $attr->{members}) { $classes{$attr->{id}}{members}{$member_id}++; } } elsif (m{<(\w+Type|Typedef|Enumeration) }) { my $label = $1; my $attr = get_attrs($_); $types{$attr->{id}}{label} = $label; # Enumeration doesn't have a type attr $types{$attr->{id}}{type} = $attr->{type} if exists($attr->{type}); # Typedef $types{$attr->{id}}{name} = $attr->{name} if exists($attr->{name}); # FunctionType if ($label eq 'FunctionType') { $functiontype_id = $attr->{id}; } } # note: there's also Destructor elsif (m{<(Method|Constructor) }) { my $attr = get_attrs($_); # private ones won't work... next unless exists($attr->{name}); next if $attr->{name} =~ /^_/; next if exists($attr->{access}) && $attr->{access} eq 'private'; $method_id = $attr->{id}; $methods{$method_id}{demangled} = $attr->{demangled}; if (exists($attr->{access})) { $methods{$method_id}{access} = $attr->{access}; } if (exists($attr->{returns})) { $methods{$method_id}{returns} = $attr->{returns}; } $methods{$method_id}{name} = $attr->{name}; $methods{$method_id}{const} = exists($attr->{const}) ? 'yes' : 'no'; $methods{$method_id}{static} = exists($attr->{static}) ? 'yes' : 'no'; # empty tag if (m{/>$}) { # there won't be a separate end tag, so no Arguments $method_id = ''; } } elsif ($method_id or $functiontype_id) { if (m{ $attr->{type}, # an ID ); $arg{name} = $attr->{name} if exists($attr->{name}); # not for FunctionType, $arg{default} = $attr->{default} if exists($attr->{default}); if ($method_id) { push @{ $methods{$method_id}{args} }, \%arg; } elsif ($functiontype_id) { push @{ $types{$functiontype_id}{args} }, \%arg; } } } else { # print STDERR "WTF: $_\n" if /Typedef/; } } close($xml); print STDERR "done.\n"; return(\%ns, \%classes, \%methods, \%types); } sub xml_unescape { for ($_[0]) { s{<}{<}g; s{>}{>}g; s{&}{&}g; s{"}{"}g; s{'}{'}g; } return $_[0]; } sub get_attrs { my %attrs = map { xml_unescape($_) } $_[0] =~ / (\w+)="([^"]*)"/g; return \%attrs; } Ogre-0.60/genscripts/genconsts.pl0000755000175000017500000002414012146460465017274 0ustar slanningslanning#!/usr/bin/perl # Run this from the top directory (where Ogre.pm is). # Parses an XML file generated by `gccxml`, # which is an XML representation of the C++ header file, # for all the enums. # Big thanks to Vladimir Olenin for pointing out `gccxml`, # which made life much easier. use strict; use warnings; use Cwd; use File::Copy; use File::Path; use File::Slurp; use File::Spec; # Change this to the directory where Ogre.h is located on your system. # (maybe could get this from `pkg-config --cflags OGRE`) my $INCDIR = File::Spec->catdir(File::Spec->rootdir, 'usr', 'include', 'OGRE'); # Don't change these my $BEGINSTRING = 'GENERATED CONSTANTS BEGIN'; my $ENDSTRING = 'GENERATED CONSTANTS END'; main(); exit(); sub main { my $xmlfile = File::Spec->catfile(File::Spec->tmpdir, 'Ogre.xml'); generate_xml($xmlfile); my ($ns_members, $class_members, $enums) = parse_xml($xmlfile); # note: although there are 3 namespaces, # only 'Ogre' has enums (hopefully stays that way...) my $cwd = File::Spec->curdir; my $xsfile = File::Spec->catfile($cwd, 'Ogre.xs'); my $pmfile = File::Spec->catfile($cwd, 'Ogre.pm'); my $typemapfile = File::Spec->catfile($cwd, 'typemap'); update_consts($ns_members, $class_members, $enums, $xsfile, \&print_enums_xs); update_consts($ns_members, $class_members, $enums, $typemapfile, \&print_enums_typemap); update_consts($ns_members->{Ogre}, undef, $enums, $pmfile, \&print_exports_pm, 'Ogre'); foreach my $pkg (sort keys %$class_members) { # skip if this package has no enums next unless grep { exists($class_members->{$pkg}{$_}) } keys(%$enums); my @dirs = split(/::/, $pkg); $pmfile = File::Spec->catfile($cwd, @dirs) . '.pm'; ensure_file_ready($pmfile, $pkg); update_consts(undef, $class_members->{$pkg}, $enums, $pmfile, \&print_exports_pm, $pkg); } } sub generate_xml { my ($xmlfile) = @_; return if -r $xmlfile; my $orig_dir = getcwd(); chdir($INCDIR) || die "Can't chdir to '$INCDIR': $!"; # xxx: I'm not even sure gccxml is available on non-unix systems... my @args = ('gccxml', 'Ogre.h', qq{-fxml=$xmlfile}); print STDERR "Generating XML... \n"; print STDERR qq{(note: an error about missing OgrePrerequisites is "normal")\n}; # rather than check system's return value, # which would normally make sense.... # check for the existence of the XML file system(@args); unless (-r $xmlfile && -s _) { die "system @args failed: $?"; } print "done\n"; chdir($orig_dir) || die "Can't chdir to '$orig_dir': $!"; } sub update_consts { # $pkg added as a hack for print_exports_pm... my ($ns_members, $class_members, $enums, $newfile, $printer, $pkg) = @_; print STDERR "Updating $newfile... "; # backup old file my $oldfile = $newfile . '.bak~'; unless (copy($newfile, $oldfile)) { print STDERR "Couldn't copy '$oldfile' '$newfile': $!\n"; return; } my $gensection = 0; open(my $newfh, "> $newfile") || die "Can't open file '$newfile': $!"; open(my $oldfh, $oldfile) || die "Can't open file '$oldfile': $!"; while (<$oldfh>) { if (m{$BEGINSTRING}) { $gensection = 1; print $newfh $_; } elsif (m{$ENDSTRING}) { # where the work actually is done, # updating the lines between the begin and end strings $printer->($newfh, 'namespace', $ns_members, $enums, $pkg) if defined $ns_members; $printer->($newfh, 'class', $class_members, $enums, $pkg) if defined $class_members; print $newfh $_; $gensection = 0; } elsif ($gensection) { next; } else { print $newfh $_; } } close($oldfh); close($newfh); print STDERR "done.\n"; } sub print_enums_xs { my ($fh, $label, $members, $enums) = @_; foreach my $key (sort keys %$members) { (my $stash = "stash_$key") =~ tr/:/_/; (my $isa = "isa_$key") =~ tr/:/_/; my $enumstr = ''; foreach my $memberid (keys %{ $members->{$key} }) { if (exists $enums->{$memberid}) { $enumstr .= "\n\t// enum: $enums->{$memberid}{name}\n"; foreach my $valname (@{ $enums->{$memberid}{valname} }) { $enumstr .= qq{\tnewCONSTSUB($stash, "$valname", newSViv(${key}::${valname}));\n}; } } } if ($enumstr) { print $fh qq{\tHV *$stash = gv_stashpv("$key", TRUE);\n}; # xxx: I was gonna try to implement %EXPORT_TAGS here, # but nah... :) It's going in the Perl modules. # print $fh qq{\tAV *$isa = get_av("${key}::ISA", TRUE);\n}; # print $fh qq{\tav_push($isa, newSVpv("Exporter", 8));\n}; print $fh "$enumstr\n"; } } } sub print_enums_typemap { my ($fh, $label, $members, $enums) = @_; my %names = (); foreach my $key (keys %$members) { foreach my $memberid (keys %{ $members->{$key} }) { if (exists $enums->{$memberid}) { $names{$enums->{$memberid}{name}}++; } } } foreach my $name (sort keys %names) { print $fh "$name\tT_IV\n"; } } sub print_exports_pm { # note: members is different here than in print_enums_xs, # only the particular package is passed. # $pkg was added for @ISA, etc. (to make this more flexible # in case @ISA is assigned to outside the generated part) my ($fh, $label, $members, $enums, $pkg) = @_; my $oldfh = select($fh); print q{require Exporter;} . $/; printf q{unshift @%s::ISA, 'Exporter';} . $/ . $/, $pkg; # xxx: this isn't quite done - instead of assigning to the hash, # should assign to its keys, otherwise this will overwrite any # assignments done outside the generated part printf q{%%%s::EXPORT_TAGS = (} . $/, $pkg; # should sort this by name rather than ID foreach my $memberid (sort keys %$members) { if (exists $enums->{$memberid}) { my $name = $enums->{$memberid}{name}; print "\t'$name' => [qw(\n"; foreach my $valname (@{ $enums->{$memberid}{valname} }) { print "\t\t$valname\n"; } print "\t)],\n"; } } print ");\n\n"; printf q{$%s::EXPORT_TAGS{'all'} = [ map { @{ $%s::EXPORT_TAGS{$_} } } keys %%%s::EXPORT_TAGS ];} . $/, $pkg, $pkg, $pkg; printf q{@%s::EXPORT_OK = @{ $%s::EXPORT_TAGS{'all'} };} . $/, $pkg, $pkg; printf q{@%s::EXPORT = ();} . $/, $pkg; select($oldfh); } # make sure that # 1) the file exists already # 2) it's got the begin and end strings sub ensure_file_ready { my ($file, $pkg) = @_; # it's there, not empty, so check if strings are there if (-r $file && -s _) { my @lines = read_file($file); # we're good return if grep { /$BEGINSTRING/ } @lines; for (@lines) { # find the last line and put the strings before it if (/^(1;|__END__)$/) { $_ = "########## $BEGINSTRING\n" . "########## $ENDSTRING\n\n" . $_; last; } } write_file($file, @lines); return; } # it's not there, or empty, so write a new file else { # xxx: should automate this too... print STDERR "MISSING: Add this to Ogre.pm and MANIFEST:\n"; (my $manifest = $file) =~ s{^.*(Ogre/.+\.pm)$}{$1}; print STDERR "use $pkg;\n$manifest\n"; # make sure directory exists my (undef, $dirs) = File::Spec->splitpath($file); eval { mkpath($dirs) }; if ($@) { print STDERR "SKIPPING: can't make dir '$dirs': $@"; return; } open(my $fh, "> $file") || die "Can't create file '$file': $!"; my $oldfh = select($fh); print "package $pkg;\n\nuse strict;\nuse warnings;\n\n\n"; print "########## $BEGINSTRING\n########## $ENDSTRING\n"; print "1;\n\n__END__\n"; select($oldfh); close($fh); } } sub parse_xml { my ($file) = @_; my %ns_members = (); my %class_members = (); my %enums = (); my $enumid = ''; print STDERR "Parsing XML... "; open(my $xml, $file) || die "Can't open '$file': $!"; while (<$xml>) { # map if (m{catdir(File::Spec->rootdir, 'usr', 'include', 'OGRE'); my $XSDIR = File::Spec->catdir(File::Spec->curdir, 'xs'); my $PMDIR = File::Spec->catdir(File::Spec->curdir, 'Ogre'); # Classes to not generate for whatever reason my %SKIPCLASS = ( AlignedMemory => "C++ specific", CompositorChain => "inherits from a listener class (weird...)", IntersectionSceneQueryListener => "listener class", LogListener => "listener class", RaySceneQueryListener => "listener class", RenderQueueListener => "listener class", RenderTargetListener => "listener class", SceneQueryListener => "listener class", ShadowListener => "listener class", UTFString => "can be replaced by String (?)", VertexBoneAssignment_s => "struct", # causing too many problems MeshSerializerImpl_v1_1 => 'too much trouble', MeshSerializerImpl_v1_2 => 'too much trouble', MeshSerializerImpl_v1_3 => 'too much trouble', MeshSerializerImpl => 'too much trouble', MeshSerializer => 'too much trouble', ); # Where parsed XML data is stored with Storable my $STOREDXML = File::Spec->catfile(File::Spec->curdir, 'StoredXSUBs.dat'); # Don't change these, they're used as markers in the xs files my $BEGINSTRING = 'GENERATED XSUBS BEGIN'; my $ENDSTRING = 'GENERATED XSUBS END'; my $BEGINBASES = 'GENERATED BASES BEGIN'; my $ENDBASES = 'GENERATED BASES END'; my $BEGINTM = 'GENERATED TYPEMAPS BEGIN'; my $ENDTM = 'GENERATED TYPEMAPS END'; # This is only used by print_xsubs and the subs it calls, # to determine whether to print the method or not # (i.e. its arg types and return types are supported) my $PRINT_XSUB; # This is just to keep track of how many xsubs are generated my $XSUBCOUNT = 0; # This keeps track of types for the typemap file # (doesn't include enums, or specially-treated types like String or Real) my %TYPEMAPS = (); main(); exit(); sub main { # my $xmlfile = File::Spec->catfile(File::Spec->tmpdir, "Ogre.xml"); my $xmlfile = File::Spec->catfile(File::Spec->curdir, "Ogre.xml"); generate_xml($xmlfile); my ($ns, $classes, $methods, $types) = parse_xml($xmlfile); update_files($ns, $classes, $methods, $types); } sub update_files { my ($ns, $classes, $methods, $types) = @_; init_dirs($XSDIR, $PMDIR); my $cids = sorted_class_ids($ns, $classes); foreach my $cid (@$cids) { update_xs_file($classes, $cid, $methods, $types); update_pm_file($classes, $cid); } print STDERR "Generated $XSUBCOUNT xsubs\n"; } sub init_dirs { foreach my $dir (@_) { unless (-d $dir) { mkdir($dir) || die "Couldn't mkdir '$dir': $!"; } } } # update inheritance in .pm files sub update_pm_file { my ($classes, $cid) = @_; my $class = $classes->{$cid}; return unless exists $class->{bases}; my $classname = $classes->{$cid}{demangled}; (my $classtype = $classname) =~ s/^Ogre:://; if (exists $SKIPCLASS{$classtype}) { return; } my @basenames = grep { ! /<.+>/ } # exclude template classes, STL types (vector, hash_map, etc.) map { $classes->{$_}{demangled} } split(/ /, $class->{bases}); my $file = File::Spec->catfile($PMDIR, $classtype . '.pm'); if (-f $file) { # see if we need to add begin/end strings my @lines = read_file($file); unless (first { /$BEGINBASES/ } @lines) { for (@lines) { if (/^package /) { $_ .= "\n########## $BEGINBASES\n########## $ENDBASES\n\n"; } } } write_file($file, \@lines); } else { create_pm_file($file, $classname); } # xxx: I need to find/make a module for this "generate" crap # backup old file my $oldfile = $file . '.bak~'; unless (copy($file, $oldfile)) { warn "Couldn't copy '$oldfile' '$file': $!\n"; return; } my $gensection = 0; open(my $newfh, "> $file") || die "Can't open file '$file': $!"; open(my $oldfh, $oldfile) || die "Can't open file '$oldfile': $!"; while (<$oldfh>) { if (m{$BEGINBASES} && !$gensection) { $gensection = 1; print $newfh $_, $/; } elsif (m{$ENDBASES}) { # where the work actually is done, # updating the lines between the begin and end strings foreach my $basename (@basenames) { # Got a little carried away with std::exception here :) # and I don't know why some classes inherit from Listener classes! next if $basename =~ /^std::/ || $basename =~ /Listener$/; print $newfh "use $basename;\n"; print $newfh "push \@${classname}::ISA, '$basename';\n"; } print $newfh $/, $_; # end string $gensection = 0; # outta here } elsif ($gensection) { next; } else { print $newfh $_; } } if ($gensection) { die "No end string found in file '$file'\n"; } close($oldfh); close($newfh); } sub create_pm_file { my ($file, $classname) = @_; my @lines = "package $classname;\n\n"; push @lines, "use strict;\nuse warnings;\n\n"; push @lines, "########## $BEGINBASES\n"; push @lines, "########## $ENDBASES\n\n"; push @lines, "1;\n\n__END__\n"; write_file($file, \@lines); } sub update_xs_file { my ($classes, $cid, $methods, $types) = @_; my $class = $classes->{$cid}{demangled}; if ($class =~ /^Ogre::([^:]+)$/) { my $classtype = $1; if (exists $SKIPCLASS{$classtype}) { warn "skipped class $classtype: $SKIPCLASS{$classtype}\n"; return; } my $file = File::Spec->catfile($XSDIR, $classtype . '.xs'); xs_file_init($file, $class); # find generated section, update update_xsubs($file, $classes, $cid, $methods, $types); } else { die "unsupported classname '$class'\n"; } } sub update_xsubs { my ($newfile, $classes, $cid, $methods, $types) = @_; my $class = $classes->{$cid}{demangled}; # backup old file my $oldfile = $newfile . '.bak~'; unless (copy($newfile, $oldfile)) { warn "Couldn't copy '$oldfile' '$newfile': $!\n"; return; } my $gensection = 0; open(my $newfh, "> $newfile") || die "Can't open file '$newfile': $!"; open(my $oldfh, $oldfile) || die "Can't open file '$oldfile': $!"; while (<$oldfh>) { if (m{$BEGINSTRING} && !$gensection) { $gensection = 1; print $newfh $_, $/; } elsif (m{$ENDSTRING}) { # where the work actually is done, # updating the lines between the begin and end strings print_xsubs($newfh, $classes, $cid, $methods, $types); print $newfh $/, $_; $gensection = 0; } elsif ($gensection) { next; } else { print $newfh $_; } } if ($gensection) { die "No end string found in file '$newfile'\n"; } close($oldfh); close($newfh); } sub print_xsubs { my ($fh, $classes, $cid, $methods, $types) = @_; my $oldfh = select($fh); my $class = $classes->{$cid}; (my $classtype = $class->{demangled}) =~ s/^Ogre:://; my %methods_seen = (); my $methids = sorted_method_ids($class, $methods); foreach my $methid (@$methids) { $PRINT_XSUB = 1; # innocent until proven guilty my $meth = $methods->{$methid}; my $methname = $meth->{name}; if (bad_method($classtype, $methname)) { # GUILTY! $PRINT_XSUB = 0; } my @xsub = (); push @xsub, "## $meth->{demangled}"; if ((my $count = method_count($class, $methods, $methname)) > 1) { push @xsub, "## overloaded: $count occurences"; } push @xsub, xsub_return_type($meth, $classtype, $types, $classes); # xxx: need to handle default values push @xsub, xsub_signature($meth, $classtype); push @xsub, xsub_arg_types($meth, $types, $classes); # CODE # xxx: probably a bunch of cases to handle here, # including default values and overloaded methods # xxx: for now, generate only 1st of any overloaded methods $PRINT_XSUB = 0 if $methods_seen{$methname}; # add a destructor if it's a constructor; also skip constructor # if it's abstract if ($methname eq $classtype) { $PRINT_XSUB = 0 if $class->{abstract}; push @xsub, $/; push @xsub, 'void'; push @xsub, $classtype . '::DESTROY()'; if ($PRINT_XSUB) { $XSUBCOUNT++; } } foreach my $line (@xsub) { print "### " unless $PRINT_XSUB; print "$line\n"; } print $/; if ($PRINT_XSUB) { $XSUBCOUNT++; $methods_seen{$methname}++; } } select($oldfh); } sub bad_method { my ($classtype, $methname) = @_; # some of these are just from not handling "const *" return values return 1 if # needs OUTLIST ($classtype eq 'Mesh' && $methname eq 'suggestTangentVectorBuildParams') or ($classtype eq 'HardwareBufferManager' && $methname eq 'getSingleton') or ($classtype eq 'VertexDeclaration' && $methname =~ /^((add|get|insert)Element|findElementBySemantic|)$/) or ($classtype eq 'SceneManagerEnumerator' && $methname eq 'getMetaData') or ($classtype eq 'RenderSystem' && $methname eq 'getCapabilities') or ($classtype eq 'AxisAlignedBox' && $methname eq 'getAllCorners') or ($classtype eq 'Image' && $methname eq 'getData') or ($classtype eq 'AutoParamDataSource' && ($methname =~ /^getCurrent/ or $methname eq 'getWorldMatrixArray')) or ($classtype =~ /^GpuProgram/ && $methname =~ /^get.*(Struct|Singleton)$/) or ($classtype eq 'Frustum' && ($methname eq 'getFrustumPlanes' or $methname eq 'getWorldSpaceCorners')) or ($classtype eq 'Exception' && $methname eq 'what') or ($classtype eq 'RenderQueueInvocationSequence' && $methname eq 'iterator') or ($methname =~ /^get.*Iterator$/) or ($methname =~ /Ptr$/); # skip these constructors return 1 if ($classtype eq $methname) and ( $classtype eq 'FileStreamDataStream' ); return 0; } # WelCoMe tO ThE uGLy sub xsub_arg_types { my ($meth, $types, $classes) = @_; my @types = (); my @c_arg_prefixes = (); my @argnames = meth_argnames($meth); if (@argnames) { for my $i (0 .. $#{ $meth->{args} }) { my $c_arg_prefix = ''; my $arg = $meth->{args}[$i]; my $type = get_type($arg->{type}, $types, $classes); $type->{typename} =~ s/^Ogre:://; my $argtype = $type->{typename}; # Exclude template classes, STL types (vector, hash_map, etc.); # also exclude "deeper" classes like SceneQuery::WorldFragment. # Enums are special because I prepended their classname, like OverlayElement__FooType. if ($argtype =~ /(<.+>|::)/ && $type->{label} ne 'Enumeration') { $argtype = "XXX: $type->{typename}"; $PRINT_XSUB = 0; } elsif ($argtype eq 'Serializer__Endian') { $PRINT_XSUB = 0; } elsif ($argtype eq 'String') { # do nothing (hmm, would this be handled naturally by ReferenceType below?) # note: don't keep track of String in %TYPEMAPS # because it's treated specially in typemap } elsif ($argtype eq 'string') { $argtype = 'String'; } elsif ($argtype eq '_Ios_Fmtflags') { $argtype = "XXX: $argtype"; $PRINT_XSUB = 0; } elsif (@{ $type->{quals} }) { # note: CvQualifiedType => "const", ReferenceType => "&", # PointerType => "*", ArrayType => "[]" ; # for example, # [class] Ogre::Radian [ReferenceType; CvQualifiedType] my @quals = @{ $type->{quals} }; for (@quals) { # make sure I know what all types there can be die "what type? '$_'\n" unless /^(Reference|CvQualified|Pointer|Array)Type$/; } # xxx: what about things like &bool or &int ? typedef + typemap ? # single pointer (not pointer to pointer) - OGRE_STAR typemap if (grep({ $_ eq 'PointerType' } @quals) == 1) { if (none { /^(Reference|Array)Type$/ } @quals) { # special case for Degree and Radian if ($type->{typename} =~ /^(Degree|Radian)$/) { $type->{typename} = 'DegRad'; } # xxx: there are only a few of these pointer types, # postponing them for now if ($argtype =~ /^(uint32|uint16|int|unsigned int|float|Real)$/) { $argtype = "XXX: $type->{typename} *"; $PRINT_XSUB = 0; } else { $argtype = "$type->{typename} *"; $TYPEMAPS{$argtype} = 'OGRE_STAR'; } } else { $argtype = "XXX: [@quals] $type->{typename}"; $PRINT_XSUB = 0; } } # reference parameter - OGRE_AMP typemap elsif (first { $_ eq 'ReferenceType' } @quals) { if (none { /^(Pointer|Array)Type$/ } @quals) { # special case for Degree and Radian if ($type->{typename} =~ /^(Degree|Radian)$/) { $type->{typename} = 'DegRad'; } # postponing for now if ($argtype =~ /(List|Ptr|VertexBoneAssignment)$/) { $argtype = "XXX: $type->{typename} *"; $PRINT_XSUB = 0; } else { $c_arg_prefix = '*'; #$argtype = $type->{typename}; #$TYPEMAPS{$argtype} = 'OGRE_AMP'; $argtype = "$type->{typename} *"; $TYPEMAPS{$argtype} = 'OGRE_STAR'; } } else { $c_arg_prefix = '*'; $argtype = "XXX: [@quals] $type->{typename}"; $PRINT_XSUB = 0; } } elsif (@quals == 1 && $quals[0] eq 'CvQualifiedType' && ($type->{typename} =~ /^(Real|.*\bint|bool|ushort|size_t)$/ || $type->{label} =~ /^(Enumeration|Typedef)$/)) { $argtype = $type->{typename}; # note: not put in %TYPEMAPS because Real is special # and the rest already have default typemaps } else { $argtype = "XXX: [@quals] $type->{typename}"; $PRINT_XSUB = 0; } } # these can't be typemapped because of a conflict in Ogre and sys/types.h headers if ($argtype eq 'ushort') { $argtype = 'short unsigned int'; } elsif ($argtype eq 'uint') { $argtype = 'unsigned int'; } push @types, [$argtype, $argnames[$i]]; push @c_arg_prefixes, $c_arg_prefix; } } my @ret = map { " $_->[0] $_->[1]" } @types; if (first { $_ ne '' } @c_arg_prefixes) { push @ret, " C_ARGS:"; my $args = ' ' . join(', ', map { $c_arg_prefixes[$_] . $types[$_]->[1] } 0 .. $#types); push @ret, $args; } return @ret; } sub xsub_signature { my ($meth, $classtype) = @_; # these are "Pointer accessor for direct copying", # which I assume is unnecesary in Perl? In any case, # it's annoying to deal with Real* return type. :) $PRINT_XSUB = 0 if $meth->{name} eq 'ptr'; my @argnames = meth_argnames($meth); return sprintf('%s::%s(%s)', $classtype, (($meth->{name} eq $classtype) ? 'new' : $meth->{name}), join(', ', @argnames)); } sub meth_argnames { my ($meth) = @_; my @argnames = (); if (exists $meth->{args}) { @argnames = map({ my $arg = $meth->{args}[$_]; (exists($arg->{name}) ? $arg->{name} : "arg$_") } 0 .. $#{ $meth->{args} }); } return @argnames; } sub xsub_return_type { my ($meth, $classtype, $types, $classes) = @_; if (exists $meth->{returns}) { my $type = get_type($meth->{returns}, $types, $classes); # for classes, strip off leading Ogre $type->{typename} =~ s/^Ogre:://; # default return type my $rettype = $type->{typename}; # xxx: still need to handle types like LightList, # which is typedef of vector, # and iterators, and arrays, and pointers to arrays... # exclude template classes, STL types (vector, hash_map, etc.) # also exclude "deeper" classes like SceneQuery::WorldFragment if ($type->{typename} =~ /(<.+>|::)/) { $rettype = "XXX: $type->{typename}"; $PRINT_XSUB = 0; } elsif ($type->{typename} eq 'String') { # do nothing } elsif ($type->{typename} eq 'string') { $rettype = 'String'; } elsif ($rettype eq '_Ios_Fmtflags') { $rettype = "XXX: $rettype"; $PRINT_XSUB = 0; } elsif (@{ $type->{quals} }) { # note: CvQualifiedType => "const", ReferenceType => "&", # PointerType => "*", ArrayType => "[]" ; # for example, # [class] Ogre::Radian [ReferenceType; CvQualifiedType] my @quals = @{ $type->{quals} }; for (@quals) { # make sure I know what all types there can be die "what type? '$_'\n" unless /^(Reference|CvQualified|Pointer|Array)Type$/; } # single pointer (not pointer to pointer) - OGRE_STAR typemap if (grep({$_ eq 'PointerType'} @quals) == 1) { if (none { /^(Reference|Array)Type$/ } @quals) { # note: not special on return ## special case for Degree and Radian #if ($type->{typename} =~ /^(Degree|Radian)$/) { # $type->{typename} = 'DegRad'; #} # xxx: there are only a few of these pointer types, # postponing them for now if ($rettype =~ /^(uint32|uint16|int|unsigned int|float|Real)$/) { $rettype = "XXX: $type->{typename} *"; $PRINT_XSUB = 0; } else { $rettype = "$type->{typename} *"; $TYPEMAPS{$rettype} = 'OGRE_STAR'; } } else { $rettype = "XXX: $type->{typename}"; $PRINT_XSUB = 0; } } # reference parameter - OGRE_AMP typemap elsif (first { $_ eq 'ReferenceType' } @quals) { if (none { /^(Pointer|Array)Type$/ } @quals) { # note: not special on return ## special case for Degree and Radian #if ($type->{typename} =~ /^(Degree|Radian)$/) { # $type->{typename} = 'DegRad'; #} $rettype = $type->{typename}; $TYPEMAPS{$rettype} = 'OGRE_AMP'; } else { $rettype = "XXX: [@quals] $type->{typename}"; $PRINT_XSUB = 0; } } else { $rettype = "XXX: [@quals] $type->{typename}"; $PRINT_XSUB = 0; } } if ($rettype eq 'ushort') { $rettype = 'short unsigned int'; } elsif ($rettype eq 'uint') { $rettype = 'unsigned int'; } return $rettype; } elsif ($meth->{name} eq $classtype) { # constructor return "$classtype *"; } else { return 'void'; } } # note: this returns a hashref, not a string sub get_type { my ($typeid, $types, $classes, @types_pointed) = @_; my %ret = (); $ret{quals} = [ @types_pointed ]; # Class or Struct if (exists $classes->{$typeid}) { $ret{label} = $classes->{$typeid}{label}; $ret{typename} = $classes->{$typeid}{demangled}; return \%ret; } if (exists $types->{$typeid}) { $ret{label} = $types->{$typeid}{label}; if ($ret{label} =~ /^(FundamentalType|Typedef|Enumeration)$/) { $ret{typename} = $types->{$typeid}{name}; if ($ret{label} eq 'Enumeration') { my $context_type = $types->{ $types->{$typeid}{context} } || $classes->{ $types->{$typeid}{context} }; my $context_name = defined($context_type) ? $context_type->{name} : 'Ogre'; if (defined($context_name) && $context_name ne 'Ogre') { $ret{typename} = $context_name . '__' . $ret{typename}; } } } elsif ($ret{label} eq 'FunctionType') { # $ret{typename} = $ret{label}; die "wow, a $ret{label}!\n"; } # anything that points to another type gets putshed on a stack elsif (exists($types->{$typeid}{type}) && $types->{$typeid}{type} =~ /^_[\da-z]+$/) { push @types_pointed, $ret{label}; return get_type($types->{$typeid}{type}, $types, $classes, @types_pointed) } else { die "what type is this? '$typeid'\n"; } return \%ret; } die "unresolved type ID '$typeid' (@types_pointed)\n"; } sub xs_file_init { my ($file, $class) = @_; unless (-f $file) { open(my $fh, "> $file") || die "Can't create xs file '$file': $!"; print $fh "MODULE = Ogre\tPACKAGE = $class\n\n"; close($fh); } my @lines = read_file($file); foreach my $line (@lines) { return 1 if $line =~ /$ENDSTRING/; } # Didn't find begin string, # but don't want to wipe out manually wrapped methods, # so add the begin/end strings to the bottom if (write_file($file, {append => 1}, "\n\n########## $BEGINSTRING\n\n########## $ENDSTRING\n")) { return 1; } return 0; } sub generate_xml { my ($xmlfile) = @_; return if -r $xmlfile; my $orig_dir = getcwd(); chdir($INCDIR) || die "Can't chdir to '$INCDIR': $!"; # xxx: I'm not even sure gccxml is available on non-unix systems... my @args = ('gccxml', 'Ogre.h', qq{-fxml=$xmlfile}); print STDERR "Generating XML... \n"; print STDERR qq{(note: an error about missing OgrePrerequisites is "normal")\n}; # rather than check system's return value, # which would normally make sense.... # check for the existence of the XML file system(@args); unless (-r $xmlfile && -s _) { die "system @args failed: $?"; } print "done\n"; chdir($orig_dir) || die "Can't chdir to '$orig_dir': $!"; } # You'd think I'd use a SAX parser, but nooo.... sub parse_xml { my ($file) = @_; if (-f $STOREDXML) { # stupid that you have to check the file exists.. my $parsed_xml = retrieve($STOREDXML); if (defined $parsed_xml) { return @$parsed_xml{qw(ns classes methods types)}; } } my %ns = (); my %classes = (); my %methods = (); my $method_id = ''; my %types = (); my $functiontype_id = ''; print STDERR "Parsing XML... "; open(my $xml, $file) || die "Can't open '$file': $!"; while (<$xml>) { if (m{{demangled}) && $attr->{demangled} eq 'Ogre'; $ns{$attr->{id}}{demangled} = $attr->{demangled}; # members is a list of 'id' numbers # which point to any member of the namespace ('Ogre'). # This is just used to narrow down the ids so they # don't include any non-members. foreach my $member (map { split } $attr->{members}) { $ns{$attr->{id}}{members}{$member}++; } } elsif (m{<(Class|Struct) }) { my $label = $1; my $attr = get_attrs($_); # To resolve some types, we apparently need Classes outside the Ogre namespace # (e.g. class type_info....), so I commented out these `next' # next unless exists($attr->{demangled}) && $attr->{demangled} =~ /^Ogre/; # these are usually iterator or template classes, # so I skip them (maybe shouldn't skip the template ones) # next if $attr->{demangled} =~ /_|&/; # an empty class? useless # next unless exists($attr->{members}); $classes{$attr->{id}}{label} = $label; $classes{$attr->{id}}{demangled} = $attr->{demangled}; $classes{$attr->{id}}{name} = $attr->{name}; # like Namespace, this members is a list of ids $classes{$attr->{id}}{members} = {}; $attr->{members} = [] unless exists $attr->{members}; # ugh foreach my $member_id (map { split } $attr->{members}) { $classes{$attr->{id}}{members}{$member_id}++; } # what it inherits from # xxx: need to be added to .pm files if (exists($attr->{bases}) && $attr->{bases}) { my $bases = $attr->{bases}; $bases =~ s/(?:^\s+|\s+$)//g; # strip off leading/trailing space $classes{$attr->{id}}{bases} = $attr->{bases}; } # some classes can't have their constructors called, # so we'll skip those $classes{$attr->{id}}{abstract} = exists($attr->{abstract}) ? $attr->{abstract} : 0; } elsif (m{<(\w+Type|Typedef|Enumeration) }) { my $label = $1; my $attr = get_attrs($_); $types{$attr->{id}}{label} = $label; # Enumeration doesn't have a type attr $types{$attr->{id}}{type} = $attr->{type} if exists($attr->{type}); # Typedef, Enumeration if (exists $attr->{name}) { my $name = $attr->{name}; # note: there's one class enum without a name, # which gccxml calls "._100" # (has one value, Ogre::PatchSurface::AUTO_LEVEL) if ($name eq '._100') { $name = 'PatchAutoLevelType'; } $types{$attr->{id}}{name} = $name; } # FunctionType if ($label eq 'FunctionType') { $functiontype_id = $attr->{id}; } if ($label eq 'Enumeration') { $types{$attr->{id}}{context} = $attr->{context}; } } elsif (m{<(Method|Constructor) }) { my $label = $1; my $attr = get_attrs($_); # skip protected and private ones... # (is it correct to skip protected?) next unless exists($attr->{name}); next if $attr->{name} =~ /^_/; next if exists($attr->{access}) && ($attr->{access} eq 'private' or $attr->{access} eq 'protected'); # these seem to be C++ default constructors, so skipping if ($label eq 'Constructor') { next if exists($attr->{artificial}) && $attr->{artificial}; } $method_id = $attr->{id}; $methods{$method_id}{demangled} = $attr->{demangled}; if (exists($attr->{access})) { $methods{$method_id}{access} = $attr->{access}; } if (exists($attr->{returns})) { $methods{$method_id}{returns} = $attr->{returns}; } $methods{$method_id}{name} = $attr->{name}; $methods{$method_id}{const} = exists($attr->{const}) ? 'yes' : 'no'; $methods{$method_id}{static} = exists($attr->{static}) ? 'yes' : 'no'; # empty tag if (m{/>$}) { # there won't be a separate end tag, so no Arguments $method_id = ''; } } elsif ($method_id or $functiontype_id) { if (m{ $attr->{type}, # an ID ); $arg{name} = $attr->{name} if exists($attr->{name}); # not for FunctionType, $arg{default} = $attr->{default} if exists($attr->{default}); if ($method_id) { push @{ $methods{$method_id}{args} }, \%arg; } elsif ($functiontype_id) { push @{ $types{$functiontype_id}{args} }, \%arg; } } } else { # print STDERR "WTF: $_\n" if /Typedef/; } } close($xml); print STDERR "done.\n"; my $storing = {ns => \%ns, classes => \%classes, methods => \%methods, types => \%types}; store($storing, $STOREDXML) or die "Couldn't store in '$STOREDXML'\n"; return(\%ns, \%classes, \%methods, \%types); } sub xml_unescape { for ($_[0]) { s{<}{<}g; s{>}{>}g; s{&}{&}g; s{"}{"}g; s{'}{'}g; } return $_[0]; } sub get_attrs { my %attrs = map { xml_unescape($_) } $_[0] =~ / (\w+)="([^"]*)"/g; return \%attrs; } sub sorted_class_ids { my ($ns, $classes) = @_; # note: there's really only one namespace foreach my $nsid (sort keys %$ns) { # class ids schwartzed by class name # and skipping ones not in the namespace my @cids = map {$_->[0]} sort {$a->[1] cmp $b->[1]} map {[$_, $classes->{$_}{demangled}]} grep { exists $ns->{$nsid}{members}{$_} } keys %$classes; return \@cids; } } sub sorted_method_ids { my ($class, $methods) = @_; # class method ids schwartzed by name, # by happy coincidence this usually puts constructors first my @methids = map {$_->[0]} sort {$a->[1] cmp $b->[1]} map {[$_, $methods->{$_}->{name}]} grep { exists $methods->{$_} } keys %{ $class->{members} }; return \@methids; } # number of times methods are in the class (for overloaded methods) sub method_count { my ($class, $methods, $method) = @_; my %names = (); foreach my $id (keys %{ $class->{members} }) { next unless exists $methods->{$id}; $names{$methods->{$id}->{name}}++; } if (defined $method) { if (exists $names{$method}) { return $names{$method}; } else { return 0; } } else { return \%names; } } Ogre-0.60/genscripts/gendocs.pl0000755000175000017500000002643012146460465016717 0ustar slanningslanning#!/usr/bin/perl # Run this from the top directory (where Ogre.xs is). # This is what I'm using to generate doc stubs # in Ogre/*.pm from the XS files xs/*.xs . use strict; use warnings; use File::Copy; use File::Spec; my $XSDIR = 'xs'; my $PMDIR = 'Ogre'; my $BEGINCLASS = 'CLASS LIST BEGIN'; my $ENDCLASS = 'CLASS LIST END'; main(); exit(); sub main { my $xss = File::Spec->catfile(File::Spec->curdir, $XSDIR, '*.xs'); my @xsfiles = glob($xss); foreach my $xsfile (@xsfiles) { my ($sigs, $package) = read_signatures($xsfile); my $debug = 0; if ($debug) { print "package: $package\n\n"; foreach my $sig (@$sigs) { print "method: $sig->{method}\n"; print "params: $sig->{params}\n"; print "types: ", join(', ', @{ $sig->{types} }), $/; print "return: $sig->{return}\n\n"; } } else { my $pmfile = pmfile_from_xsfile($xsfile); update_pod($pmfile, $sigs, $package); } } update_class_list(); } # This assumes a certain structure of the XS files... # First of all, there is only one MODULE line per file, # and it specifies the PACKAGE. After grabbing the MODULE line, # the first non-comment line that begins with a word character # will be a return value type. Now we're "in" a signature. # The next line is the method with its parameter names in parentheses, # followed by the type declarations of the parameters. The parameters # stop at either a blank line or a line ending in a colon (CODE:, etc.). # This function returns # 1) an aref of "signature" hashrefs, whose keys are: # - method: the name of a method # - params: a string of what's between parens (params) after the method name # - types: an aref of the following lines giving the param types # - return: the return value's type # 2) the package name, gotten from PACKAGE sub read_signatures { my ($file) = @_; my @sigs = (); my $insig = 0; my $package = ''; my $return = ''; my $method = ''; my $params = ''; my @types = (); open(my $fh, $file) || die "Can't open C file '$file': $!"; while (<$fh>) { chomp; # grab the package name if (/^MODULE\s*=\s*\S+\s*PACKAGE\s*=\s*(\S+)$/) { $package = $1; } # if we're not already reading a signature elsif (! $insig) { # sigs only start with a word character (\w) # (implying it's not a comment (#), blank line, whitespace) if (/^(\w.+)$/) { # that was the return value's type $return = $1; $insig = 1; } } # we've already started reading a signature else { # match the method(params) line, # leaving out any class name (like Vector3::) if (/^(?:\w+::)*([^:(\s]+)\s*\((\s*[^)]*\s*)\)\s*$/) { $method = $1; $params = $2; } # ...and then if we encounter either a blank line # or a trailing colon (CODE:, C_ARGS:, etc.), # we're done reading the sig elsif (/^\s*$/ || /:\s*$/) { push @sigs, { method => $method, params => $params, types => [splice @types], return => $return, }; $method = ''; $return = ''; $params = ''; $insig = 0; } # we have the method already, and we're not done, # so this line is specifying the type of an argument elsif ($method) { # remove leading/trailing/duplicate whitespace s/(^\s+|\s+$)//; s/\s+/ /g; push @types, $_; } } } close($fh); # if there was nothing after the last method, # we're still in a signature, so it didn't get pushed yet if ($insig) { push @sigs, { method => $method, params => $params, types => [splice @types], return => $return, }; } return(\@sigs, $package); } sub update_pod { my ($pmfile, $sigs, $package) = @_; # create the file if it doesn't already exist unless (-f $pmfile) { open(my $fh, "> $pmfile") || die "Couldn't create .pm file '$pmfile': $!"; # note: important to put two \n # so that output_docs has a chance to output the docs print $fh "package $package;\n\nuse strict;\nuse warnings;\n\n\n1;\n\n__END__\n\n"; close($fh); } # we'll copy the original to *~, and overwrite the original my $origpmfile = $pmfile . '.bak~'; unless (copy($pmfile, $origpmfile)) { print STDERR "Couldn't copy .pm file '$pmfile': $!\n"; return; } my $end = 0; open(my $newfh, "> $pmfile") || die "Couldn't open new .pm file '$pmfile' for writing: $!"; open(my $oldfh, $origpmfile) || die "Couldn't open original .pm file '$origpmfile': $!"; while (<$oldfh>) { if (/^__END__/) { $end = 1; print $newfh $_; } # we've already reached the end, so output docs elsif ($end) { output_docs($newfh, $sigs, $package); last; } # we haven't reached the end yet, so pass the original line through else { print $newfh $_; } } close($oldfh); # we didn't find an __END__, so make one and print the docs unless ($end) { print $newfh "\n__END__\n"; output_docs($newfh, $sigs, $package); } close($newfh); } # update Ogre.pm's class list sub update_class_list { my $pmfile = File::Spec->catfile(File::Spec->curdir, 'Ogre.pm'); my @pmfiles = grep { ! /CEGUI/ } # top secret :) glob(File::Spec->catfile(File::Spec->curdir, $PMDIR, '*.pm')); # backup old file my $oldfile = $pmfile . '.bak~~'; unless (copy($pmfile, $oldfile)) { print STDERR "Couldn't copy '$oldfile' '$pmfile': $!\n"; return; } my $gensection = 0; open(my $newfh, "> $pmfile") || die "Can't open file '$pmfile': $!"; open(my $oldfh, $oldfile) || die "Can't open file '$oldfile': $!"; while (<$oldfh>) { if (m{$BEGINCLASS}) { $gensection = 1; print $newfh $_; } elsif (m{$ENDCLASS}) { # where the work actually is done, # updating the lines between the begin and end strings print $newfh "\n=over\n\n"; foreach my $file (@pmfiles) { my ($pkg) = $file =~ m{/([^/]+)\.pm$}; print $newfh "=item L\n\n"; } print $newfh "=back\n\n"; print $newfh $_; $gensection = 0; } elsif ($gensection) { next; } else { print $newfh $_; } } if ($gensection) { die "No end string found in file '$pmfile'\n"; } close($oldfh); close($newfh); } sub output_docs { my ($fh, $sigs, $package) = @_; my $oldfh = select($fh); print "=head1 NAME\n\n"; print "$package\n\n"; print "=head1 SYNOPSIS\n\n"; print " use Ogre;\n use $package;\n # (for now see examples/README.txt)\n\n"; (my $pkg = $package) =~ s/:/_1/g; my $ogreurl = "http://www.ogre3d.org/docs/api/html/class$pkg.html"; print "=head1 DESCRIPTION\n\n"; print "See the online API documentation at\n L<$ogreurl>\n\n"; print "B this Perl binding is currently I and subject to API changes.\n\n"; # xxx: should also output a class hierarchy # if this package inherits from anything my @class_methods = grep { is_static_method($_) } @$sigs; my @instance_methods = grep { ! is_static_method($_) } @$sigs; # xxx: really need to factor some of this out.. print "=head1 CLASS METHODS\n\n" if @class_methods; foreach my $sig (@class_methods) { # xxx: this doesn't handle the "constant" xsubs.... (ALIASed) # I want to change constants soon anyway. if ($sig->{method} eq 'DESTROY') { print "=head2 ${package}->$sig->{method}()\n\n"; print "This method is called automatically; don't call it yourself.\n\n"; } elsif ($sig->{method} =~ /_xs$/) { print "=head2 \\\&$sig->{method}\n\n"; print "This is an operator overload method; don't call it yourself.\n\n"; } else { my @param_names = map { ($_ eq '...') ? $_ : ('$' . $_) } split(/\s*,\s*/, $sig->{params}); my $params = join(', ', @param_names); print "=head2 ${package}->$sig->{method}($params)\n\n"; if (@param_names) { print "I\n\n=over\n\n"; foreach my $i (0 .. $#param_names) { my $name = $param_names[$i]; my $type = $sig->{types}[$i] || ''; if ($name eq '...') { $type = 'this varies... (sorry, look in the .xs file)'; } elsif ($type eq '') { $type = '(no info available)'; } else { $type =~ s/ \w+$//; } $type =~ s/DegRad/Degree (or Radian)/; print "=item $name : $type\n\n"; } print "=back\n\n"; } (my $return = $sig->{return}) =~ s/static //; print "I\n\n=over\n\n=item $return\n\n=back\n\n"; } } print "=head1 INSTANCE METHODS\n\n" if @instance_methods; foreach my $sig (@instance_methods) { my @param_names = map { $_ eq '...' ? $_ : '$' . $_ } split(/\s*,\s*/, $sig->{params}); my $params = join(', ', @param_names); print "=head2 \$obj->$sig->{method}($params)\n\n"; if (@param_names) { print "I\n\n=over\n\n"; foreach my $i (0 .. $#param_names) { my $name = $param_names[$i]; my $type = $sig->{types}[$i] || ''; if ($name eq '...') { $type = 'this varies... (sorry, look in the .xs file)'; } elsif ($type eq '') { $type = '(no info available)'; } else { $type =~ s/ \w+$//; } $type =~ s/DegRad/Degree (or Radian)/; print "=item $name : $type\n\n"; } print "=back\n\n"; } (my $return = $sig->{return}) =~ s/static //; print "I\n\n=over\n\n=item $return\n\n=back\n\n"; } print "=head1 AUTHOR\n\nScott Lanning Eslanning\@cpan.orgE\n\n"; print "For licensing information, see README.txt .\n\n=cut\n"; select($oldfh); } sub is_static_method { my ($sig) = @_; return $sig->{return} =~ /static/ || $sig->{method} eq 'new' || $sig->{method} eq 'DESTROY' || $sig->{method} =~ /_xs$/ } sub pmfile_from_xsfile { my ($xsfile) = @_; my $pmfile = $xsfile; $pmfile =~ s/^$XSDIR/$PMDIR/; $pmfile =~ s/xs$/pm/; return $pmfile; } Ogre-0.60/genscripts/init-class.pl0000755000175000017500000000624412146460465017344 0ustar slanningslanning#!/usr/bin/perl # this is a utility script I use to add a new class, # run it from the top directory (where Ogre.pm is) use strict; use warnings; use File::Spec; use File::Slurp; use List::MoreUtils qw(none first_index); my $XSDIR = 'xs'; my $PMDIR = 'Ogre'; main(); exit(); sub main { my $class = get_class(); write_xs_file($class); write_pm_file($class); update_manifest($class); update_ogrepm($class); update_typemap($class); } sub get_class { die "usage: $0 classname < [text]\n" unless @ARGV; return shift(@ARGV); } sub write_xs_file { my ($class) = @_; my $file = File::Spec->catfile($XSDIR, $class . '.xs'); if (-f $file) { print "XS file '$file' already exists\n"; } else { write_file($file, "MODULE = Ogre PACKAGE = Ogre::$class\n\n"); print "wrote XS file '$file'\n"; } } sub write_pm_file { my ($class) = @_; # (very similar to write_xs_file) my $file = File::Spec->catfile($PMDIR, $class . '.pm'); if (-f $file) { print "PM file '$file' already exists\n"; } else { write_file($file, "package Ogre::$class;\n\nuse strict;\nuse warnings;\n\n\n1;\n\n__END__\n"); print "wrote PM file '$file'\n"; } } sub update_manifest { my ($class) = @_; my $file = 'MANIFEST'; my @lines = read_file($file); # add PM file my $pmfile = "$PMDIR/$class.pm"; if (none { /^$pmfile$/ } @lines) { push @lines, "$pmfile\n"; } # add XS file my $xsfile = "$XSDIR/$class.xs"; if (none { /^$xsfile$/ } @lines) { push @lines, "$xsfile\n"; } write_file($file, sort(@lines)); print "MANIFEST updated\n"; } sub update_ogrepm { my ($class) = @_; my $file = 'Ogre.pm'; my @lines = read_file($file); # if it's not there already, add it into the "use" lines if (none { /^use Ogre::$class;/ } @lines) { my $begin_index = first_index { /^## BEGIN USES/ } @lines; my $end_index = first_index { /^## END USES/ } @lines; my $offset = $begin_index + 1; my $length = $end_index - $offset; my @replaced_lines = @lines[$offset .. $end_index - 1]; push @replaced_lines, "use Ogre::$class;\n"; splice @lines, $offset, $length, sort(@replaced_lines); write_file($file, @lines); } print "$file updated\n"; } sub update_typemap { my ($class) = @_; my $file = 'typemap'; my @lines = read_file($file); # if it's not there already, add it # (very similar to update_ogrepm) if (none { /^$class \*\tO_/ } @lines) { my $begin_index = first_index { /^## BEGIN NORMAL TYPEMAPS/ } @lines; my $end_index = first_index { /^## END NORMAL TYPEMAPS/ } @lines; my $offset = $begin_index + 1; my $length = $end_index - $offset; my @replaced_lines = @lines[$offset .. $end_index - 1]; push @replaced_lines, "$class *\t\UO_$class\n"; push @replaced_lines, "const $class *\t\UO_$class\n"; splice @lines, $offset, $length, sort(@replaced_lines); write_file($file, @lines); } print "$file TYPEMAP updated; update INPUT and OUTPUT sections manually!\n"; } Ogre-0.60/perlOGREGUI.h0000644000175000017500000000201612146460465014703 0ustar slanningslanning#ifndef _PERLOGRE_GUI_H_ #define _PERLOGRE_GUI_H_ #ifdef PERLOGRE_HAS_GTK2 #include "perlOGRE.h" #include #if defined( __WIN32__ ) || defined( _WIN32 ) # include #else # include #endif // typemap for GtkWidget* (shortcut version of what Gtk2/Glib does) #define TMOGRE_GTKWIDGET_IN(arg, var, package, func) \ MAGIC *mg; \ if (!arg || !SvOK(arg) || !SvROK(arg) || !sv_derived_from(arg, "Gtk2::Widget")) \ croak(#package "::" #func "():" #var " is not a Gtk2::Widget object\n"); \ if (!(mg = mg_find(SvRV(arg), PERL_MAGIC_ext))) \ croak(#package "::" #func "():" #var " has no magic!\n"); \ var = (GtkWidget *) mg->mg_ptr; // For Gtk2: pass an object that "isa" Gtk2::Widget. // For Wx: pass the result of GetHandle() on an object // that "isa" Wx::Window. (note: wxPerl >= 0.12) // Returns "parentWindowHandle" for ¶ms arg to createRenderWindow Ogre::String getWindowHandleString(GtkWidget *widget); #endif /* PERLOGRE_HAS_GTK2 */ #endif /* _PERLOGRE_GUI_H_ */ Ogre-0.60/README.txt0000644000175000017500000001027612150370330014235 0ustar slanningslanningPerl-Ogre ========= This is a Perl binding for OGRE, Object-Oriented Graphics Rendering Engine, a C++ library found at http://www.ogre3d.org/ . The wrapping is currently incomplete, but there are interesting examples working now (see examples/README.txt). See TODO.txt for the things I'd like to do. Suggest more things (preferably submitted with patches) if you like. My aim is mostly to be able to run OGRE's samples and tutorials from Perl. (The tutorials and documentation for OGRE are excellent. I highly recommend going through them before trying this Perl wrapper.) DEPENDENCIES Only versions >= 1.8 of OGRE are supported, so you need to install that either by building from source or by installing a package. You need to install the "dev" versions of packages, since this module links against the libraries. Makefile.PL uses pkg-config to get information about the libraries and header files needed to build against OGRE, so you should be able to do this: pkg-config --libs OGRE pkg-config --cflags OGRE pkg-config --modversion OGRE The last one should say at least 1.8. The C++ compiler used by default is `g++`, but you can specify a different C++ compiler by setting the "CXX" environmental variable. Anything more, and you'll have to hack at Makefile.PL. I have the impression that OGRE doesn't install pkg-config on Windows (though nobody ever answers when I ask...), so this package will probably not currently work on Windows. I'd like it to, but I don't use Windows. Please let me know how if you get it working. Patches for Mac OS would be welcome as well (in particular, look in Ogre/ExampleApplication for "macBundlePath"). OPTIONAL If you have Gtk2 installed, which in practice means that the following outputs a version number: pkg-config --modversion gtk+-2.0 (Ubuntu package "libgtk2.0-dev") then a static method, Ogre->getWindowHandleString, will be built. The string returned can be passed to the `params' argument of Ogre::Root::createRenderWindow in order to use a window (widget) already created by gtk2-perl or wxPerl, thereby letting you embed an Ogre widget in a GUI application. This feature is currently EXPERIMENTAL, meaning its usage might change in the future or be dropped altogether if it doesn't work. Some scripts under examples/ require these Perl modules: - OIS I recommend installing it, but you don't have to. (I have other OGRE-related modules: Ogre::AL and Ogre::BetaGUI .) INSTALLATION To install this module, do the usual: perl Makefile.PL make make test make install You might have to edit Makefile.PL to get it to work for your system. If so, please let me know. COPYRIGHT AND LICENCE Please report any patches/bugs/suggestions to . Copyright 2007-2013, Scott Lanning. All rights reserved. This Perl library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The license for OGRE follows (from https://bitbucket.org/sinbad/ogre ) --------------8<----------------------------------------------------------- OGRE (www.ogre3d.org) is made available under the MIT License. Copyright (c) 2000-2013 Torus Knot Software Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------8<----------------------------------------------------------- Ogre-0.60/MANIFEST0000644000175000017500000001553112162374755013711 0ustar slanningslanningChanges MANIFEST This list of files META.yml Module meta-data (added by MakeMaker) Makefile.PL Ogre.pm Ogre.xs Ogre/AnimableObject.pm Ogre/AnimableValue.pm Ogre/Animation.pm Ogre/AnimationControllerFunction.pm Ogre/AnimationState.pm Ogre/AnimationStateSet.pm Ogre/AnimationTrack.pm Ogre/AxisAlignedBox.pm Ogre/AxisAlignedBoxSceneQuery.pm Ogre/Billboard.pm Ogre/BillboardChain.pm Ogre/BillboardSet.pm Ogre/Bone.pm Ogre/BorderPanelOverlayElement.pm Ogre/Camera.pm Ogre/ColourValue.pm Ogre/CompositionPass.pm Ogre/CompositionTargetPass.pm Ogre/ConfigFile.pm Ogre/ControllerManager.pm Ogre/ControllerReal.pm Ogre/DataStream.pm Ogre/Degree.pm Ogre/EdgeData.pm Ogre/Entity.pm Ogre/ExampleApplication.pm Ogre/ExampleFrameListener.pm Ogre/Exception.pm Ogre/FrameEvent.pm Ogre/Frustum.pm Ogre/GpuProgram.pm Ogre/GpuProgramParameters.pm Ogre/HardwareBuffer.pm Ogre/HardwareBufferManager.pm Ogre/HardwareIndexBuffer.pm Ogre/HardwarePixelBuffer.pm Ogre/HardwareVertexBuffer.pm Ogre/Image.pm Ogre/IndexData.pm Ogre/InstancedGeometry.pm Ogre/InstancedGeometry/InstancedObject.pm Ogre/IntersectionSceneQuery.pm Ogre/KeyFrame.pm Ogre/Light.pm Ogre/Log.pm Ogre/LogManager.pm Ogre/ManualObject.pm Ogre/ManualObject/ManualObjectSection.pm Ogre/ManualObjectSection.pm Ogre/ManualResourceLoader.pm Ogre/Material.pm Ogre/MaterialManager.pm Ogre/Math.pm Ogre/Matrix3.pm Ogre/Matrix4.pm Ogre/Mesh.pm Ogre/MeshManager.pm Ogre/MeshPtr.pm Ogre/MovableObject.pm Ogre/MovablePlane.pm Ogre/MultiRenderTarget.pm Ogre/Node.pm Ogre/NodeAnimationTrack.pm Ogre/NumericAnimationTrack.pm Ogre/Overlay.pm Ogre/OverlayContainer.pm Ogre/OverlayElement.pm Ogre/OverlayManager.pm Ogre/PanelOverlayElement.pm Ogre/Particle.pm Ogre/ParticleAffector.pm Ogre/ParticleEmitter.pm Ogre/ParticleSystem.pm Ogre/ParticleSystemRenderer.pm Ogre/Pass.pm Ogre/PassthroughControllerFunction.pm Ogre/PatchMesh.pm Ogre/PatchSurface.pm Ogre/Plane.pm Ogre/PlaneBoundedVolume.pm Ogre/PlaneBoundedVolumeListSceneQuery.pm Ogre/Pose.pm Ogre/Quaternion.pm Ogre/QueuedRenderableCollection.pm Ogre/Radian.pm Ogre/Ray.pm Ogre/RaySceneQuery.pm Ogre/RegionSceneQuery.pm Ogre/RenderOperation.pm Ogre/RenderQueue.pm Ogre/RenderSystem.pm Ogre/RenderSystemCapabilities.pm Ogre/RenderTarget.pm Ogre/RenderTarget/FrameStats.pm Ogre/RenderTexture.pm Ogre/RenderWindow.pm Ogre/Renderable.pm Ogre/Resource.pm Ogre/ResourceGroupManager.pm Ogre/ResourceManager.pm Ogre/RibbonTrail.pm Ogre/Root.pm Ogre/ScaleControllerFunction.pm Ogre/SceneManager.pm Ogre/SceneNode.pm Ogre/SceneQuery.pm Ogre/SceneQuery/WorldFragment.pm Ogre/ScriptLoader.pm Ogre/Serializer.pm Ogre/ShadowCaster.pm Ogre/SimpleRenderable.pm Ogre/Skeleton.pm Ogre/SkeletonInstance.pm Ogre/SkeletonManager.pm Ogre/Sphere.pm Ogre/SphereSceneQuery.pm Ogre/StaticGeometry.pm Ogre/StringInterface.pm Ogre/SubEntity.pm Ogre/SubMesh.pm Ogre/TagPoint.pm Ogre/Technique.pm Ogre/TextAreaOverlayElement.pm Ogre/Texture.pm Ogre/TextureManager.pm Ogre/TextureUnitState.pm Ogre/TimeIndex.pm Ogre/Timer.pm Ogre/TransformKeyFrame.pm Ogre/Vector2.pm Ogre/Vector3.pm Ogre/Vector4.pm Ogre/VertexAnimationTrack.pm Ogre/VertexBufferBinding.pm Ogre/VertexCacheProfiler.pm Ogre/VertexData.pm Ogre/VertexDeclaration.pm Ogre/VertexElement.pm Ogre/Viewport.pm Ogre/WaveformControllerFunction.pm Ogre/WindowEventUtilities.pm Ogre/WorldFragment.pm PerlOGRECallback.cpp PerlOGRECallback.h PerlOGRECallbackManager.cpp PerlOGRECallbackManager.h PerlOGREControllerFunction.cpp PerlOGREControllerFunction.h PerlOGREControllerValue.cpp PerlOGREControllerValue.h PerlOGREFrameListener.cpp PerlOGREFrameListener.h PerlOGREWindowEventListener.cpp PerlOGREWindowEventListener.h README.txt TODO.txt examples/README.txt examples/animate.pl examples/buffered.pl examples/cameratrack.pl examples/darksky.pl examples/gtk2robot.pl examples/lighting.pl examples/listeningninja.pl examples/manualobject.pl examples/ninja.pl examples/particleFX.pl examples/resources.cfg examples/robot.pl examples/sdlrobot.pl examples/skeletalanim.pl examples/sky.pl examples/terrain.pl examples/wx.pl genscripts/genconsts.pl genscripts/gendocs.pl genscripts/genxsubs.pl genscripts/init-class.pl genscripts/showmeths.pl genscripts/strip-api-docs.pl perlOGRE.h perlOGREGUI.cpp perlOGREGUI.h perlobject.map t/000_use.t t/010_constants.t t/100_vector3.t t/101_vector2.t t/110_plane.t t/120_quaternion.t t/200_colourvalue.t t/210_degree.t t/220_radian.t t/300_configfile.t t/400_root.t t/Ogre/TestBase.pm typemap xs/AnimableObject.xs xs/Animation.xs xs/AnimationControllerFunction.xs xs/AnimationState.xs xs/AnimationStateSet.xs xs/AnimationTrack.xs xs/AxisAlignedBox.xs xs/AxisAlignedBoxSceneQuery.xs xs/Billboard.xs xs/BillboardChain.xs xs/BillboardSet.xs xs/Bone.xs xs/BorderPanelOverlayElement.xs xs/Camera.xs xs/ColourValue.xs xs/ConfigFile.xs xs/ControllerManager.xs xs/ControllerReal.xs xs/DataStream.xs xs/Degree.xs xs/EdgeData.xs xs/Entity.xs xs/FrameEvent.xs xs/FrameStats.xs xs/Frustum.xs xs/GpuProgram.xs xs/GpuProgramParameters.xs xs/HardwareBuffer.xs xs/HardwareBufferManager.xs xs/HardwareIndexBuffer.xs xs/HardwarePixelBuffer.xs xs/HardwareVertexBuffer.xs xs/IndexData.xs xs/InstancedGeometry.xs xs/IntersectionSceneQuery.xs xs/KeyFrame.xs xs/Light.xs xs/Log.xs xs/LogManager.xs xs/ManualObject.xs xs/ManualObjectSection.xs xs/ManualResourceLoader.xs xs/Material.xs xs/MaterialManager.xs xs/Math.xs xs/Matrix3.xs xs/Matrix4.xs xs/Mesh.xs xs/MeshManager.xs xs/MeshPtr.xs xs/MovableObject.xs xs/MovablePlane.xs xs/MultiRenderTarget.xs xs/Node.xs xs/NodeAnimationTrack.xs xs/NumericAnimationTrack.xs xs/Overlay.xs xs/OverlayContainer.xs xs/OverlayElement.xs xs/OverlayManager.xs xs/PanelOverlayElement.xs xs/Particle.xs xs/ParticleAffector.xs xs/ParticleEmitter.xs xs/ParticleSystem.xs xs/ParticleSystemRenderer.xs xs/Pass.xs xs/PassthroughControllerFunction.xs xs/PatchMesh.xs xs/Plane.xs xs/PlaneBoundedVolume.xs xs/PlaneBoundedVolumeListSceneQuery.xs xs/Pose.xs xs/Quaternion.xs xs/Radian.xs xs/Ray.xs xs/RaySceneQuery.xs xs/RegionSceneQuery.xs xs/RenderOperation.xs xs/RenderQueue.xs xs/RenderSystem.xs xs/RenderSystemCapabilities.xs xs/RenderTarget.xs xs/RenderTexture.xs xs/RenderWindow.xs xs/Renderable.xs xs/Resource.xs xs/ResourceGroupManager.xs xs/ResourceManager.xs xs/RibbonTrail.xs xs/Root.xs xs/ScaleControllerFunction.xs xs/SceneManager.xs xs/SceneNode.xs xs/SceneQuery.xs xs/ScriptLoader.xs xs/ShadowCaster.xs xs/SimpleRenderable.xs xs/Skeleton.xs xs/SkeletonInstance.xs xs/SkeletonManager.xs xs/Sphere.xs xs/SphereSceneQuery.xs xs/StaticGeometry.xs xs/StringInterface.xs xs/SubEntity.xs xs/SubMesh.xs xs/TagPoint.xs xs/Technique.xs xs/TextAreaOverlayElement.xs xs/Texture.xs xs/TextureManager.xs xs/TextureUnitState.xs xs/TimeIndex.xs xs/Timer.xs xs/TransformKeyFrame.xs xs/Vector2.xs xs/Vector3.xs xs/Vector4.xs xs/VertexAnimationTrack.xs xs/VertexBufferBinding.xs xs/VertexData.xs xs/VertexDeclaration.xs xs/VertexElement.xs xs/Viewport.xs xs/WaveformControllerFunction.xs xs/WindowEventUtilities.xs xs/WorldFragment.xs Ogre-0.60/t/0000755000175000017500000000000012162410433012776 5ustar slanningslanningOgre-0.60/t/120_quaternion.t0000644000175000017500000000240712146460465015751 0ustar slanningslanning#!/usr/bin/perl use strict; use warnings; use Math::Trig; use lib 't'; use Ogre::TestBase qw(floats_close_enough); use Test::More tests => 14; BEGIN { use_ok('Ogre'); use_ok('Ogre::Degree'); use_ok('Ogre::Quaternion'); use_ok('Ogre::Radian'); use_ok('Ogre::Vector3'); } my $test = 'new():'; my $q = Ogre::Quaternion->new(); isa_ok($q, 'Ogre::Quaternion'); my $q4 = Ogre::Quaternion->new(5,4,3,2); isa_ok($q4, 'Ogre::Quaternion'); my $qq = Ogre::Quaternion->new($q4); isa_ok($qq, 'Ogre::Quaternion'); # (Matrix3) my $r = Ogre::Radian->new(pi); my $v = Ogre::Vector3->new(2,3,4); my $qrv = Ogre::Quaternion->new($r, $v); isa_ok($qrv, 'Ogre::Quaternion'); my $d = Ogre::Degree->new(180); my $qdv = Ogre::Quaternion->new($d, $v); isa_ok($qdv, 'Ogre::Quaternion'); my $vx = Ogre::Vector3->new(1,0,0); my $vy = Ogre::Vector3->new(0,1,0); my $vz = Ogre::Vector3->new(0,0,1); my $qvvv = Ogre::Quaternion->new($vx, $vy, $vz); isa_ok($qvvv, 'Ogre::Quaternion'); # my $q0 = Ogre::Quaternion->new(); # Note: I've not been able to get == to work #ok($q0 == $q, '$q0 == $q'); ok($qrv != $q, '$qrv != $q'); my $qy = Ogre::Quaternion->new(0,0,0,1); my $vq = $qy * $vx; isa_ok($vq, 'Ogre::Vector3'); ok(floats_close_enough($vq->x, -1), "mult q*v: v.x == -1"); Ogre-0.60/t/010_constants.t0000644000175000017500000000045212146460465015574 0ustar slanningslanning#!/usr/bin/perl use strict; use warnings; use Test::More tests => 2; BEGIN { use_ok('Ogre', qw(:SceneType)) } #eval { SHADOWTYPE_STENCIL_ADDITIVE }; #ok(! $@, 'constants not exported by default'); ok(ST_EXTERIOR_CLOSE != 0, 'constant imported by export tags'); # need to test all of them... Ogre-0.60/t/100_vector3.t0000644000175000017500000000575412146460465015157 0ustar slanningslanning#!/usr/bin/perl use strict; use warnings; use lib 't'; use Ogre::TestBase qw(floats_close_enough); use Test::More tests => 45; BEGIN { use_ok('Ogre'); use_ok('Ogre::Vector3'); } my $test = 'new():'; # xxx: ->new() doesn't seem to actually initialize to 0... my $v = Ogre::Vector3->new(0, 0, 0); isa_ok($v, 'Ogre::Vector3'); ok(floats_close_enough($v->x, 0), "$test x == 0"); ok(floats_close_enough($v->y, 0), "$test y == 0"); ok(floats_close_enough($v->z, 0), "$test z == 0"); ok(floats_close_enough($v->length, 0), "$test length"); ok($v->isZeroLength, "$test isZeroLength"); $test = 'new(2):'; my $v1 = Ogre::Vector3->new(2); isa_ok($v1, 'Ogre::Vector3'); ok(floats_close_enough($v1->x, 2), "$test x == 2"); ok(floats_close_enough($v1->y, 2), "$test y == 2"); ok(floats_close_enough($v1->z, 2), "$test z == 2"); ok(floats_close_enough($v1->length, sqrt(2*2+2*2+2*2)), "$test length"); ok(floats_close_enough($v1->squaredLength, 2*2+2*2+2*2), "$test squaredLength"); $test = 'new(-2,-2,-2):'; my $v3 = Ogre::Vector3->new(-2,-2,-2); isa_ok($v3, 'Ogre::Vector3'); ok(floats_close_enough($v3->x, -2), "$test x == -2"); ok(floats_close_enough($v3->y, -2), "$test y == -2"); ok(floats_close_enough($v3->z, -2), "$test z == -2"); ok(floats_close_enough($v3->length, sqrt(2*2+2*2+2*2)), "$test length"); ok(floats_close_enough($v3->squaredLength, 2*2+2*2+2*2), "$test squaredLength"); ok($v3->positionEquals(Ogre::Vector3->new(-2,-2,-2)), "$test positionEquals"); ok($v3->positionCloses(Ogre::Vector3->new(-2,-2,-2)), "$test positionCloses"); $test = 'v, v3:'; ok(floats_close_enough($v->distance($v3), $v3->length), "$test distance"); $test = 'v1, v3:'; ok(floats_close_enough($v1->squaredDistance($v3), 4*4+4*4+4*4), "$test squaredDistance"); ok(floats_close_enough($v1->dotProduct($v3), -2*2+-2*2+-2*2), "$test dotProduct"); ok(floats_close_enough($v1->absDotProduct($v3), abs(-2*2+-2*2+-2*2)), "$test absDotProduct"); $test = 'new(3,0,0):'; my $v3x = Ogre::Vector3->new(3, 0, 0); isa_ok($v3x, 'Ogre::Vector3'); ok(floats_close_enough($v3x->x, 3), "$test x == 3"); ok(floats_close_enough($v3x->y, 0), "$test y == 0"); ok(floats_close_enough($v3x->z, 0), "$test z == 0"); $test = 'normalised:'; $v3x->normalise(); ok(floats_close_enough($v3x->x, 1), "$test x == 1"); ok(floats_close_enough($v3x->y, 0), "$test y == 0"); ok(floats_close_enough($v3x->z, 0), "$test z == 0"); ok(! $v3x->isZeroLength, "$test not isZeroLength"); $test = 'makeCeil($v1):'; $v3x->makeCeil($v1); ok(floats_close_enough($v3x->x, 2), "$test x == 2"); ok(floats_close_enough($v3x->y, 2), "$test y == 2"); ok(floats_close_enough($v3x->z, 2), "$test z == 2"); $test = 'makeFloor($v3):'; $v3x->makeFloor($v3); ok(floats_close_enough($v3x->x, -2), "$test x == -2"); ok(floats_close_enough($v3x->y, -2), "$test y == -2"); ok(floats_close_enough($v3x->z, -2), "$test z == -2"); ok($v3x == $v3, '$v3x == $v3'); ok($v3x != $v1, '$v3x != $v1'); ok($v3x < $v1, '$v3x < $v1'); ok($v1 > $v3x, '$v1 > $v3x'); my $negv3x = - $v3x; ok($v3x->x == -$negv3x->x, '- $v3x'); Ogre-0.60/t/300_configfile.t0000644000175000017500000000044312146460465015667 0ustar slanningslanning#!/usr/bin/perl use strict; use warnings; use lib 't'; use Ogre::TestBase qw(floats_close_enough); use Test::More tests => 3; BEGIN { use_ok('Ogre'); use_ok('Ogre::ConfigFile'); } my $test = 'new():'; my $c = Ogre::ConfigFile->new(); isa_ok($c, 'Ogre::ConfigFile'); # load Ogre-0.60/t/200_colourvalue.t0000644000175000017500000000241612146460465016123 0ustar slanningslanning#!/usr/bin/perl use strict; use warnings; use lib 't'; use Ogre::TestBase qw(floats_close_enough); use Test::More tests => 19; BEGIN { use_ok('Ogre'); use_ok('Ogre::ColourValue'); } my $test = 'new():'; my $c = Ogre::ColourValue->new(); isa_ok($c, 'Ogre::ColourValue'); ok(floats_close_enough($c->r, 1), "$test r == 1"); ok(floats_close_enough($c->g, 1), "$test g == 1"); ok(floats_close_enough($c->b, 1), "$test b == 1"); ok(floats_close_enough($c->a, 1), "$test a == 1"); $test = 'new(0.1, 0.2, 0.3):'; my $c3 = Ogre::ColourValue->new(0.1, 0.2, 0.3); isa_ok($c, 'Ogre::ColourValue'); ok(floats_close_enough($c3->r, 0.1), "$test r == 0.1"); ok(floats_close_enough($c3->g, 0.2), "$test g == 0.2"); ok(floats_close_enough($c3->b, 0.3), "$test b == 0.3"); ok(floats_close_enough($c3->a, 1), "$test a == 1"); $test = 'new(0.1, 0.2, 0.3, 0.4):'; my $c4 = Ogre::ColourValue->new(0.1, 0.2, 0.3, 0.4); isa_ok($c, 'Ogre::ColourValue'); ok(floats_close_enough($c4->r, 0.1), "$test r == 0.1"); ok(floats_close_enough($c4->g, 0.2), "$test g == 0.2"); ok(floats_close_enough($c4->b, 0.3), "$test b == 0.3"); ok(floats_close_enough($c4->a, 0.4), "$test a == 0.4"); $test = '$c3 != $c4'; ok($c3 != $c4, $test); $test = '$c == 1,1,1,1'; ok($c == Ogre::ColourValue->new(1,1,1,1), $test); Ogre-0.60/t/210_degree.t0000644000175000017500000000227412146460465015021 0ustar slanningslanning#!/usr/bin/perl use strict; use warnings; use Math::Trig; use lib 't'; use Ogre::TestBase qw(floats_close_enough); use Test::More tests => 17; BEGIN { use_ok('Ogre'); use_ok('Ogre::Degree'); } my $test = 'new():'; my $d = Ogre::Degree->new(); isa_ok($d, 'Ogre::Degree'); ok(floats_close_enough($d->valueDegrees, 0), "$test valueDegrees == 0"); ok(floats_close_enough($d->valueRadians, 0), "$test valueRadians == 0"); $test = 'new(180)'; my $d180 = Ogre::Degree->new(180); isa_ok($d180, 'Ogre::Degree'); ok(floats_close_enough($d180->valueDegrees, 180), "$test valueDegrees == 180"); ok(floats_close_enough($d180->valueRadians, pi), "$test valueRadians == pi"); $test = 'new($r)'; my $r = Ogre::Radian->new(0); my $dr = Ogre::Degree->new($r); isa_ok($dr, 'Ogre::Degree'); ok(floats_close_enough($dr->valueDegrees, 0), "$test valueDegrees == 0"); ok(floats_close_enough($dr->valueRadians, 0), "$test valueRadians == 0"); $test = '$d == $dr'; ok($d == $dr, $test); $test = '$d != $d180'; ok($d != $d180, $test); $test = '$d < $d180'; ok($d < $d180, $test); $test = '$d180 > $d'; ok($d180 > $d, $test); $test = '$d <= $dr'; ok($d <= $dr, $test); $test = '$d >= $dr'; ok($d >= $dr, $test); Ogre-0.60/t/000_use.t0000644000175000017500000000014112146460465014346 0ustar slanningslanning#!/usr/bin/perl use strict; use warnings; use Test::More tests => 1; BEGIN { use_ok('Ogre') } Ogre-0.60/t/220_radian.t0000644000175000017500000000226012146460465015020 0ustar slanningslanning#!/usr/bin/perl use strict; use warnings; use Math::Trig; use lib 't'; use Ogre::TestBase qw(floats_close_enough); use Test::More tests => 17; BEGIN { use_ok('Ogre'); use_ok('Ogre::Radian'); } my $test = 'new():'; my $r = Ogre::Radian->new(); isa_ok($r, 'Ogre::Radian'); ok(floats_close_enough($r->valueRadians, 0), "$test valueRadians == 0"); ok(floats_close_enough($r->valueDegrees, 0), "$test valueDegrees == 0"); $test = 'new(pi)'; my $rPi = Ogre::Radian->new(pi); isa_ok($rPi, 'Ogre::Radian'); ok(floats_close_enough($rPi->valueRadians, pi), "$test valueRadians == pi"); ok(floats_close_enough($rPi->valueDegrees, 180), "$test valueDegrees == 180"); $test = 'new($d)'; my $d = Ogre::Degree->new(0); my $rd = Ogre::Radian->new($d); isa_ok($rd, 'Ogre::Radian'); ok(floats_close_enough($rd->valueRadians, 0), "$test valueRadians == 0"); ok(floats_close_enough($rd->valueDegrees, 0), "$test valueDegrees == 0"); $test = '$r == $rd'; ok($r == $rd, $test); $test = '$r != $rPi'; ok($r != $rPi, $test); $test = '$r < $rPi'; ok($r < $rPi, $test); $test = '$rPi > $r'; ok($rPi > $r, $test); $test = '$r <= $rd'; ok($r <= $rd, $test); $test = '$r >= $rd'; ok($r >= $rd, $test); Ogre-0.60/t/Ogre/0000755000175000017500000000000012162410433013672 5ustar slanningslanningOgre-0.60/t/Ogre/TestBase.pm0000644000175000017500000000052412146460465015757 0ustar slanningslanningpackage Ogre::TestBase; require Exporter; our @ISA = qw(Exporter); our @EXPORT_OK = qw(floats_close_enough); # Non-integers are kind of fuzzy, # so this checks if two numbers are "close enough", # for some arbitrary value of "close enough". sub floats_close_enough { my ($f1, $f2) = @_; return(abs($f1 - $f2) < 0.0001); } 1; Ogre-0.60/t/110_plane.t0000644000175000017500000000301312146460465014654 0ustar slanningslanning#!/usr/bin/perl use strict; use warnings; use lib 't'; use Ogre::TestBase qw(floats_close_enough); use Test::More tests => 21; BEGIN { use_ok('Ogre'); use_ok('Ogre::Plane'); use_ok('Ogre::Vector3'); } my $vx = Ogre::Vector3->new(1, 0, 0); my $v2 = Ogre::Vector3->new(2, 0, 0); my $v3 = Ogre::Vector3->new(2, 1, 0); my $test = 'new()'; my $p0 = Ogre::Plane->new(); isa_ok($p0, 'Ogre::Plane'); is($p0->d, 0, "$test d == 0"); isa_ok($p0->normal, 'Ogre::Vector3'); is($p0->normal->length, 0, "$test: length == 0"); $test = 'new(Vector3, Real)'; my $pvr = Ogre::Plane->new($vx, 10); isa_ok($pvr, 'Ogre::Plane'); is($pvr->d, -10, "$test d == -10"); isa_ok($pvr->normal, 'Ogre::Vector3'); is($pvr->normal->length, 1, "$test: length == 1"); $test = 'new(Vector3, Vector3)'; my $pvv = Ogre::Plane->new($vx, $vx); isa_ok($pvv, 'Ogre::Plane'); is($pvv->d, -1, "$test d == -1"); isa_ok($pvv->normal, 'Ogre::Vector3'); is($pvv->normal->length, 1, "$test: length == 1"); $test = 'new(Vector3, Vector3, Vector3)'; my $pvvv = Ogre::Plane->new($vx, $v2, $v3); isa_ok($pvvv, 'Ogre::Plane'); # XXX: I don't know what this should be, it gives '-0' # is($pvvv->d, -0, "$test d == -0"); isa_ok($pvvv->normal, 'Ogre::Vector3'); is($pvvv->normal->length, 1, "$test: length == 1"); $test = 'new(Plane)'; my $pp = Ogre::Plane->new($pvvv); isa_ok($pp, 'Ogre::Plane'); # XXX: I don't know what this should be, it gives '-0' # is($pp->d, -0, "$test d == -0"); isa_ok($pp->normal, 'Ogre::Vector3'); is($pp->normal->length, 1, "$test: length == 1"); Ogre-0.60/t/101_vector2.t0000644000175000017500000000450012146460465015143 0ustar slanningslanning#!/usr/bin/perl use strict; use warnings; use lib 't'; use Ogre::TestBase qw(floats_close_enough); use Test::More tests => 34; BEGIN { use_ok('Ogre'); use_ok('Ogre::Vector2'); } my $test = 'new():'; # xxx: ->new() doesn't seem to actually initialize to 0... my $v = Ogre::Vector2->new(0, 0); isa_ok($v, 'Ogre::Vector2'); ok(floats_close_enough($v->x, 0), "$test x == 0"); ok(floats_close_enough($v->y, 0), "$test y == 0"); ok(floats_close_enough($v->length, 0), "$test length"); ok($v->isZeroLength, "$test isZeroLength"); $test = 'new(2):'; my $v1 = Ogre::Vector2->new(2); isa_ok($v1, 'Ogre::Vector2'); ok(floats_close_enough($v1->x, 2), "$test x == 2"); ok(floats_close_enough($v1->y, 2), "$test y == 2"); ok(floats_close_enough($v1->length, sqrt(2*2+2*2)), "$test length"); ok(floats_close_enough($v1->squaredLength, 2*2+2*2), "$test squaredLength"); $test = 'new(-2,-2):'; my $v2 = Ogre::Vector2->new(-2,-2); isa_ok($v2, 'Ogre::Vector2'); ok(floats_close_enough($v2->x, -2), "$test x == -2"); ok(floats_close_enough($v2->y, -2), "$test y == -2"); ok(floats_close_enough($v2->length, sqrt(2*2+2*2)), "$test length"); ok(floats_close_enough($v2->squaredLength, 2*2+2*2), "$test squaredLength"); ok(floats_close_enough($v1->dotProduct($v2), -2*2+-2*2), "$test dotProduct"); ok(floats_close_enough($v1->crossProduct($v2), 2*-2-(-2*2)), "$test crossProduct"); $test = 'new(3,0):'; my $v3x = Ogre::Vector2->new(3, 0); isa_ok($v3x, 'Ogre::Vector2'); ok(floats_close_enough($v3x->x, 3), "$test x == 3"); ok(floats_close_enough($v3x->y, 0), "$test y == 0"); $test = 'normalised:'; $v3x->normalise(); ok(floats_close_enough($v3x->x, 1), "$test x == 1"); ok(floats_close_enough($v3x->y, 0), "$test y == 0"); ok(! $v3x->isZeroLength, "$test not isZeroLength"); $test = 'makeCeil($v1):'; $v3x->makeCeil($v1); ok(floats_close_enough($v3x->x, 2), "$test x == 2"); ok(floats_close_enough($v3x->y, 2), "$test y == 2"); $test = 'makeFloor($v2):'; $v3x->makeFloor($v2); ok(floats_close_enough($v3x->x, -2), "$test x == -2"); ok(floats_close_enough($v3x->y, -2), "$test y == -2"); SKIP: { skip "overloaded operators not implemented yet", 5; ok($v3x == $v2, '$v3x == $v2'); ok($v3x != $v1, '$v3x != $v1'); ok($v3x < $v1, '$v3x < $v1'); ok($v1 > $v3x, '$v1 > $v3x'); my $negv3x = - $v3x; ok($v3x->x == -$negv3x->x, '- $v3x'); } Ogre-0.60/t/400_root.t0000644000175000017500000000054112146460465014545 0ustar slanningslanning#!/usr/bin/perl use strict; use warnings; use lib 't'; use Ogre::TestBase qw(floats_close_enough); use Test::More tests => 3; BEGIN { use_ok('Ogre'); use_ok('Ogre::Root'); } my $test = 'new():'; my $r = Ogre::Root->new(); isa_ok($r, 'Ogre::Root'); #$test = 'new(p)'; #my $r1 = Ogre::Root->new('plugins.cfg'); #isa_ok($r1, 'Ogre::Root'); Ogre-0.60/TODO.txt0000644000175000017500000000456412146460465014066 0ustar slanningslanningLots of stuff left to do.... update : http://www.ogre3d.org/wiki/index.php/ShoggothNotes - A lot of methods that return objects (instead of pointers) haven't been wrapped. It's because I'm not sure if I handle them right. For example, this method of SceneNode const Vector3 &getPosition (void) const returns a reference, not a pointer. Should I do this? Vector3 * SceneNode::getPosition() CODE: RETVAL = new Vector3; *RETVAL = THIS->getPosition(); OUTPUT: RETVAL Does that leak memory? I'd guess so. (note: I found out that in some of these cases, I guess where it's a const ref, I can do RETVAL = &(THIS->getPosition())) - Another problem is polymorphic methods, where the same method can have different call signatures (e.g. pass in either a Vector3 or three Reals). Very tedious to implement in XS. but it'd be better if all the different ways would work. I guess it could be done in Perl, just it would be annoying. (Say you have three different XSUBs, then in the Perl module a single method calls one of those depending on the arguments passed in. But having three different XSUBs, now you have to also implement the CODE and OUTPUT section for each one... Doing this hundreds of times gets tedious.) Maybe I can make a few utility functions. - There's a problem similar to operator overloading: Vector3 has 'x', 'y', and 'z' "public attributes", which would ideally be exposed in Perl like $v->{x} = 23, etc., but I don't see how to do that since the objects are pointers to C++ objects, not hashes. Any ideas? I guess I could make the pointers be referenced from the hash instead of being the object itself. (probably end up with an elaborate system like Gtk2 uses - there are other problems, like how do you subclass and add data members if the object is a C++ pointer?) - All the modules are loaded from Ogre.pm and Ogre.xs, and the number of modules is increasing.... Need to look at getting them to load only when used. - Get Wx and Gtk2 support working better, also look at SDL. - want to add ability to subclass ControllerValue / ControllerFunction, so that e.g. the Lighting sample app can be done; should be similar to the Listener stuff (this is in place - but haven't tested it) - subclasses of MovableObject are unable to have constructors/destructors (see notes in BillboardSet.xs) Ogre-0.60/Ogre.pm0000644000175000017500000004233012162373422013775 0ustar slanningslanningpackage Ogre; use 5.006; use strict; use warnings; require DynaLoader; our @ISA = qw(DynaLoader); our $VERSION = '0.60'; # use all files under Ogre/ - probably not a good idea ## BEGIN USES use Ogre::AnimableObject; use Ogre::AnimableValue; use Ogre::Animation; use Ogre::AnimationControllerFunction; use Ogre::AnimationState; use Ogre::AnimationStateSet; use Ogre::AnimationTrack; use Ogre::AxisAlignedBox; use Ogre::AxisAlignedBoxSceneQuery; use Ogre::Billboard; use Ogre::BillboardChain; use Ogre::BillboardSet; use Ogre::Bone; use Ogre::BorderPanelOverlayElement; use Ogre::Camera; use Ogre::ColourValue; use Ogre::CompositionPass; use Ogre::CompositionTargetPass; use Ogre::ConfigFile; use Ogre::ControllerManager; use Ogre::ControllerReal; use Ogre::DataStream; use Ogre::Degree; use Ogre::EdgeData; use Ogre::Entity; use Ogre::Exception; use Ogre::Frustum; use Ogre::GpuProgram; use Ogre::GpuProgramParameters; use Ogre::HardwareBuffer; use Ogre::HardwareBufferManager; use Ogre::HardwareIndexBuffer; use Ogre::HardwarePixelBuffer; use Ogre::HardwareVertexBuffer; use Ogre::Image; use Ogre::IndexData; use Ogre::InstancedGeometry::InstancedObject; use Ogre::InstancedGeometry; use Ogre::IntersectionSceneQuery; use Ogre::KeyFrame; use Ogre::Light; use Ogre::Log; use Ogre::LogManager; use Ogre::ManualObject::ManualObjectSection; use Ogre::ManualObject; use Ogre::ManualResourceLoader; use Ogre::Material; use Ogre::MaterialManager; use Ogre::Math; use Ogre::Matrix3; use Ogre::Matrix4; use Ogre::Mesh; use Ogre::MeshManager; use Ogre::MeshPtr; use Ogre::MovableObject; use Ogre::MultiRenderTarget; use Ogre::Node; use Ogre::NodeAnimationTrack; use Ogre::NumericAnimationTrack; use Ogre::Overlay; use Ogre::OverlayContainer; use Ogre::OverlayElement; use Ogre::OverlayManager; use Ogre::PanelOverlayElement; use Ogre::Particle; use Ogre::ParticleAffector; use Ogre::ParticleEmitter; use Ogre::ParticleSystem; use Ogre::ParticleSystemRenderer; use Ogre::Pass; use Ogre::PassthroughControllerFunction; use Ogre::PatchMesh; use Ogre::PatchSurface; use Ogre::Plane; use Ogre::PlaneBoundedVolume; use Ogre::PlaneBoundedVolumeListSceneQuery; use Ogre::Pose; use Ogre::Quaternion; use Ogre::QueuedRenderableCollection; use Ogre::Radian; use Ogre::Ray; use Ogre::RaySceneQuery; use Ogre::RegionSceneQuery; use Ogre::RenderOperation; use Ogre::RenderSystem; use Ogre::RenderSystemCapabilities; use Ogre::RenderTarget; use Ogre::RenderTexture; use Ogre::RenderWindow; use Ogre::Renderable; use Ogre::Resource; use Ogre::ResourceGroupManager; use Ogre::ResourceManager; use Ogre::RibbonTrail; use Ogre::Root; use Ogre::ScaleControllerFunction; use Ogre::SceneManager; use Ogre::SceneNode; use Ogre::SceneQuery::WorldFragment; use Ogre::SceneQuery; use Ogre::ScriptLoader; use Ogre::Serializer; use Ogre::ShadowCaster; use Ogre::Skeleton; use Ogre::SkeletonInstance; use Ogre::SkeletonManager; use Ogre::Sphere; use Ogre::SphereSceneQuery; use Ogre::StaticGeometry; use Ogre::StringInterface; use Ogre::SubEntity; use Ogre::SubMesh; use Ogre::TagPoint; use Ogre::Technique; use Ogre::TextAreaOverlayElement; use Ogre::Texture; use Ogre::TextureManager; use Ogre::TextureUnitState; use Ogre::TimeIndex; use Ogre::Timer; use Ogre::TransformKeyFrame; use Ogre::Vector2; use Ogre::Vector3; use Ogre::Vector4; use Ogre::VertexAnimationTrack; use Ogre::VertexBufferBinding; use Ogre::VertexCacheProfiler; use Ogre::VertexData; use Ogre::VertexDeclaration; use Ogre::VertexElement; use Ogre::Viewport; use Ogre::WaveformControllerFunction; use Ogre::WindowEventUtilities; ## END USES sub dl_load_flags { $^O eq 'darwin' ? 0x00 : 0x01 } __PACKAGE__->bootstrap($VERSION); ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'SceneType' => [qw( ST_GENERIC ST_EXTERIOR_CLOSE ST_EXTERIOR_FAR ST_EXTERIOR_REAL_FAR ST_INTERIOR )], 'StencilOperation' => [qw( SOP_KEEP SOP_ZERO SOP_REPLACE SOP_INCREMENT SOP_DECREMENT SOP_INCREMENT_WRAP SOP_DECREMENT_WRAP SOP_INVERT )], 'TexCoordCalcMethod' => [qw( TEXCALC_NONE TEXCALC_ENVIRONMENT_MAP TEXCALC_ENVIRONMENT_MAP_PLANAR TEXCALC_ENVIRONMENT_MAP_REFLECTION TEXCALC_ENVIRONMENT_MAP_NORMAL TEXCALC_PROJECTIVE_TEXTURE )], 'Capabilities' => [qw( RSC_AUTOMIPMAP RSC_BLENDING RSC_ANISOTROPY RSC_DOT3 RSC_CUBEMAPPING RSC_HWSTENCIL RSC_VBO RSC_VERTEX_PROGRAM RSC_FRAGMENT_PROGRAM RSC_TEXTURE_COMPRESSION RSC_TEXTURE_COMPRESSION_DXT RSC_TEXTURE_COMPRESSION_VTC RSC_SCISSOR_TEST RSC_TWO_SIDED_STENCIL RSC_STENCIL_WRAP RSC_HWOCCLUSION RSC_USER_CLIP_PLANES RSC_VERTEX_FORMAT_UBYTE4 RSC_INFINITE_FAR_PLANE RSC_HWRENDER_TO_TEXTURE RSC_TEXTURE_FLOAT RSC_NON_POWER_OF_2_TEXTURES RSC_TEXTURE_3D RSC_POINT_SPRITES RSC_POINT_EXTENDED_PARAMETERS RSC_VERTEX_TEXTURE_FETCH RSC_MIPMAP_LOD_BIAS )], 'IlluminationStage' => [qw( IS_AMBIENT IS_PER_LIGHT IS_DECAL )], 'GuiVerticalAlignment' => [qw( GVA_TOP GVA_CENTER GVA_BOTTOM )], 'GuiHorizontalAlignment' => [qw( GHA_LEFT GHA_CENTER GHA_RIGHT )], 'GuiMetricsMode' => [qw( GMM_RELATIVE GMM_PIXELS GMM_RELATIVE_ASPECT_ADJUSTED )], 'MaterialScriptSection' => [qw( MSS_NONE MSS_MATERIAL MSS_TECHNIQUE MSS_PASS MSS_TEXTUREUNIT MSS_PROGRAM_REF MSS_PROGRAM MSS_DEFAULT_PARAMETERS MSS_TEXTURESOURCE )], 'LogMessageLevel' => [qw( LML_TRIVIAL LML_NORMAL LML_CRITICAL )], 'LoggingLevel' => [qw( LL_LOW LL_NORMAL LL_BOREME )], 'SkeletonAnimationBlendMode' => [qw( ANIMBLEND_AVERAGE ANIMBLEND_CUMULATIVE )], 'TextureMipmap' => [qw( MIP_UNLIMITED MIP_DEFAULT )], 'TextureType' => [qw( TEX_TYPE_1D TEX_TYPE_2D TEX_TYPE_3D TEX_TYPE_CUBE_MAP )], 'TextureUsage' => [qw( TU_STATIC TU_DYNAMIC TU_WRITE_ONLY TU_STATIC_WRITE_ONLY TU_DYNAMIC_WRITE_ONLY TU_DYNAMIC_WRITE_ONLY_DISCARDABLE TU_AUTOMIPMAP TU_RENDERTARGET TU_DEFAULT )], 'ImageFlags' => [qw( IF_COMPRESSED IF_CUBEMAP IF_3D_TEXTURE )], 'PixelComponentType' => [qw( PCT_BYTE PCT_SHORT PCT_FLOAT16 PCT_FLOAT32 PCT_COUNT )], 'PixelFormatFlags' => [qw( PFF_HASALPHA PFF_COMPRESSED PFF_FLOAT PFF_DEPTH PFF_NATIVEENDIAN PFF_LUMINANCE )], 'PixelFormat' => [qw( PF_UNKNOWN PF_L8 PF_BYTE_L PF_L16 PF_SHORT_L PF_A8 PF_BYTE_A PF_A4L4 PF_BYTE_LA PF_R5G6B5 PF_B5G6R5 PF_R3G3B2 PF_A4R4G4B4 PF_A1R5G5B5 PF_R8G8B8 PF_B8G8R8 PF_A8R8G8B8 PF_A8B8G8R8 PF_B8G8R8A8 PF_R8G8B8A8 PF_X8R8G8B8 PF_X8B8G8R8 PF_BYTE_RGB PF_BYTE_BGR PF_BYTE_BGRA PF_BYTE_RGBA PF_A2R10G10B10 PF_A2B10G10R10 PF_DXT1 PF_DXT2 PF_DXT3 PF_DXT4 PF_DXT5 PF_FLOAT16_R PF_FLOAT16_RGB PF_FLOAT16_RGBA PF_FLOAT32_R PF_FLOAT32_RGB PF_FLOAT32_RGBA PF_FLOAT16_GR PF_FLOAT32_GR PF_DEPTH PF_SHORT_RGBA PF_SHORT_GR PF_SHORT_RGB PF_COUNT )], 'FrustumPlane' => [qw( FRUSTUM_PLANE_NEAR FRUSTUM_PLANE_FAR FRUSTUM_PLANE_LEFT FRUSTUM_PLANE_RIGHT FRUSTUM_PLANE_TOP FRUSTUM_PLANE_BOTTOM )], 'ProjectionType' => [qw( PT_ORTHOGRAPHIC PT_PERSPECTIVE )], 'BillboardType' => [qw( BBT_POINT BBT_ORIENTED_COMMON BBT_ORIENTED_SELF BBT_PERPENDICULAR_COMMON BBT_PERPENDICULAR_SELF )], 'BillboardRotationType' => [qw( BBR_VERTEX BBR_TEXCOORD )], 'BillboardOrigin' => [qw( BBO_TOP_LEFT BBO_TOP_CENTER BBO_TOP_RIGHT BBO_CENTER_LEFT BBO_CENTER BBO_CENTER_RIGHT BBO_BOTTOM_LEFT BBO_BOTTOM_CENTER BBO_BOTTOM_RIGHT )], 'ShadowRenderableFlags' => [qw( SRF_INCLUDE_LIGHT_CAP SRF_INCLUDE_DARK_CAP SRF_EXTRUDE_TO_INFINITY )], 'GpuConstantType' => [qw( GCT_FLOAT1 GCT_FLOAT2 GCT_FLOAT3 GCT_FLOAT4 GCT_SAMPLER1D GCT_SAMPLER2D GCT_SAMPLER3D GCT_SAMPLERCUBE GCT_SAMPLER1DSHADOW GCT_SAMPLER2DSHADOW GCT_MATRIX_2X2 GCT_MATRIX_2X3 GCT_MATRIX_2X4 GCT_MATRIX_3X2 GCT_MATRIX_3X3 GCT_MATRIX_3X4 GCT_MATRIX_4X2 GCT_MATRIX_4X3 GCT_MATRIX_4X4 GCT_INT1 GCT_INT2 GCT_INT3 GCT_INT4 GCT_UNKNOWN )], 'GpuProgramType' => [qw( GPT_VERTEX_PROGRAM GPT_FRAGMENT_PROGRAM )], 'SceneBlendFactor' => [qw( SBF_ONE SBF_ZERO SBF_DEST_COLOUR SBF_SOURCE_COLOUR SBF_ONE_MINUS_DEST_COLOUR SBF_ONE_MINUS_SOURCE_COLOUR SBF_DEST_ALPHA SBF_SOURCE_ALPHA SBF_ONE_MINUS_DEST_ALPHA SBF_ONE_MINUS_SOURCE_ALPHA )], 'SceneBlendType' => [qw( SBT_TRANSPARENT_ALPHA SBT_TRANSPARENT_COLOUR SBT_ADD SBT_MODULATE SBT_REPLACE )], 'LayerBlendSource' => [qw( LBS_CURRENT LBS_TEXTURE LBS_DIFFUSE LBS_SPECULAR LBS_MANUAL )], 'LayerBlendOperationEx' => [qw( LBX_SOURCE1 LBX_SOURCE2 LBX_MODULATE LBX_MODULATE_X2 LBX_MODULATE_X4 LBX_ADD LBX_ADD_SIGNED LBX_ADD_SMOOTH LBX_SUBTRACT LBX_BLEND_DIFFUSE_ALPHA LBX_BLEND_TEXTURE_ALPHA LBX_BLEND_CURRENT_ALPHA LBX_BLEND_MANUAL LBX_DOTPRODUCT LBX_BLEND_DIFFUSE_COLOUR )], 'LayerBlendOperation' => [qw( LBO_REPLACE LBO_ADD LBO_MODULATE LBO_ALPHA_BLEND )], 'LayerBlendType' => [qw( LBT_COLOUR LBT_ALPHA )], 'RenderQueueGroupID' => [qw( RENDER_QUEUE_BACKGROUND RENDER_QUEUE_SKIES_EARLY RENDER_QUEUE_1 RENDER_QUEUE_2 RENDER_QUEUE_WORLD_GEOMETRY_1 RENDER_QUEUE_3 RENDER_QUEUE_4 RENDER_QUEUE_MAIN RENDER_QUEUE_6 RENDER_QUEUE_7 RENDER_QUEUE_WORLD_GEOMETRY_2 RENDER_QUEUE_8 RENDER_QUEUE_9 RENDER_QUEUE_SKIES_LATE RENDER_QUEUE_OVERLAY RENDER_QUEUE_MAX )], 'ParameterType' => [qw( PT_BOOL PT_REAL PT_INT PT_UNSIGNED_INT PT_SHORT PT_UNSIGNED_SHORT PT_LONG PT_UNSIGNED_LONG PT_STRING PT_VECTOR3 PT_MATRIX3 PT_MATRIX4 PT_QUATERNION PT_COLOURVALUE )], 'FrameBufferType' => [qw( FBT_COLOUR FBT_DEPTH FBT_STENCIL )], 'SortMode' => [qw( SM_DIRECTION SM_DISTANCE )], 'TrackVertexColourEnum' => [qw( TVC_NONE TVC_AMBIENT TVC_DIFFUSE TVC_SPECULAR TVC_EMISSIVE )], 'ShadowTechnique' => [qw( SHADOWTYPE_NONE SHADOWDETAILTYPE_ADDITIVE SHADOWDETAILTYPE_MODULATIVE SHADOWDETAILTYPE_INTEGRATED SHADOWDETAILTYPE_STENCIL SHADOWDETAILTYPE_TEXTURE SHADOWTYPE_STENCIL_MODULATIVE SHADOWTYPE_STENCIL_ADDITIVE SHADOWTYPE_TEXTURE_MODULATIVE SHADOWTYPE_TEXTURE_ADDITIVE SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED )], 'PolygonMode' => [qw( PM_POINTS PM_WIREFRAME PM_SOLID )], 'WaveformType' => [qw( WFT_SINE WFT_TRIANGLE WFT_SQUARE WFT_SAWTOOTH WFT_INVERSE_SAWTOOTH WFT_PWM )], 'ManualCullingMode' => [qw( MANUAL_CULL_NONE MANUAL_CULL_BACK MANUAL_CULL_FRONT )], 'CullingMode' => [qw( CULL_NONE CULL_CLOCKWISE CULL_ANTICLOCKWISE )], 'FogMode' => [qw( FOG_NONE FOG_EXP FOG_EXP2 FOG_LINEAR )], 'ShadeOptions' => [qw( SO_FLAT SO_GOURAUD SO_PHONG )], 'FilterOptions' => [qw( FO_NONE FO_POINT FO_LINEAR FO_ANISOTROPIC )], 'FilterType' => [qw( FT_MIN FT_MAG FT_MIP )], 'TextureFilterOptions' => [qw( TFO_NONE TFO_BILINEAR TFO_TRILINEAR TFO_ANISOTROPIC )], 'CompareFunction' => [qw( CMPF_ALWAYS_FAIL CMPF_ALWAYS_PASS CMPF_LESS CMPF_LESS_EQUAL CMPF_EQUAL CMPF_NOT_EQUAL CMPF_GREATER_EQUAL CMPF_GREATER )], 'VertexAnimationType' => [qw( VAT_NONE VAT_MORPH VAT_POSE )], 'VertexElementType' => [qw( VET_FLOAT1 VET_FLOAT2 VET_FLOAT3 VET_FLOAT4 VET_COLOUR VET_SHORT1 VET_SHORT2 VET_SHORT3 VET_SHORT4 VET_UBYTE4 VET_COLOUR_ARGB VET_COLOUR_ABGR )], 'VertexElementSemantic' => [qw( VES_POSITION VES_BLEND_WEIGHTS VES_BLEND_INDICES VES_NORMAL VES_DIFFUSE VES_SPECULAR VES_TEXTURE_COORDINATES VES_BINORMAL VES_TANGENT )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ =head1 NAME Ogre - Perl binding for the OGRE C++ graphics library =head1 SYNOPSIS use Ogre; # see examples/README.txt =head1 DESCRIPTION For more details, see F. For documentation on specific classes, see the perldoc for the class. There is a L of classes currently wrapped. The documentation for each class is somewhat minimal. In the DESCRIPTION section there will be a link to the corresponding C++ API documentation on the OGRE website. The documentation of methods uses C++ types to describe its parameters and return values, so some translation to Perl is generally required. Not all methods are currently wrapped, although there are enough to run the examples, which isn't bad. But expect to find that your favorite method isn't wrapped yet. I'm working on completely wrapping the methods, but it's still not there. One particular "category" of methods not yet wrapped is those that return a C++ reference, rather than a pointer (one exception is Node::getPosition). Methods that return fundamental types, like bool or int, are usually wrapped, provided their arguments aren't too weird. There are also some overloaded C++ methods (i.e. different argument parameter types but the same method name) that have only one version of that method implemented; I have to work on how to handle that. See F for more things that aren't done yet. =head1 CLASSES This is the list of classes that are at least partially wrapped. =for comment CLASS LIST BEGIN =over =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =item L =back =for comment CLASS LIST END =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing info, see F. =cut Ogre-0.60/PerlOGREFrameListener.cpp0000644000175000017500000000203612146460465017314 0ustar slanningslanning#include "PerlOGREFrameListener.h" // class implementing Ogre::FrameListener interface, // but using Perl callbacks; pobj is an instance of a Perl class // that (maybe) has frameStarted and/or frameEnded methods PerlOGREFrameListener::PerlOGREFrameListener(SV *pobj) : PerlOGRECallback(pobj) { mCanMap["frameStarted"] = perlCallbackCan("frameStarted"); mCanMap["frameEnded"] = perlCallbackCan("frameEnded"); } bool PerlOGREFrameListener::frameStarted(const Ogre::FrameEvent &evt) { // arg 1 for perl stack SV *perlevt = newSV(0); sv_setref_pv(perlevt, "Ogre::FrameEvent", (void *) &evt); // TMOGRE_OUT mCallbackArgs.push_back(perlevt); // call the callback return callPerlCallback("frameStarted"); } bool PerlOGREFrameListener::frameEnded(const Ogre::FrameEvent &evt) { // arg 1 for perl stack SV *perlevt = newSV(0); sv_setref_pv(perlevt, "Ogre::FrameEvent", (void *) &evt); // TMOGRE_OUT mCallbackArgs.push_back(perlevt); // call the callback return callPerlCallback("frameEnded"); } Ogre-0.60/PerlOGRECallback.h0000644000175000017500000000135512146460465015720 0ustar slanningslanning#ifndef _PERLOGRE_CALLBACK_H_ #define _PERLOGRE_CALLBACK_H_ #include "perlOGRE.h" #include #include #include using namespace std; // this is a baseclass for the other listeners class PerlOGRECallback { public: PerlOGRECallback(SV *pobj); ~PerlOGRECallback(); protected: bool perlCallbackCan(string const &cbmeth); bool callPerlCallback(string const &cbmeth) const; Ogre::Real callPerlCallbackReal(string const &cbmeth) const; void callPerlCallbackVoid(string const &cbmeth) const; SV * mPerlObj; typedef vector CBArgList; mutable CBArgList mCallbackArgs; typedef map CBCanMap; mutable CBCanMap mCanMap; }; #endif /* define _PERLOGRE_CALLBACK_H_ */ Ogre-0.60/PerlOGREControllerFunction.cpp0000644000175000017500000000110412146460465020400 0ustar slanningslanning#include "PerlOGREControllerFunction.h" PerlOGREControllerFunction::PerlOGREControllerFunction(SV *pobj) : PerlOGRECallback(pobj), Ogre::ControllerFunction::ControllerFunction(false) // wow, that's ugly { mCanMap["calculate"] = perlCallbackCan("calculate"); } Ogre::Real PerlOGREControllerFunction::calculate(Ogre::Real sourceValue) { // arg 1 for perl stack SV *perlval = newSV(0); sv_setnv(perlval, (Ogre::Real)sourceValue); mCallbackArgs.push_back(perlval); // call the callback return callPerlCallbackReal("calculate"); } Ogre-0.60/PerlOGREWindowEventListener.cpp0000644000175000017500000000351112146460465020532 0ustar slanningslanning#include "PerlOGREWindowEventListener.h" // class implementing Ogre::WindowEventListener interface, // but using Perl callbacks; pobj is an instance of a Perl class // that (maybe) has implemented (some of) the WindowEventListener methods PerlOGREWindowEventListener::PerlOGREWindowEventListener(SV *pobj) : PerlOGRECallback(pobj) { mCanMap["windowMoved"] = perlCallbackCan("windowMoved"); mCanMap["windowResized"] = perlCallbackCan("windowResized"); mCanMap["windowClosed"] = perlCallbackCan("windowClosed"); mCanMap["windowFocusChange"] = perlCallbackCan("windowFocusChange"); } void PerlOGREWindowEventListener::windowMoved(Ogre::RenderWindow *win) { // arg 1 for perl stack SV *perlevt = newSV(0); sv_setref_pv(perlevt, "Ogre::RenderWindow", (void *) win); // TMOGRE_OUT mCallbackArgs.push_back(perlevt); // call the callback callPerlCallback("windowMoved"); } void PerlOGREWindowEventListener::windowResized(Ogre::RenderWindow *win) { // arg 1 for perl stack SV *perlevt = newSV(0); sv_setref_pv(perlevt, "Ogre::RenderWindow", (void *) win); // TMOGRE_OUT mCallbackArgs.push_back(perlevt); // call the callback callPerlCallback("windowResized"); } void PerlOGREWindowEventListener::windowClosed(Ogre::RenderWindow *win) { // arg 1 for perl stack SV *perlevt = newSV(0); sv_setref_pv(perlevt, "Ogre::RenderWindow", (void *) win); // TMOGRE_OUT mCallbackArgs.push_back(perlevt); // call the callback callPerlCallback("windowClosed"); } void PerlOGREWindowEventListener::windowFocusChange(Ogre::RenderWindow *win) { // arg 1 for perl stack SV *perlevt = newSV(0); sv_setref_pv(perlevt, "Ogre::RenderWindow", (void *) win); // TMOGRE_OUT mCallbackArgs.push_back(perlevt); // call the callback callPerlCallback("windowFocusChange"); } Ogre-0.60/Ogre/0000755000175000017500000000000012162410433013427 5ustar slanningslanningOgre-0.60/Ogre/AnimationControllerFunction.pm0000644000175000017500000000034512146460465021474 0ustar slanningslanningpackage Ogre::AnimationControllerFunction; use strict; use warnings; # N.B. although this inherits from Ogre::ControllerFunction, # that doesn't happen here, # and you must not do that in your code, either. 1; __END__ Ogre-0.60/Ogre/Root.pm0000644000175000017500000001165512146460465014734 0ustar slanningslanningpackage Ogre::Root; use strict; use warnings; 1; __END__ =head1 NAME Ogre::Root =head1 SYNOPSIS use Ogre; use Ogre::Root; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::Root->new(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item Root * =back =head2 Ogre::Root->DESTROY() This method is called automatically; don't call it yourself. =head1 INSTANCE METHODS =head2 $obj->saveConfig() I =over =item void =back =head2 $obj->restoreConfig() I =over =item bool =back =head2 $obj->showConfigDialog() I =over =item bool =back =head2 $obj->addRenderSystem($RenderSystem *newRend) I =over =item $RenderSystem *newRend : (no info available) =back I =over =item void =back =head2 $obj->getRenderSystemByName($String name) I =over =item $String name : (no info available) =back I =over =item RenderSystem * =back =head2 $obj->setRenderSystem($RenderSystem *system) I =over =item $RenderSystem *system : (no info available) =back I =over =item void =back =head2 $obj->getRenderSystem() I =over =item RenderSystem * =back =head2 $obj->initialise($autoCreateWindow, ...) I =over =item $autoCreateWindow : bool =item ... : this varies... (sorry, look in the .xs file) =back I =over =item RenderWindow * =back =head2 $obj->isInitialised() I =over =item bool =back =head2 $obj->createSceneManager(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item SceneManager * =back =head2 $obj->destroySceneManager($sm) I =over =item $sm : SceneManager * =back I =over =item void =back =head2 $obj->getSceneManager($instanceName) I =over =item $instanceName : String =back I =over =item SceneManager * =back =head2 $obj->getTextureManager() I =over =item TextureManager * =back =head2 $obj->getMeshManager() I =over =item MeshManager * =back =head2 $obj->getErrorDescription($errorNumber) I =over =item $errorNumber : long =back I =over =item String =back =head2 $obj->addFrameListener($perlListener) I =over =item $perlListener : SV * =back I =over =item void =back =head2 $obj->removeFrameListener($perlListener) I =over =item $perlListener : SV * =back I =over =item void =back =head2 $obj->queueEndRendering() I =over =item void =back =head2 $obj->startRendering() I =over =item void =back =head2 $obj->renderOneFrame() I =over =item bool =back =head2 $obj->shutdown() I =over =item void =back =head2 $obj->addResourceLocation($String name, $String locType, $String groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, $bool recursive=false) I =over =item $String name : (no info available) =item $String locType : (no info available) =item $String groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME : (no info available) =item $bool recursive=false : (no info available) =back I =over =item void =back =head2 $obj->getAutoCreatedWindow() I =over =item RenderWindow * =back =head2 $obj->createRenderWindow($name, $width, $height, $fullScreen, ...) I =over =item $name : String =item $width : unsigned int =item $height : unsigned int =item $fullScreen : bool =item ... : this varies... (sorry, look in the .xs file) =back I =over =item RenderWindow * =back =head2 $obj->detachRenderTarget($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->getRenderTarget($name) I =over =item $name : String =back I =over =item RenderTarget * =back =head2 $obj->loadPlugin($pluginName) I =over =item $pluginName : String =back I =over =item void =back =head2 $obj->unloadPlugin($pluginName) I =over =item $pluginName : String =back I =over =item void =back =head2 $obj->getCurrentFrameNumber() I =over =item unsigned long =back =head2 $obj->clearEventTimes() I =over =item void =back =head2 $obj->setFrameSmoothingPeriod($period) I =over =item $period : Real =back I =over =item void =back =head2 $obj->getFrameSmoothingPeriod() I =over =item Real =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Image.pm0000644000175000017500000000073312146460465015026 0ustar slanningslanningpackage Ogre::Image; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::Image::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'Filter' => [qw( FILTER_NEAREST FILTER_LINEAR FILTER_BILINEAR FILTER_BOX FILTER_TRIANGLE FILTER_BICUBIC )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/TagPoint.pm0000644000175000017500000000015512146460465015527 0ustar slanningslanningpackage Ogre::TagPoint; use strict; use warnings; use Ogre::Bone; our @ISA = qw(Ogre::Bone); 1; __END__ Ogre-0.60/Ogre/SubEntity.pm0000644000175000017500000000416612146460465015736 0ustar slanningslanningpackage Ogre::SubEntity; use strict; use warnings; use Ogre::Renderable; our @ISA = qw(Ogre::Renderable); 1; __END__ =head1 NAME Ogre::SubEntity =head1 SYNOPSIS use Ogre; use Ogre::SubEntity; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->getMaterialName() I =over =item String =back =head2 $obj->setMaterialName($String name) I =over =item $String name : (no info available) =back I =over =item void =back =head2 $obj->setVisible($bool visible) I =over =item $bool visible : (no info available) =back I =over =item void =back =head2 $obj->isVisible() I =over =item bool =back =head2 $obj->getSubMesh() I =over =item SubMesh * =back =head2 $obj->getParent() I =over =item Entity * =back =head2 $obj->getMaterial() I =over =item const Material * =back =head2 $obj->getTechnique() I =over =item Technique * =back =head2 $obj->getRenderOperation($OUTLIST RenderOperation *op) I =over =item $OUTLIST RenderOperation *op : (no info available) =back I =over =item void =back =head2 $obj->getWorldOrientation() I =over =item Quaternion * =back =head2 $obj->getWorldPosition() I =over =item Vector3 * =back =head2 $obj->getNormaliseNormals() I =over =item bool =back =head2 $obj->getNumWorldTransforms() I =over =item unsigned short =back =head2 $obj->getSquaredViewDepth($const Camera *cam) I =over =item $const Camera *cam : (no info available) =back I =over =item Real =back =head2 $obj->getCastsShadows() I =over =item bool =back =head2 $obj->getVertexDataForBinding() I =over =item VertexData * =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/SubMesh.pm0000644000175000017500000000010112146460465015337 0ustar slanningslanningpackage Ogre::SubMesh; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/PanelOverlayElement.pm0000644000175000017500000000022012146460465017706 0ustar slanningslanningpackage Ogre::PanelOverlayElement; use strict; use warnings; use Ogre::OverlayContainer; our @ISA = qw(Ogre::OverlayContainer); 1; __END__ Ogre-0.60/Ogre/TextureUnitState.pm0000644000175000017500000000177312146460465017312 0ustar slanningslanningpackage Ogre::TextureUnitState; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::TextureUnitState::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'TextureEffectType' => [qw( ET_ENVIRONMENT_MAP ET_PROJECTIVE_TEXTURE ET_UVSCROLL ET_USCROLL ET_VSCROLL ET_ROTATE ET_TRANSFORM )], 'EnvMapType' => [qw( ENV_PLANAR ENV_CURVED ENV_REFLECTION ENV_NORMAL )], 'TextureTransformType' => [qw( TT_TRANSLATE_U TT_TRANSLATE_V TT_SCALE_U TT_SCALE_V TT_ROTATE )], 'TextureAddressingMode' => [qw( TAM_WRAP TAM_MIRROR TAM_CLAMP TAM_BORDER )], 'TextureCubeFace' => [qw( CUBE_FRONT CUBE_BACK CUBE_LEFT CUBE_RIGHT CUBE_UP CUBE_DOWN )], 'BindingType' => [qw( BT_FRAGMENT BT_VERTEX )], 'ContentType' => [qw( CONTENT_NAMED CONTENT_SHADOW )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/AxisAlignedBoxSceneQuery.pm0000644000175000017500000000022512146460465020645 0ustar slanningslanningpackage Ogre::AxisAlignedBoxSceneQuery; use strict; use warnings; use Ogre::RegionSceneQuery; our @ISA = qw(Ogre::RegionSceneQuery); 1; __END__ Ogre-0.60/Ogre/ParticleEmitter.pm0000644000175000017500000000017512146460465017101 0ustar slanningslanningpackage Ogre::ParticleEmitter; use strict; use warnings; use Ogre::Particle; our @ISA = qw(Ogre::Particle); 1; __END__ Ogre-0.60/Ogre/Particle.pm0000644000175000017500000000062712146460465015551 0ustar slanningslanningpackage Ogre::Particle; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::Particle::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'ParticleType' => [qw( Visual Emitter )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/RenderSystemCapabilities.pm0000644000175000017500000000012212146460465020732 0ustar slanningslanningpackage Ogre::RenderSystemCapabilities; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/IndexData.pm0000644000175000017500000000010312146460465015634 0ustar slanningslanningpackage Ogre::IndexData; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/RenderTarget/0000755000175000017500000000000012162410433016015 5ustar slanningslanningOgre-0.60/Ogre/RenderTarget/FrameStats.pm0000644000175000017500000000106712146456744020451 0ustar slanningslanningpackage Ogre::RenderTarget::FrameStats; use strict; use warnings; 1; __END__ =head1 NAME Ogre::RenderTarget::FrameStats =head1 SYNOPSIS use Ogre; use Ogre::RenderTarget::FrameStats; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/BorderPanelOverlayElement.pm0000644000175000017500000000023512146460465021052 0ustar slanningslanningpackage Ogre::BorderPanelOverlayElement; use strict; use warnings; use Ogre::PanelOverlayElement; our @ISA = qw(Ogre::PanelOverlayElement); 1; __END__ Ogre-0.60/Ogre/HardwareVertexBuffer.pm0000644000175000017500000000021512146460465020064 0ustar slanningslanningpackage Ogre::HardwareVertexBuffer; use strict; use warnings; use Ogre::HardwareBuffer; our @ISA = qw(Ogre::HardwareBuffer); 1; __END__ Ogre-0.60/Ogre/CompositionPass.pm0000644000175000017500000000070712146460465017137 0ustar slanningslanningpackage Ogre::CompositionPass; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::CompositionPass::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'PassType' => [qw( PT_CLEAR PT_STENCIL PT_RENDERSCENE PT_RENDERQUAD )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/Skeleton.pm0000644000175000017500000000016512146460465015567 0ustar slanningslanningpackage Ogre::Skeleton; use strict; use warnings; use Ogre::Resource; our @ISA = qw(Ogre::Resource); 1; __END__ Ogre-0.60/Ogre/Vector3.pm0000644000175000017500000001070012146460465015324 0ustar slanningslanningpackage Ogre::Vector3; use strict; use warnings; # xxx: this should be in XS, but I can't get it to work use overload '==' => \&vec3_eq_xs, '!=' => \&vec3_ne_xs, '<' => \&vec3_lt_xs, '>' => \&vec3_gt_xs, '+' => \&vec3_plus_xs, '-' => \&vec3_minus_xs, '*' => \&vec3_mult_xs, '/' => \&vec3_div_xs, '0+' => sub { $_[0] }, 'neg' => \&vec3_neg_xs, ; 1; __END__ =head1 NAME Ogre::Vector3 =head1 SYNOPSIS use Ogre; use Ogre::Vector3; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::Vector3->new(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item Vector3 * =back =head2 Ogre::Vector3->DESTROY() This method is called automatically; don't call it yourself. =head2 \&eq_xs This is an operator overload method; don't call it yourself. =head2 \&plus_xs This is an operator overload method; don't call it yourself. =head2 \&mult_xs This is an operator overload method; don't call it yourself. =head2 \&neg_xs This is an operator overload method; don't call it yourself. =head1 INSTANCE METHODS =head2 $obj->length() I =over =item Real =back =head2 $obj->squaredLength() I =over =item Real =back =head2 $obj->distance($rhs) I =over =item $rhs : Vector3 * =back I =over =item Real =back =head2 $obj->squaredDistance($rhs) I =over =item $rhs : Vector3 * =back I =over =item Real =back =head2 $obj->dotProduct($vec) I =over =item $vec : Vector3 * =back I =over =item Real =back =head2 $obj->absDotProduct($vec) I =over =item $vec : Vector3 * =back I =over =item Real =back =head2 $obj->normalise() I =over =item Real =back =head2 $obj->crossProduct($rkVector) I =over =item $rkVector : const Vector3 * =back I =over =item Vector3 * =back =head2 $obj->midPoint($rkVector) I =over =item $rkVector : const Vector3 * =back I =over =item Vector3 * =back =head2 $obj->makeFloor($cmp) I =over =item $cmp : Vector3 * =back I =over =item void =back =head2 $obj->makeCeil($cmp) I =over =item $cmp : Vector3 * =back I =over =item void =back =head2 $obj->perpendicular() I =over =item Vector3 * =back =head2 $obj->randomDeviant($angle, $up=&Vector3::ZERO) I =over =item $angle : Degree (or Radian) * =item $up=&Vector3::ZERO : const Vector3 * =back I =over =item Vector3 * =back =head2 $obj->getRotationTo($dest, $fallbackAxis=&Vector3::ZERO) I =over =item $dest : const Vector3 * =item $fallbackAxis=&Vector3::ZERO : const Vector3 * =back I =over =item Quaternion * =back =head2 $obj->isZeroLength() I =over =item bool =back =head2 $obj->normalisedCopy() I =over =item Vector3 * =back =head2 $obj->reflect($normal) I =over =item $normal : const Vector3 * =back I =over =item Vector3 * =back =head2 $obj->positionEquals($rhs, $tolerance=0.001) I =over =item $rhs : Vector3 * =item $tolerance=0.001 : Real =back I =over =item bool =back =head2 $obj->positionCloses($rhs, $tolerance=0.001) I =over =item $rhs : Vector3 * =item $tolerance=0.001 : Real =back I =over =item bool =back =head2 $obj->directionEquals($rhs, $tolerance) I =over =item $rhs : Vector3 * =item $tolerance : Degree (or Radian) * =back I =over =item bool =back =head2 $obj->x() I =over =item Real =back =head2 $obj->y() I =over =item Real =back =head2 $obj->z() I =over =item Real =back =head2 $obj->setX($x) I =over =item $x : Real =back I =over =item void =back =head2 $obj->setY($y) I =over =item $y : Real =back I =over =item void =back =head2 $obj->setZ($z) I =over =item $z : Real =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/ParticleAffector.pm0000644000175000017500000000021312146460465017212 0ustar slanningslanningpackage Ogre::ParticleAffector; use strict; use warnings; use Ogre::StringInterface; our @ISA = qw(Ogre::StringInterface); 1; __END__ Ogre-0.60/Ogre/TextureManager.pm0000644000175000017500000000262712146460465016743 0ustar slanningslanningpackage Ogre::TextureManager; use strict; use warnings; 1; __END__ =head1 NAME Ogre::TextureManager =head1 SYNOPSIS use Ogre; use Ogre::TextureManager; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::TextureManager->getSingletonPtr() I =over =item TextureManager * =back =head1 INSTANCE METHODS =head2 $obj->load($String name, $String group, $int texType=TEX_TYPE_2D, $int numMipmaps=MIP_DEFAULT, $Real gamma=1.0f, $bool isAlpha=false, $int desiredFormat=PF_UNKNOWN) I =over =item $String name : (no info available) =item $String group : (no info available) =item $int texType=TEX_TYPE_2D : (no info available) =item $int numMipmaps=MIP_DEFAULT : (no info available) =item $Real gamma=1.0f : (no info available) =item $bool isAlpha=false : (no info available) =item $int desiredFormat=PF_UNKNOWN : (no info available) =back I =over =item Texture * =back =head2 $obj->setDefaultNumMipmaps($size_t num) I =over =item $size_t num : (no info available) =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/PatchSurface.pm0000644000175000017500000000077312146460465016360 0ustar slanningslanningpackage Ogre::PatchSurface; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::PatchSurface::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'PatchSurfaceType' => [qw( PST_BEZIER )], '._100' => [qw( AUTO_LEVEL )], 'VisibleSide' => [qw( VS_FRONT VS_BACK VS_BOTH )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/PlaneBoundedVolumeListSceneQuery.pm0000644000175000017500000000023512146460465022371 0ustar slanningslanningpackage Ogre::PlaneBoundedVolumeListSceneQuery; use strict; use warnings; use Ogre::RegionSceneQuery; our @ISA = qw(Ogre::RegionSceneQuery); 1; __END__ Ogre-0.60/Ogre/KeyFrame.pm0000644000175000017500000000010212146460465015475 0ustar slanningslanningpackage Ogre::KeyFrame; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/TransformKeyFrame.pm0000644000175000017500000000017612146460465017404 0ustar slanningslanningpackage Ogre::TransformKeyFrame; use strict; use warnings; use Ogre::KeyFrame; our @ISA = qw(Ogre::KeyFrame); 1; __END__ Ogre-0.60/Ogre/Math.pm0000644000175000017500000000062112146460465014671 0ustar slanningslanningpackage Ogre::Math; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::Math::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'AngleUnit' => [qw( AU_DEGREE AU_RADIAN )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/NumericAnimationTrack.pm0000644000175000017500000000021612146460465020227 0ustar slanningslanningpackage Ogre::NumericAnimationTrack; use strict; use warnings; use Ogre::AnimationTrack; our @ISA = qw(Ogre::AnimationTrack); 1; __END__ Ogre-0.60/Ogre/RenderTarget.pm0000644000175000017500000001130312146460465016365 0ustar slanningslanningpackage Ogre::RenderTarget; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::RenderTarget::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'StatFlags' => [qw( SF_NONE SF_FPS SF_AVG_FPS SF_BEST_FPS SF_WORST_FPS SF_TRIANGLE_COUNT SF_ALL )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ =head1 NAME Ogre::RenderTarget =head1 SYNOPSIS use Ogre; use Ogre::RenderTarget; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->addViewport($cam, $ZOrder=0, $left=0, $top=0, $width=1, $height=1) I =over =item $cam : Camera * =item $ZOrder=0 : int =item $left=0 : Real =item $top=0 : Real =item $width=1 : Real =item $height=1 : Real =back I =over =item Viewport * =back =head2 $obj->getMetrics($OUTLIST unsigned int width, $OUTLIST unsigned int height, $OUTLIST unsigned int colourDepth) I =over =item $OUTLIST unsigned int width : (no info available) =item $OUTLIST unsigned int height : (no info available) =item $OUTLIST unsigned int colourDepth : (no info available) =back I =over =item void =back =head2 $obj->resetStatistics() I =over =item void =back =head2 $obj->getLastFPS() I =over =item Real =back =head2 $obj->getAverageFPS() I =over =item Real =back =head2 $obj->getBestFPS() I =over =item Real =back =head2 $obj->getWorstFPS() I =over =item Real =back =head2 $obj->getBestFrameTime() I =over =item Real =back =head2 $obj->getWorstFrameTime() I =over =item Real =back =head2 $obj->getTriangleCount() I =over =item size_t =back =head2 $obj->getBatchCount() I =over =item size_t =back =head2 $obj->update() I =over =item void =back =head2 $obj->isPrimary() I =over =item bool =back =head2 $obj->isActive() I =over =item bool =back =head2 $obj->setActive($state) I =over =item $state : bool =back I =over =item void =back =head2 $obj->isAutoUpdated() I =over =item bool =back =head2 $obj->setAutoUpdated($autoupdate) I =over =item $autoupdate : bool =back I =over =item void =back =head2 $obj->getName() I =over =item String =back =head2 $obj->getWidth() I =over =item unsigned int =back =head2 $obj->getHeight() I =over =item unsigned int =back =head2 $obj->getColourDepth() I =over =item unsigned int =back =head2 $obj->getNumViewports() I =over =item unsigned short =back =head2 $obj->getViewport($index) I =over =item $index : unsigned short =back I =over =item Viewport * =back =head2 $obj->removeViewport($zOrder) I =over =item $zOrder : int =back I =over =item void =back =head2 $obj->removeAllViewports() I =over =item void =back =head2 $obj->getPriority() I =over =item uchar =back =head2 $obj->setPriority($priority) I =over =item $priority : uchar =back I =over =item void =back =head2 $obj->writeContentsToFile($filename) I =over =item $filename : String =back I =over =item void =back =head2 $obj->writeContentsToTimestampedFile($filenamePrefix, $filenameSuffix) I =over =item $filenamePrefix : String =item $filenameSuffix : String =back I =over =item String =back =head2 $obj->requiresTextureFlipping() I =over =item bool =back =head2 $obj->getCustomAttributePtr($name) I =over =item $name : String =back I =over =item size_t =back =head2 $obj->getCustomAttributeInt($name) I =over =item $name : String =back I =over =item int =back =head2 $obj->getCustomAttributeFloat($name) I =over =item $name : String =back I =over =item Real =back =head2 $obj->getCustomAttributeStr($name) I =over =item $name : String =back I =over =item String =back =head2 $obj->getCustomAttributeBool($name) I =over =item $name : String =back I =over =item bool =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Exception.pm0000644000175000017500000000115012146460465015734 0ustar slanningslanningpackage Ogre::Exception; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::Exception::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'ExceptionCodes' => [qw( ERR_CANNOT_WRITE_TO_FILE ERR_INVALID_STATE ERR_INVALIDPARAMS ERR_RENDERINGAPI_ERROR ERR_DUPLICATE_ITEM ERR_ITEM_NOT_FOUND ERR_FILE_NOT_FOUND ERR_INTERNAL_ERROR ERR_RT_ASSERTION_FAILED ERR_NOT_IMPLEMENTED )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/Node.pm0000644000175000017500000001371512146460465014675 0ustar slanningslanningpackage Ogre::Node; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::Node::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'TransformSpace' => [qw( TS_LOCAL TS_PARENT TS_WORLD )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ =head1 NAME Ogre::Node =head1 SYNOPSIS use Ogre; use Ogre::Node; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::Node->queueNeedUpdate($Node *n) I =over =item $Node *n : (no info available) =back I =over =item void =back =head2 Ogre::Node->processQueuedUpdates() I =over =item void =back =head1 INSTANCE METHODS =head2 $obj->getName() I =over =item String =back =head2 $obj->getParent() I =over =item Node * =back =head2 $obj->getOrientation() I =over =item Quaternion * =back =head2 $obj->setOrientation(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->resetOrientation() I =over =item void =back =head2 $obj->setPosition(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->getPosition() I =over =item Vector3 * =back =head2 $obj->setScale(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->getScale() I =over =item Vector3 * =back =head2 $obj->setInheritOrientation($bool inherit) I =over =item $bool inherit : (no info available) =back I =over =item void =back =head2 $obj->getInheritOrientation() I =over =item bool =back =head2 $obj->setInheritScale($bool inherit) I =over =item $bool inherit : (no info available) =back I =over =item void =back =head2 $obj->getInheritScale() I =over =item bool =back =head2 $obj->scale(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->translate(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->roll($DegRad *angle, $int relativeTo=Node::TS_LOCAL) I =over =item $DegRad *angle : (no info available) =item $int relativeTo=Node::TS_LOCAL : (no info available) =back I =over =item void =back =head2 $obj->pitch($DegRad *angle, $int relativeTo=Node::TS_LOCAL) I =over =item $DegRad *angle : (no info available) =item $int relativeTo=Node::TS_LOCAL : (no info available) =back I =over =item void =back =head2 $obj->yaw($DegRad *angle, $int relativeTo=Node::TS_LOCAL) I =over =item $DegRad *angle : (no info available) =item $int relativeTo=Node::TS_LOCAL : (no info available) =back I =over =item void =back =head2 $obj->rotate(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->getLocalAxes() I =over =item Matrix3 * =back =head2 $obj->createChild(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item Node * =back =head2 $obj->addChild($child) I =over =item $child : Node * =back I =over =item void =back =head2 $obj->numChildren() I =over =item unsigned short =back =head2 $obj->getChild(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item Node * =back =head2 $obj->removeChild(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item Node * =back =head2 $obj->removeAllChildren() I =over =item void =back =head2 $obj->getMaterial() I =over =item Material * =back =head2 $obj->getRenderOperation($OUTLIST RenderOperation *op) I =over =item $OUTLIST RenderOperation *op : (no info available) =back I =over =item void =back =head2 $obj->getWorldOrientation() I =over =item Quaternion * =back =head2 $obj->getWorldPosition() I =over =item Vector3 * =back =head2 $obj->setInitialState() I =over =item void =back =head2 $obj->resetToInitialState() I =over =item void =back =head2 $obj->getInitialPosition() I =over =item Vector3 * =back =head2 $obj->getInitialOrientation() I =over =item Quaternion * =back =head2 $obj->getInitialScale() I =over =item Vector3 * =back =head2 $obj->getSquaredViewDepth($const Camera *cam) I =over =item $const Camera *cam : (no info available) =back I =over =item Real =back =head2 $obj->needUpdate($bool forceParentUpdate=false) I =over =item $bool forceParentUpdate=false : (no info available) =back I =over =item void =back =head2 $obj->requestUpdate($Node *child, $bool forceParentUpdate=false) I =over =item $Node *child : (no info available) =item $bool forceParentUpdate=false : (no info available) =back I =over =item void =back =head2 $obj->cancelUpdate($Node *child) I =over =item $Node *child : (no info available) =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Serializer.pm0000644000175000017500000000065712146460465016122 0ustar slanningslanningpackage Ogre::Serializer; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::Serializer::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'Endian' => [qw( ENDIAN_NATIVE ENDIAN_BIG ENDIAN_LITTLE )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/Radian.pm0000644000175000017500000000255712146460465015210 0ustar slanningslanningpackage Ogre::Radian; use strict; use warnings; # xxx: this should be in XS, but I can't get it to work use overload '==' => \&rad_eq_xs, '!=' => \&rad_ne_xs, '<' => \&rad_lt_xs, '>' => \&rad_gt_xs, '<=' => \&rad_le_xs, '>=' => \&rad_ge_xs, '+' => \&rad_plus_xs, '-' => \&rad_minus_xs, '*' => \&rad_mult_xs, 'neg' => \&rad_neg_xs, ; 1; __END__ =head1 NAME Ogre::Radian =head1 SYNOPSIS use Ogre; use Ogre::Radian; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::Radian->new(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item Radian * =back =head2 Ogre::Radian->DESTROY() This method is called automatically; don't call it yourself. =head2 \&eq_xs This is an operator overload method; don't call it yourself. =head1 INSTANCE METHODS =head2 $obj->valueDegrees() I =over =item Real =back =head2 $obj->valueRadians() I =over =item Real =back =head2 $obj->valueAngleUnits() I =over =item Real =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/ManualObject.pm0000644000175000017500000000174112146460465016350 0ustar slanningslanningpackage Ogre::ManualObject; use strict; use warnings; use Ogre::RenderTarget; our @ISA = qw(Ogre::MovableObject); 1; __END__ =head1 NAME Ogre::ManualObject =head1 SYNOPSIS use Ogre; use Ogre::ManualObject; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->clear() I =over =item void =back =head2 $obj->setDynamic($dyn) I =over =item $dyn : bool =back I =over =item void =back =head2 $obj->getDynamic() I =over =item bool =back =head2 $obj->beginUpdate($sectionIndex) I =over =item $sectionIndex : size_t =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/StaticGeometry.pm0000644000175000017500000000466612146460465016760 0ustar slanningslanningpackage Ogre::StaticGeometry; use strict; use warnings; 1; __END__ =head1 NAME Ogre::StaticGeometry =head1 SYNOPSIS use Ogre; use Ogre::StaticGeometry; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->getName() I =over =item String =back =head2 $obj->addEntity($ent, $position, $orientation, $scale) I =over =item $ent : Entity * =item $position : Vector3 * =item $orientation : Quaternion * =item $scale : Vector3 * =back I =over =item void =back =head2 $obj->addSceneNode($node) I =over =item $node : SceneNode * =back I =over =item void =back =head2 $obj->build() I =over =item void =back =head2 $obj->destroy() I =over =item void =back =head2 $obj->reset() I =over =item void =back =head2 $obj->setRenderingDistance($dist) I =over =item $dist : Real =back I =over =item void =back =head2 $obj->getRenderingDistance() I =over =item Real =back =head2 $obj->getSquaredRenderingDistance() I =over =item Real =back =head2 $obj->setVisible($visible) I =over =item $visible : bool =back I =over =item void =back =head2 $obj->isVisible() I =over =item bool =back =head2 $obj->setCastShadows($castShadows) I =over =item $castShadows : bool =back I =over =item void =back =head2 $obj->getCastShadows() I =over =item bool =back =head2 $obj->setRegionDimensions($size) I =over =item $size : Vector3 * =back I =over =item void =back =head2 $obj->setOrigin($origin) I =over =item $origin : Vector3 * =back I =over =item void =back =head2 $obj->setRenderQueueGroup($queueID) I =over =item $queueID : uint8 =back I =over =item void =back =head2 $obj->getRenderQueueGroup() I =over =item uint8 =back =head2 $obj->dump($filename) I =over =item $filename : String =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Billboard.pm0000644000175000017500000000010212146460465015664 0ustar slanningslanningpackage Ogre::Billboard; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/HardwarePixelBuffer.pm0000644000175000017500000000021512146460465017670 0ustar slanningslanningpackage Ogre::HardwarePixelBuffer; use strict; use warnings; use Ogre::HardwareBuffer; our @ISA = qw(Ogre::HardwareBuffer); 1; __END__ Ogre-0.60/Ogre/BillboardSet.pm0000644000175000017500000001432012146460465016347 0ustar slanningslanningpackage Ogre::BillboardSet; use strict; use warnings; use Ogre::MovableObject; use Ogre::Renderable; our @ISA = qw(Ogre::MovableObject Ogre::Renderable); 1; __END__ =head1 NAME Ogre::BillboardSet =head1 SYNOPSIS use Ogre; use Ogre::BillboardSet; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::BillboardSet->new($name, $poolSize=20, $externalDataSource=false) I =over =item $name : String =item $poolSize=20 : unsigned int =item $externalDataSource=false : bool =back I =over =item BillboardSet * =back =head2 Ogre::BillboardSet->DESTROY() This method is called automatically; don't call it yourself. =head1 INSTANCE METHODS =head2 $obj->createBillboard($x, $y, $z, $colour=&ColourValue::White) I =over =item $x : Real =item $y : Real =item $z : Real =item $colour=&ColourValue::White : const ColourValue * =back I =over =item Billboard * =back =head2 $obj->getNumBillboards() I =over =item int =back =head2 $obj->setAutoextend($bool autoextend) I =over =item $bool autoextend : (no info available) =back I =over =item void =back =head2 $obj->getAutoextend() I =over =item bool =back =head2 $obj->setSortingEnabled($bool sortenable) I =over =item $bool sortenable : (no info available) =back I =over =item void =back =head2 $obj->getSortingEnabled() I =over =item bool =back =head2 $obj->setPoolSize($size_t size) I =over =item $size_t size : (no info available) =back I =over =item void =back =head2 $obj->getPoolSize() I =over =item unsigned int =back =head2 $obj->clear() I =over =item void =back =head2 $obj->getBillboard($unsigned int index) I =over =item $unsigned int index : (no info available) =back I =over =item Billboard * =back =head2 $obj->removeBillboard($unsigned int index) I =over =item $unsigned int index : (no info available) =back I =over =item void =back =head2 $obj->setBillboardOrigin($int origin) I =over =item $int origin : (no info available) =back I =over =item void =back =head2 $obj->getBillboardOrigin() I =over =item int =back =head2 $obj->setBillboardRotationType($int rotationType) I =over =item $int rotationType : (no info available) =back I =over =item void =back =head2 $obj->getBillboardRotationType() I =over =item int =back =head2 $obj->setDefaultDimensions($Real width, $Real height) I =over =item $Real width : (no info available) =item $Real height : (no info available) =back I =over =item void =back =head2 $obj->setDefaultWidth($Real width) I =over =item $Real width : (no info available) =back I =over =item void =back =head2 $obj->getDefaultWidth() I =over =item Real =back =head2 $obj->setDefaultHeight($Real height) I =over =item $Real height : (no info available) =back I =over =item void =back =head2 $obj->getDefaultHeight() I =over =item Real =back =head2 $obj->setMaterialName($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->getMaterialName() I =over =item String =back =head2 $obj->beginBillboards($size_t numBillboards=0) I =over =item $size_t numBillboards=0 : (no info available) =back I =over =item void =back =head2 $obj->injectBillboard($bb) I =over =item $bb : const Billboard * =back I =over =item void =back =head2 $obj->endBillboards() I =over =item void =back =head2 $obj->setBounds($box, $radius) I =over =item $box : const AxisAlignedBox * =item $radius : Real =back I =over =item void =back =head2 $obj->getBoundingRadius() I =over =item Real =back =head2 $obj->getCullIndividually() I =over =item bool =back =head2 $obj->setCullIndividually($bool cullIndividual) I =over =item $bool cullIndividual : (no info available) =back I =over =item void =back =head2 $obj->setBillboardType($int bbt) I =over =item $int bbt : (no info available) =back I =over =item void =back =head2 $obj->getBillboardType() I =over =item int =back =head2 $obj->setCommonDirection($vec) I =over =item $vec : const Vector3 * =back I =over =item void =back =head2 $obj->setCommonUpVector($vec) I =over =item $vec : const Vector3 * =back I =over =item void =back =head2 $obj->setUseAccurateFacing($bool acc) I =over =item $bool acc : (no info available) =back I =over =item void =back =head2 $obj->getUseAccurateFacing() I =over =item bool =back =head2 $obj->getMovableType() I =over =item String =back =head2 $obj->getSquaredViewDepth($cam) I =over =item $cam : const Camera * =back I =over =item Real =back =head2 $obj->setBillboardsInWorldSpace($bool ws) I =over =item $bool ws : (no info available) =back I =over =item void =back =head2 $obj->setTextureStacksAndSlices($uchar stacks, $uchar slices) I =over =item $uchar stacks : (no info available) =item $uchar slices : (no info available) =back I =over =item void =back =head2 $obj->setPointRenderingEnabled($bool enabled) I =over =item $bool enabled : (no info available) =back I =over =item void =back =head2 $obj->isPointRenderingEnabled() I =over =item bool =back =head2 $obj->getTypeFlags() I =over =item uint32 =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Timer.pm0000644000175000017500000000025312146460465015061 0ustar slanningslanningpackage Ogre::Timer; use strict; use warnings; 1; __END__ =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/SphereSceneQuery.pm0000644000175000017500000000021512146460465017231 0ustar slanningslanningpackage Ogre::SphereSceneQuery; use strict; use warnings; use Ogre::RegionSceneQuery; our @ISA = qw(Ogre::RegionSceneQuery); 1; __END__ Ogre-0.60/Ogre/Frustum.pm0000644000175000017500000000223112146460465015444 0ustar slanningslanningpackage Ogre::Frustum; use strict; use warnings; use Ogre::MovableObject; use Ogre::Renderable; our @ISA = qw(Ogre::MovableObject Ogre::Renderable); 1; __END__ =head1 NAME Ogre::Frustum =head1 SYNOPSIS use Ogre; use Ogre::Frustum; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->setNearClipDistance($Real nearDist) I =over =item $Real nearDist : (no info available) =back I =over =item void =back =head2 $obj->setFarClipDistance($Real farDist) I =over =item $Real farDist : (no info available) =back I =over =item void =back =head2 $obj->setAspectRatio($Real ratio) I =over =item $Real ratio : (no info available) =back I =over =item void =back =head2 $obj->getAspectRatio() I =over =item Real =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/QueuedRenderableCollection.pm0000644000175000017500000000074512146460465021237 0ustar slanningslanningpackage Ogre::QueuedRenderableCollection; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::QueuedRenderableCollection::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'OrganisationMode' => [qw( OM_PASS_GROUP OM_SORT_DESCENDING OM_SORT_ASCENDING )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/AnimationState.pm0000644000175000017500000000414412146460465016724 0ustar slanningslanningpackage Ogre::AnimationState; use strict; use warnings; 1; __END__ =head1 NAME Ogre::AnimationState =head1 SYNOPSIS use Ogre; use Ogre::AnimationState; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->getAnimationName() I =over =item String =back =head2 $obj->getTimePosition() I =over =item Real =back =head2 $obj->setTimePosition($Real timePos) I =over =item $Real timePos : (no info available) =back I =over =item void =back =head2 $obj->getLength() I =over =item Real =back =head2 $obj->setLength($Real len) I =over =item $Real len : (no info available) =back I =over =item void =back =head2 $obj->getWeight() I =over =item Real =back =head2 $obj->setWeight($Real weight) I =over =item $Real weight : (no info available) =back I =over =item void =back =head2 $obj->addTime($Real offset) I =over =item $Real offset : (no info available) =back I =over =item void =back =head2 $obj->hasEnded() I =over =item bool =back =head2 $obj->getEnabled() I =over =item bool =back =head2 $obj->setEnabled($bool enabled) I =over =item $bool enabled : (no info available) =back I =over =item void =back =head2 $obj->getLoop() I =over =item bool =back =head2 $obj->setLoop($bool loop) I =over =item $bool loop : (no info available) =back I =over =item void =back =head2 $obj->copyStateFrom($animState) I =over =item $animState : AnimationState * =back I =over =item void =back =head2 $obj->getParent() I =over =item AnimationStateSet * =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/VertexData.pm0000644000175000017500000000010412146460465016043 0ustar slanningslanningpackage Ogre::VertexData; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/SkeletonManager.pm0000644000175000017500000000021212146460465017053 0ustar slanningslanningpackage Ogre::SkeletonManager; use strict; use warnings; use Ogre::ResourceManager; our @ISA = qw(Ogre::ResourceManager); 1; __END__ Ogre-0.60/Ogre/CompositionTargetPass.pm0000644000175000017500000000066312146460465020307 0ustar slanningslanningpackage Ogre::CompositionTargetPass; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::CompositionTargetPass::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'InputMode' => [qw( IM_NONE IM_PREVIOUS )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/Degree.pm0000644000175000017500000000255612146460465015204 0ustar slanningslanningpackage Ogre::Degree; use strict; use warnings; # xxx: this should be in XS, but I can't get it to work use overload '==' => \°_eq_xs, '!=' => \°_ne_xs, '<' => \°_lt_xs, '>' => \°_gt_xs, '<=' => \°_le_xs, '>=' => \°_ge_xs, '+' => \°_plus_xs, '-' => \°_minus_xs, '*' => \°_mult_xs, 'neg' => \°_neg_xs, ; 1; __END__ =head1 NAME Ogre::Degree =head1 SYNOPSIS use Ogre; use Ogre::Degree; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::Degree->new(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item Degree * =back =head2 Ogre::Degree->DESTROY() This method is called automatically; don't call it yourself. =head2 \&eq_xs This is an operator overload method; don't call it yourself. =head1 INSTANCE METHODS =head2 $obj->valueDegrees() I =over =item Real =back =head2 $obj->valueRadians() I =over =item Real =back =head2 $obj->valueAngleUnits() I =over =item Real =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/TimeIndex.pm0000644000175000017500000000010212146460465015660 0ustar slanningslanningpackage Ogre::TimeIndex; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/GpuProgram.pm0000644000175000017500000000016712146460465016070 0ustar slanningslanningpackage Ogre::GpuProgram; use strict; use warnings; use Ogre::Resource; our @ISA = qw(Ogre::Resource); 1; __END__ Ogre-0.60/Ogre/Texture.pm0000644000175000017500000000016412146460465015442 0ustar slanningslanningpackage Ogre::Texture; use strict; use warnings; use Ogre::Resource; our @ISA = qw(Ogre::Resource); 1; __END__ Ogre-0.60/Ogre/RenderOperation.pm0000644000175000017500000000077312146460465017110 0ustar slanningslanningpackage Ogre::RenderOperation; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::RenderOperation::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'OperationType' => [qw( OT_POINT_LIST OT_LINE_LIST OT_LINE_STRIP OT_TRIANGLE_LIST OT_TRIANGLE_STRIP OT_TRIANGLE_FAN )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/EdgeData.pm0000644000175000017500000000010212146460465015430 0ustar slanningslanningpackage Ogre::EdgeData; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/FrameEvent.pm0000644000175000017500000000125012146460465016033 0ustar slanningslanningpackage Ogre::FrameEvent; use strict; use warnings; 1; __END__ =head1 NAME Ogre::FrameEvent =head1 SYNOPSIS use Ogre; use Ogre::FrameEvent; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->timeSinceLastEvent() I =over =item Real =back =head2 $obj->timeSinceLastFrame() I =over =item Real =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/ControllerManager.pm0000644000175000017500000000011212146460465017411 0ustar slanningslanningpackage Ogre::ControllerManager; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/ManualObject/0000755000175000017500000000000012162410433015773 5ustar slanningslanningOgre-0.60/Ogre/ManualObject/ManualObjectSection.pm0000644000175000017500000000022212146460465022232 0ustar slanningslanningpackage Ogre::ManualObject::ManualObjectSection; use strict; use warnings; use Ogre::Renderable; our @ISA = qw(Ogre::Renderable); 1; __END__ Ogre-0.60/Ogre/Matrix3.pm0000644000175000017500000000141512146460465015331 0ustar slanningslanningpackage Ogre::Matrix3; use strict; use warnings; 1; __END__ =head1 NAME Ogre::Matrix3 =head1 SYNOPSIS use Ogre; use Ogre::Matrix3; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::Matrix3->new(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item Matrix3 * =back =head2 Ogre::Matrix3->DESTROY() This method is called automatically; don't call it yourself. =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/ParticleSystemRenderer.pm0000644000175000017500000000022112146460465020433 0ustar slanningslanningpackage Ogre::ParticleSystemRenderer; use strict; use warnings; use Ogre::StringInterface; our @ISA = qw(Ogre::StringInterface); 1; __END__ Ogre-0.60/Ogre/Pass.pm0000644000175000017500000000066112146460465014712 0ustar slanningslanningpackage Ogre::Pass; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::Pass::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'BuiltinHashFunction' => [qw( MIN_TEXTURE_CHANGE MIN_GPU_PROGRAM_CHANGE )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/Quaternion.pm0000644000175000017500000001023312146460465016125 0ustar slanningslanningpackage Ogre::Quaternion; use strict; use warnings; # xxx: this should be in XS, but I can't get it to work use overload '==' => \&quat_eq_xs, '!=' => \&quat_ne_xs, '+' => \&quat_plus_xs, '-' => \&quat_minus_xs, '*' => \&quat_mult_xs, '0+' => sub { $_[0] }, 'neg' => \&quat_neg_xs, ; 1; __END__ =head1 NAME Ogre::Quaternion =head1 SYNOPSIS use Ogre; use Ogre::Quaternion; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::Quaternion->new(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item Quaternion * =back =head2 Ogre::Quaternion->DESTROY() This method is called automatically; don't call it yourself. =head2 \&eq_xs This is an operator overload method; don't call it yourself. =head2 \&plus_xs This is an operator overload method; don't call it yourself. =head2 \&mult_xs This is an operator overload method; don't call it yourself. =head2 \&neg_xs This is an operator overload method; don't call it yourself. =head1 INSTANCE METHODS =head2 $obj->FromRotationMatrix($kRot) I =over =item $kRot : Matrix3 * =back I =over =item void =back =head2 $obj->ToRotationMatrix($kRot) I =over =item $kRot : Matrix3 * =back I =over =item void =back =head2 $obj->FromAngleAxis($rfAngle, $rkAxis) I =over =item $rfAngle : Degree (or Radian) * =item $rkAxis : Vector3 * =back I =over =item void =back =head2 $obj->ToAngleAxis($rfAngle, $rkAxis) I =over =item $rfAngle : Degree (or Radian) * =item $rkAxis : Vector3 * =back I =over =item void =back =head2 $obj->FromAxes($xAxis, $yAxis, $zAxis) I =over =item $xAxis : Vector3 * =item $yAxis : Vector3 * =item $zAxis : Vector3 * =back I =over =item void =back =head2 $obj->ToAxes($xAxis, $yAxis, $zAxis) I =over =item $xAxis : Vector3 * =item $yAxis : Vector3 * =item $zAxis : Vector3 * =back I =over =item void =back =head2 $obj->xAxis() I =over =item Vector3 * =back =head2 $obj->yAxis() I =over =item Vector3 * =back =head2 $obj->zAxis() I =over =item Vector3 * =back =head2 $obj->Dot($rkQ) I =over =item $rkQ : Quaternion * =back I =over =item Real =back =head2 $obj->Norm() I =over =item Real =back =head2 $obj->normalise() I =over =item Real =back =head2 $obj->getRoll($bool reprojectAxis=true) I =over =item $bool reprojectAxis=true : (no info available) =back I =over =item Radian * =back =head2 $obj->getPitch($bool reprojectAxis=true) I =over =item $bool reprojectAxis=true : (no info available) =back I =over =item Radian * =back =head2 $obj->getYaw($bool reprojectAxis=true) I =over =item $bool reprojectAxis=true : (no info available) =back I =over =item Radian * =back =head2 $obj->equals($rhs, $tolerance) I =over =item $rhs : Quaternion * =item $tolerance : Degree (or Radian) * =back I =over =item bool =back =head2 $obj->w() I =over =item Real =back =head2 $obj->x() I =over =item Real =back =head2 $obj->y() I =over =item Real =back =head2 $obj->z() I =over =item Real =back =head2 $obj->setW($w) I =over =item $w : Real =back I =over =item void =back =head2 $obj->setX($x) I =over =item $x : Real =back I =over =item void =back =head2 $obj->setY($y) I =over =item $y : Real =back I =over =item void =back =head2 $obj->setZ($z) I =over =item $z : Real =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Bone.pm0000644000175000017500000000015112146460465014661 0ustar slanningslanningpackage Ogre::Bone; use strict; use warnings; use Ogre::Node; our @ISA = qw(Ogre::Node); 1; __END__ Ogre-0.60/Ogre/PlaneBoundedVolume.pm0000644000175000017500000000011312146460465017524 0ustar slanningslanningpackage Ogre::PlaneBoundedVolume; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/VertexElement.pm0000644000175000017500000000010612146460465016565 0ustar slanningslanningpackage Ogre::VertexElement; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/InstancedGeometry.pm0000644000175000017500000000103112146460465017420 0ustar slanningslanningpackage Ogre::InstancedGeometry; use strict; use warnings; 1; __END__ =head1 NAME Ogre::InstancedGeometry =head1 SYNOPSIS use Ogre; use Ogre::InstancedGeometry; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/AxisAlignedBox.pm0000644000175000017500000000103212146460465016636 0ustar slanningslanningpackage Ogre::AxisAlignedBox; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::AxisAlignedBox::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'CornerEnum' => [qw( FAR_LEFT_BOTTOM FAR_LEFT_TOP FAR_RIGHT_TOP FAR_RIGHT_BOTTOM NEAR_RIGHT_BOTTOM NEAR_LEFT_BOTTOM NEAR_LEFT_TOP NEAR_RIGHT_TOP )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/Mesh.pm0000644000175000017500000000016112146460465014673 0ustar slanningslanningpackage Ogre::Mesh; use strict; use warnings; use Ogre::Resource; our @ISA = qw(Ogre::Resource); 1; __END__ Ogre-0.60/Ogre/MovablePlane.pm0000644000175000017500000000100512146460465016342 0ustar slanningslanningpackage Ogre::MovablePlane; use strict; use warnings; 1; __END__ =head1 NAME Ogre::MovablePlane =head1 SYNOPSIS use Ogre; use Ogre::MovablePlane; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/ScriptLoader.pm0000644000175000017500000000010512146460465016370 0ustar slanningslanningpackage Ogre::ScriptLoader; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/SceneQuery/0000755000175000017500000000000012162410433015512 5ustar slanningslanningOgre-0.60/Ogre/SceneQuery/WorldFragment.pm0000644000175000017500000000012212146460465020632 0ustar slanningslanningpackage Ogre::SceneQuery::WorldFragment; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/OverlayContainer.pm0000644000175000017500000000263712146460465017275 0ustar slanningslanningpackage Ogre::OverlayContainer; use strict; use warnings; use Ogre::OverlayElement; our @ISA = qw(Ogre::OverlayElement); 1; __END__ =head1 NAME Ogre::OverlayContainer =head1 SYNOPSIS use Ogre; use Ogre::OverlayContainer; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->isContainer() I =over =item bool =back =head2 $obj->addChild($elem) I =over =item $elem : OverlayElement * =back I =over =item void =back =head2 $obj->addChildImpl($cont) I =over =item $cont : OverlayContainer * =back I =over =item void =back =head2 $obj->removeChild($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->getChild($name) I =over =item $name : String =back I =over =item OverlayElement * =back =head2 $obj->isChildrenProcessEvents() I =over =item bool =back =head2 $obj->setChildrenProcessEvents($val) I =over =item $val : bool =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Renderable.pm0000644000175000017500000000203612146460465016045 0ustar slanningslanningpackage Ogre::Renderable; use strict; use warnings; 1; __END__ =head1 NAME Ogre::Renderable =head1 SYNOPSIS use Ogre; use Ogre::Renderable; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->getSquaredViewDepth($cam) I =over =item $cam : Camera * =back I =over =item Real =back =head2 $obj->getNumWorldTransforms() I =over =item unsigned short =back =head2 $obj->getCastsShadows() I =over =item bool =back =head2 $obj->getPolygonModeOverrideable() I =over =item bool =back =head2 $obj->setPolygonModeOverrideable($override) I =over =item $override : bool =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Sphere.pm0000644000175000017500000000007712146460465015233 0ustar slanningslanningpackage Ogre::Sphere; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/RenderSystem.pm0000644000175000017500000000010612146460465016422 0ustar slanningslanningpackage Ogre::RenderSystem; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/ManualResourceLoader.pm0000644000175000017500000000011512146460465020052 0ustar slanningslanningpackage Ogre::ManualResourceLoader; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/ParticleSystem.pm0000644000175000017500000002027112146460465016753 0ustar slanningslanningpackage Ogre::ParticleSystem; use strict; use warnings; use Ogre::StringInterface; use Ogre::MovableObject; our @ISA = qw(Ogre::StringInterface Ogre::MovableObject); 1; __END__ =head1 NAME Ogre::ParticleSystem =head1 SYNOPSIS use Ogre; use Ogre::ParticleSystem; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::ParticleSystem->setDefaultIterationInterval($Real iterationInterval) I =over =item $Real iterationInterval : (no info available) =back I =over =item void =back =head2 Ogre::ParticleSystem->getDefaultIterationInterval() I =over =item Real =back =head2 Ogre::ParticleSystem->setDefaultNonVisibleUpdateTimeout($Real timeout) I =over =item $Real timeout : (no info available) =back I =over =item void =back =head2 Ogre::ParticleSystem->getDefaultNonVisibleUpdateTimeout() I =over =item Real =back =head2 Ogre::ParticleSystem->cleanupDictionary() I =over =item void =back =head2 Ogre::ParticleSystem->setDefaultQueryFlags($uint32 flags) I =over =item $uint32 flags : (no info available) =back I =over =item void =back =head2 Ogre::ParticleSystem->getDefaultQueryFlags() I =over =item uint32 =back =head2 Ogre::ParticleSystem->setDefaultVisibilityFlags($uint32 flags) I =over =item $uint32 flags : (no info available) =back I =over =item void =back =head2 Ogre::ParticleSystem->getDefaultVisibilityFlags() I =over =item uint32 =back =head2 Ogre::ParticleSystem->extrudeVertices($vertexBuffer, $originalVertexCount, $lightPos, $extrudeDist) I =over =item $vertexBuffer : HardwareVertexBuffer * =item $originalVertexCount : size_t =item $lightPos : const Vector4 * =item $extrudeDist : Real =back I =over =item void =back =head1 INSTANCE METHODS =head2 $obj->setRenderer($typeName) I =over =item $typeName : String =back I =over =item void =back =head2 $obj->getRenderer() I =over =item ParticleSystemRenderer * =back =head2 $obj->getRendererName() I =over =item String =back =head2 $obj->addEmitter($emitterType) I =over =item $emitterType : String =back I =over =item ParticleEmitter * =back =head2 $obj->getEmitter($unsigned short index) I =over =item $unsigned short index : (no info available) =back I =over =item ParticleEmitter * =back =head2 $obj->getNumEmitters() I =over =item unsigned short =back =head2 $obj->removeEmitter($unsigned short index) I =over =item $unsigned short index : (no info available) =back I =over =item void =back =head2 $obj->removeAllEmitters() I =over =item void =back =head2 $obj->addAffector($affectorType) I =over =item $affectorType : String =back I =over =item ParticleAffector * =back =head2 $obj->getAffector($unsigned short index) I =over =item $unsigned short index : (no info available) =back I =over =item ParticleAffector * =back =head2 $obj->getNumAffectors() I =over =item unsigned short =back =head2 $obj->removeAffector($unsigned short index) I =over =item $unsigned short index : (no info available) =back I =over =item void =back =head2 $obj->removeAllAffectors() I =over =item void =back =head2 $obj->clear() I =over =item void =back =head2 $obj->getNumParticles() I =over =item size_t =back =head2 $obj->createParticle() I =over =item Particle * =back =head2 $obj->createEmitterParticle($emitterName) I =over =item $emitterName : String =back I =over =item Particle * =back =head2 $obj->getParticle($size_t index) I =over =item $size_t index : (no info available) =back I =over =item Particle * =back =head2 $obj->getParticleQuota() I =over =item size_t =back =head2 $obj->setParticleQuota($size_t quota) I =over =item $size_t quota : (no info available) =back I =over =item void =back =head2 $obj->getEmittedEmitterQuota() I =over =item size_t =back =head2 $obj->setEmittedEmitterQuota($size_t quota) I =over =item $size_t quota : (no info available) =back I =over =item void =back =head2 $obj->setMaterialName($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->getMaterialName() I =over =item String =back =head2 $obj->getBoundingRadius() I =over =item Real =back =head2 $obj->fastForward($Real time, $Real interval=0.1) I =over =item $Real time : (no info available) =item $Real interval=0.1 : (no info available) =back I =over =item void =back =head2 $obj->setSpeedFactor($Real speedFactor) I =over =item $Real speedFactor : (no info available) =back I =over =item void =back =head2 $obj->getSpeedFactor() I =over =item Real =back =head2 $obj->setIterationInterval($Real iterationInterval) I =over =item $Real iterationInterval : (no info available) =back I =over =item void =back =head2 $obj->getIterationInterval() I =over =item Real =back =head2 $obj->setNonVisibleUpdateTimeout($Real timeout) I =over =item $Real timeout : (no info available) =back I =over =item void =back =head2 $obj->getNonVisibleUpdateTimeout() I =over =item Real =back =head2 $obj->getMovableType() I =over =item String =back =head2 $obj->setDefaultDimensions($Real width, $Real height) I =over =item $Real width : (no info available) =item $Real height : (no info available) =back I =over =item void =back =head2 $obj->setDefaultWidth($Real width) I =over =item $Real width : (no info available) =back I =over =item void =back =head2 $obj->getDefaultWidth() I =over =item Real =back =head2 $obj->setDefaultHeight($Real height) I =over =item $Real height : (no info available) =back I =over =item void =back =head2 $obj->getDefaultHeight() I =over =item Real =back =head2 $obj->getCullIndividually() I =over =item bool =back =head2 $obj->setCullIndividually($bool cullIndividual) I =over =item $bool cullIndividual : (no info available) =back I =over =item void =back =head2 $obj->getResourceGroupName() I =over =item String =back =head2 $obj->getOrigin() I =over =item String =back =head2 $obj->setRenderQueueGroup($uint8 queueID) I =over =item $uint8 queueID : (no info available) =back I =over =item void =back =head2 $obj->setSortingEnabled($bool enabled) I =over =item $bool enabled : (no info available) =back I =over =item void =back =head2 $obj->getSortingEnabled() I =over =item bool =back =head2 $obj->setBounds($aabb) I =over =item $aabb : const AxisAlignedBox * =back I =over =item void =back =head2 $obj->setBoundsAutoUpdated($bool autoUpdate, $Real stopIn=0.0f) I =over =item $bool autoUpdate : (no info available) =item $Real stopIn=0.0f : (no info available) =back I =over =item void =back =head2 $obj->setKeepParticlesInLocalSpace($bool keepLocal) I =over =item $bool keepLocal : (no info available) =back I =over =item void =back =head2 $obj->getKeepParticlesInLocalSpace() I =over =item bool =back =head2 $obj->getTypeFlags() I =over =item uint32 =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Camera.pm0000644000175000017500000001076412146460465015201 0ustar slanningslanningpackage Ogre::Camera; use strict; use warnings; use Ogre::Frustum; our @ISA = qw(Ogre::Frustum); 1; __END__ =head1 NAME Ogre::Camera =head1 SYNOPSIS use Ogre; use Ogre::Camera; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->getSceneManager() I =over =item SceneManager * =back =head2 $obj->getName() I =over =item String =back =head2 $obj->setPolygonMode($sd) I =over =item $sd : int =back I =over =item void =back =head2 $obj->getPolygonMode() I =over =item int =back =head2 $obj->setPosition(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->getPosition() I =over =item Vector3 * =back =head2 $obj->move($vec) I =over =item $vec : Vector3 * =back I =over =item void =back =head2 $obj->moveRelative($vec) I =over =item $vec : Vector3 * =back I =over =item void =back =head2 $obj->setDirection(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->lookAt(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->roll($angle) I =over =item $angle : Degree (or Radian) * =back I =over =item void =back =head2 $obj->yaw($angle) I =over =item $angle : Degree (or Radian) * =back I =over =item void =back =head2 $obj->pitch($angle) I =over =item $angle : Degree (or Radian) * =back I =over =item void =back =head2 $obj->rotate($q) I =over =item $q : Quaternion * =back I =over =item void =back =head2 $obj->setFixedYawAxis($useFixed, $fixedAxis) I =over =item $useFixed : bool =item $fixedAxis : Vector3 * =back I =over =item void =back =head2 $obj->setOrientation($q) I =over =item $q : Quaternion * =back I =over =item void =back =head2 $obj->getMovableType() I =over =item String =back =head2 $obj->setAutoTracking($enabled, $target=0, $offset=&Vector3::ZERO) I =over =item $enabled : bool =item $target=0 : SceneNode * =item $offset=&Vector3::ZERO : const Vector3 * =back I =over =item void =back =head2 $obj->setLodBias($Real factor=1.0) I =over =item $Real factor=1.0 : (no info available) =back I =over =item void =back =head2 $obj->getLodBias() I =over =item Real =back =head2 $obj->setWindow($Real Left, $Real Top, $Real Right, $Real Bottom) I =over =item $Real Left : (no info available) =item $Real Top : (no info available) =item $Real Right : (no info available) =item $Real Bottom : (no info available) =back I =over =item void =back =head2 $obj->resetWindow() I =over =item void =back =head2 $obj->isWindowSet() I =over =item bool =back =head2 $obj->getBoundingRadius() I =over =item Real =back =head2 $obj->getAutoTrackTarget() I =over =item SceneNode * =back =head2 $obj->getViewport() I =over =item Viewport * =back =head2 $obj->setAutoAspectRatio($bool autoratio) I =over =item $bool autoratio : (no info available) =back I =over =item void =back =head2 $obj->getAutoAspectRatio() I =over =item bool =back =head2 $obj->setCullingFrustum($frustum) I =over =item $frustum : Frustum * =back I =over =item void =back =head2 $obj->getCullingFrustum() I =over =item Frustum * =back =head2 $obj->getNearClipDistance() I =over =item Real =back =head2 $obj->getFarClipDistance() I =over =item Real =back =head2 $obj->setUseRenderingDistance($bool use) I =over =item $bool use : (no info available) =back I =over =item void =back =head2 $obj->getUseRenderingDistance() I =over =item bool =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/HardwareBuffer.pm0000644000175000017500000000116712146460465016675 0ustar slanningslanningpackage Ogre::HardwareBuffer; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::HardwareBuffer::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'Usage' => [qw( HBU_STATIC HBU_DYNAMIC HBU_WRITE_ONLY HBU_DISCARDABLE HBU_STATIC_WRITE_ONLY HBU_DYNAMIC_WRITE_ONLY HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE )], 'LockOptions' => [qw( HBL_NORMAL HBL_DISCARD HBL_READ_ONLY HBL_NO_OVERWRITE )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/PatchMesh.pm0000644000175000017500000000015612146460465015657 0ustar slanningslanningpackage Ogre::PatchMesh; use strict; use warnings; use Ogre::Mesh; our @ISA = qw(Ogre::Mesh); 1; __END__ Ogre-0.60/Ogre/ShadowCaster.pm0000644000175000017500000000010512146460465016364 0ustar slanningslanningpackage Ogre::ShadowCaster; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/TextAreaOverlayElement.pm0000644000175000017500000000021712146460465020372 0ustar slanningslanningpackage Ogre::TextAreaOverlayElement; use strict; use warnings; use Ogre::OverlayElement; our @ISA = qw(Ogre::OverlayElement); 1; __END__ Ogre-0.60/Ogre/ResourceGroupManager.pm0000644000175000017500000000312412146460465020100 0ustar slanningslanningpackage Ogre::ResourceGroupManager; use strict; use warnings; # XXX: these aren't from enums, so not generated by genconsts.pl..... # (for now at least) require Exporter; @Ogre::ResourceGroupManager::ISA = qw(Exporter); our %EXPORT_TAGS = ( 'GroupName' => [ qw( DEFAULT_RESOURCE_GROUP_NAME INTERNAL_RESOURCE_GROUP_NAME AUTODETECT_RESOURCE_GROUP_NAME RESOURCE_SYSTEM_NUM_REFERENCE_COUNTS ) ], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); 1; __END__ =head1 NAME Ogre::ResourceGroupManager =head1 SYNOPSIS use Ogre; use Ogre::ResourceGroupManager; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::ResourceGroupManager->getSingletonPtr() I =over =item ResourceGroupManager * =back =head1 INSTANCE METHODS =head2 $obj->addResourceLocation($name, $locType, $resGroup) I =over =item $name : String =item $locType : String =item $resGroup : String =back I =over =item void =back =head2 $obj->initialiseAllResourceGroups() I =over =item void =back =head2 $obj->DEFAULT_RESOURCE_GROUP_NAME() I =over =item String =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/MovableObject.pm0000644000175000017500000000706412146460465016524 0ustar slanningslanningpackage Ogre::MovableObject; use strict; use warnings; use Ogre::ShadowCaster; use Ogre::AnimableObject; our @ISA = qw(Ogre::ShadowCaster Ogre::AnimableObject); 1; __END__ =head1 NAME Ogre::MovableObject =head1 SYNOPSIS use Ogre; use Ogre::MovableObject; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->getName() I =over =item String =back =head2 $obj->getMovableType() I =over =item String =back =head2 $obj->getParentNode() I =over =item Node * =back =head2 $obj->getParentSceneNode() I =over =item SceneNode * =back =head2 $obj->isAttached() I =over =item bool =back =head2 $obj->isInScene() I =over =item bool =back =head2 $obj->getBoundingRadius() I =over =item Real =back =head2 $obj->setVisible($bool visible) I =over =item $bool visible : (no info available) =back I =over =item void =back =head2 $obj->getVisible() I =over =item bool =back =head2 $obj->isVisible() I =over =item bool =back =head2 $obj->setRenderingDistance($Real dist) I =over =item $Real dist : (no info available) =back I =over =item void =back =head2 $obj->getRenderingDistance() I =over =item Real =back =head2 $obj->setRenderQueueGroup($uint8 queueID) I =over =item $uint8 queueID : (no info available) =back I =over =item void =back =head2 $obj->getRenderQueueGroup() I =over =item uint8 =back =head2 $obj->setQueryFlags($uint32 flags) I =over =item $uint32 flags : (no info available) =back I =over =item void =back =head2 $obj->addQueryFlags($uint32 flags) I =over =item $uint32 flags : (no info available) =back I =over =item void =back =head2 $obj->removeQueryFlags($unsigned long flags) I =over =item $unsigned long flags : (no info available) =back I =over =item void =back =head2 $obj->getQueryFlags() I =over =item uint32 =back =head2 $obj->setVisibilityFlags($uint32 flags) I =over =item $uint32 flags : (no info available) =back I =over =item void =back =head2 $obj->addVisibilityFlags($uint32 flags) I =over =item $uint32 flags : (no info available) =back I =over =item void =back =head2 $obj->removeVisibilityFlags($uint32 flags) I =over =item $uint32 flags : (no info available) =back I =over =item void =back =head2 $obj->getVisibilityFlags() I =over =item uint32 =back =head2 $obj->getEdgeList() I =over =item EdgeData * =back =head2 $obj->hasEdgeList() I =over =item bool =back =head2 $obj->setCastShadows($bool enabled) I =over =item $bool enabled : (no info available) =back I =over =item void =back =head2 $obj->getCastShadows() I =over =item bool =back =head2 $obj->getPointExtrusionDistance($const Light *l) I =over =item $const Light *l : (no info available) =back I =over =item Real =back =head2 $obj->getTypeFlags() I =over =item uint32 =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/MeshPtr.pm0000644000175000017500000000076112146460465015367 0ustar slanningslanningpackage Ogre::MeshPtr; use strict; use warnings; 1; __END__ =head1 NAME Ogre::MeshPtr =head1 SYNOPSIS use Ogre; use Ogre::MeshPtr; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/RenderQueue.pm0000644000175000017500000000010412146456744016225 0ustar slanningslanningpackage Ogre::RenderQueue; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/MaterialManager.pm0000644000175000017500000000272012146460465017033 0ustar slanningslanningpackage Ogre::MaterialManager; use strict; use warnings; use Ogre::ResourceManager; our @ISA = qw(Ogre::ResourceManager); 1; __END__ =head1 NAME Ogre::MaterialManager =head1 SYNOPSIS use Ogre; use Ogre::MaterialManager; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::MaterialManager->getSingletonPtr() I =over =item MaterialManager * =back =head1 INSTANCE METHODS =head2 $obj->load($String name, $String group, $bool isManual=false, $ManualResourceLoader *loader=0) I =over =item $String name : (no info available) =item $String group : (no info available) =item $bool isManual=false : (no info available) =item $ManualResourceLoader *loader=0 : (no info available) =back I =over =item Material * =back =head2 $obj->setDefaultTextureFiltering($fo) I =over =item $fo : int =back I =over =item void =back =head2 $obj->setDefaultAnisotropy($maxAniso) I =over =item $maxAniso : unsigned int =back I =over =item void =back =head2 $obj->getDefaultAnisotropy() I =over =item unsigned int =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Animation.pm0000644000175000017500000001310712146460465015722 0ustar slanningslanningpackage Ogre::Animation; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::Animation::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'InterpolationMode' => [qw( IM_LINEAR IM_SPLINE )], 'RotationInterpolationMode' => [qw( RIM_LINEAR RIM_SPHERICAL )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ =head1 NAME Ogre::Animation =head1 SYNOPSIS use Ogre; use Ogre::Animation; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::Animation->setDefaultInterpolationMode($int im) I =over =item $int im : (no info available) =back I =over =item void =back =head2 Ogre::Animation->getDefaultInterpolationMode() I =over =item int =back =head2 Ogre::Animation->setDefaultRotationInterpolationMode($int im) I =over =item $int im : (no info available) =back I =over =item void =back =head2 Ogre::Animation->getDefaultRotationInterpolationMode() I =over =item int =back =head1 INSTANCE METHODS =head2 $obj->getName() I =over =item String =back =head2 $obj->getLength() I =over =item Real =back =head2 $obj->createNodeTrack($handle, ...) I =over =item $handle : unsigned short =item ... : this varies... (sorry, look in the .xs file) =back I =over =item NodeAnimationTrack * =back =head2 $obj->createNumericTrack($handle, ...) I =over =item $handle : unsigned short =item ... : this varies... (sorry, look in the .xs file) =back I =over =item NumericAnimationTrack * =back =head2 $obj->createVertexTrack($handle, ...) I =over =item $handle : unsigned short =item ... : this varies... (sorry, look in the .xs file) =back I =over =item VertexAnimationTrack * =back =head2 $obj->getNumNodeTracks() I =over =item unsigned short =back =head2 $obj->getNodeTrack($unsigned short handle) I =over =item $unsigned short handle : (no info available) =back I =over =item NodeAnimationTrack * =back =head2 $obj->hasNodeTrack($unsigned short handle) I =over =item $unsigned short handle : (no info available) =back I =over =item bool =back =head2 $obj->getNumNumericTracks() I =over =item unsigned short =back =head2 $obj->getNumericTrack($unsigned short handle) I =over =item $unsigned short handle : (no info available) =back I =over =item NumericAnimationTrack * =back =head2 $obj->hasNumericTrack($unsigned short handle) I =over =item $unsigned short handle : (no info available) =back I =over =item bool =back =head2 $obj->getNumVertexTracks() I =over =item unsigned short =back =head2 $obj->getVertexTrack($unsigned short handle) I =over =item $unsigned short handle : (no info available) =back I =over =item VertexAnimationTrack * =back =head2 $obj->hasVertexTrack($unsigned short handle) I =over =item $unsigned short handle : (no info available) =back I =over =item bool =back =head2 $obj->destroyNodeTrack($unsigned short handle) I =over =item $unsigned short handle : (no info available) =back I =over =item void =back =head2 $obj->destroyNumericTrack($unsigned short handle) I =over =item $unsigned short handle : (no info available) =back I =over =item void =back =head2 $obj->destroyVertexTrack($unsigned short handle) I =over =item $unsigned short handle : (no info available) =back I =over =item void =back =head2 $obj->destroyAllTracks() I =over =item void =back =head2 $obj->destroyAllNodeTracks() I =over =item void =back =head2 $obj->destroyAllNumericTracks() I =over =item void =back =head2 $obj->destroyAllVertexTracks() I =over =item void =back =head2 $obj->apply(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->setInterpolationMode($int im) I =over =item $int im : (no info available) =back I =over =item void =back =head2 $obj->getInterpolationMode() I =over =item int =back =head2 $obj->setRotationInterpolationMode($int im) I =over =item $int im : (no info available) =back I =over =item void =back =head2 $obj->getRotationInterpolationMode() I =over =item int =back =head2 $obj->getNodeTrackAref() I =over =item AV * =back =head2 $obj->getNumericTrackAref() I =over =item AV * =back =head2 $obj->getVertexTrackAref() I =over =item AV * =back =head2 $obj->optimise($bool discardIdentityNodeTracks=true) I =over =item $bool discardIdentityNodeTracks=true : (no info available) =back I =over =item void =back =head2 $obj->clone($newName) I =over =item $newName : String =back I =over =item Animation * =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/BillboardChain.pm0000644000175000017500000000172112146460465016637 0ustar slanningslanningpackage Ogre::BillboardChain; use strict; use warnings; use Ogre::MovableObject; use Ogre::Renderable; our @ISA = qw(Ogre::MovableObject Ogre::Renderable); ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::BillboardChain::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'TexCoordDirection' => [qw( TCD_U TCD_V )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ =head1 NAME Ogre::BillboardChain =head1 SYNOPSIS use Ogre; use Ogre::BillboardChain; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/MultiRenderTarget.pm0000644000175000017500000000020612146460465017400 0ustar slanningslanningpackage Ogre::MultiRenderTarget; use strict; use warnings; use Ogre::RenderTarget; our @ISA = qw(Ogre::RenderTarget); 1; __END__ Ogre-0.60/Ogre/RaySceneQuery.pm0000644000175000017500000000030012146460465016531 0ustar slanningslanningpackage Ogre::RaySceneQuery; use strict; use warnings; use Ogre::SceneQuery; # use Ogre::RaySceneQueryListener; our @ISA = qw(Ogre::SceneQuery); # Ogre::RaySceneQueryListener 1; __END__ Ogre-0.60/Ogre/NodeAnimationTrack.pm0000644000175000017500000000021312146460465017507 0ustar slanningslanningpackage Ogre::NodeAnimationTrack; use strict; use warnings; use Ogre::AnimationTrack; our @ISA = qw(Ogre::AnimationTrack); 1; __END__ Ogre-0.60/Ogre/WaveformControllerFunction.pm0000644000175000017500000000034412146460465021342 0ustar slanningslanningpackage Ogre::WaveformControllerFunction; use strict; use warnings; # N.B. although this inherits from Ogre::ControllerFunction, # that doesn't happen here, # and you must not do that in your code, either. 1; __END__ Ogre-0.60/Ogre/RenderWindow.pm0000644000175000017500000000430412146460465016411 0ustar slanningslanningpackage Ogre::RenderWindow; use strict; use warnings; use Ogre::RenderTarget; our @ISA = qw(Ogre::RenderTarget); 1; __END__ =head1 NAME Ogre::RenderWindow =head1 SYNOPSIS use Ogre; use Ogre::RenderWindow; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->setFullscreen($fullScreen, $width, $height) I =over =item $fullScreen : bool =item $width : unsigned int =item $height : unsigned int =back I =over =item void =back =head2 $obj->destroy() I =over =item void =back =head2 $obj->resize($width, $height) I =over =item $width : unsigned int =item $height : unsigned int =back I =over =item void =back =head2 $obj->windowMovedOrResized() I =over =item void =back =head2 $obj->reposition($left, $top) I =over =item $left : int =item $top : int =back I =over =item void =back =head2 $obj->isVisible() I =over =item bool =back =head2 $obj->setVisible($visible) I =over =item $visible : bool =back I =over =item void =back =head2 $obj->isClosed() I =over =item bool =back =head2 $obj->swapBuffers($waitForVSync=true) I =over =item $waitForVSync=true : bool =back I =over =item void =back =head2 $obj->isFullScreen() I =over =item bool =back =head2 $obj->getMetrics($OUTLIST unsigned int width, $OUTLIST unsigned int height, $OUTLIST unsigned int colourDepth, $OUTLIST int left, $OUTLIST int top) I =over =item $OUTLIST unsigned int width : (no info available) =item $OUTLIST unsigned int height : (no info available) =item $OUTLIST unsigned int colourDepth : (no info available) =item $OUTLIST int left : (no info available) =item $OUTLIST int top : (no info available) =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/AnimableObject.pm0000644000175000017500000000101512146456744016642 0ustar slanningslanningpackage Ogre::AnimableObject; use strict; use warnings; 1; __END__ =head1 NAME Ogre::AnimableObject =head1 SYNOPSIS use Ogre; use Ogre::AnimableObject; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/SkeletonInstance.pm0000644000175000017500000000017512146460465017255 0ustar slanningslanningpackage Ogre::SkeletonInstance; use strict; use warnings; use Ogre::Skeleton; our @ISA = qw(Ogre::Skeleton); 1; __END__ Ogre-0.60/Ogre/Pose.pm0000644000175000017500000000007612146460465014712 0ustar slanningslanningpackage Ogre::Pose; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/SimpleRenderable.pm0000644000175000017500000000102512146460465017214 0ustar slanningslanningpackage Ogre::SimpleRenderable; use strict; use warnings; 1; __END__ =head1 NAME Ogre::SimpleRenderable =head1 SYNOPSIS use Ogre; use Ogre::SimpleRenderable; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Material.pm0000644000175000017500000000016512146460465015541 0ustar slanningslanningpackage Ogre::Material; use strict; use warnings; use Ogre::Resource; our @ISA = qw(Ogre::Resource); 1; __END__ Ogre-0.60/Ogre/RibbonTrail.pm0000644000175000017500000000113012146460465016203 0ustar slanningslanningpackage Ogre::RibbonTrail; use strict; use warnings; use Ogre::RenderTarget; our @ISA = qw(Ogre::BillboardChain); # Ogre::Node::Listener 1; __END__ =head1 NAME Ogre::RibbonTrail =head1 SYNOPSIS use Ogre; use Ogre::RibbonTrail; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Log.pm0000644000175000017500000000007412146460465014523 0ustar slanningslanningpackage Ogre::Log; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/VertexBufferBinding.pm0000644000175000017500000000011412146460465017677 0ustar slanningslanningpackage Ogre::VertexBufferBinding; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/MeshManager.pm0000644000175000017500000000353112146460465016172 0ustar slanningslanningpackage Ogre::MeshManager; use strict; use warnings; use Ogre::ResourceManager; use Ogre::ManualResourceLoader; our @ISA = qw(Ogre::ResourceManager Ogre::ManualResourceLoader); 1; __END__ =head1 NAME Ogre::MeshManager =head1 SYNOPSIS use Ogre; use Ogre::MeshManager; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::MeshManager->getSingletonPtr() I =over =item MeshManager * =back =head1 INSTANCE METHODS =head2 $obj->() I =over =item Mesh * =back =head2 $obj->createManual($name, $groupName, $loader=0) I =over =item $name : String =item $groupName : String =item $loader=0 : ManualResourceLoader * =back I =over =item Mesh * =back =head2 $obj->() I =over =item Mesh * =back =head2 $obj->() I =over =item Mesh * =back =head2 $obj->() I =over =item Mesh * =back =head2 $obj->setPrepareAllMeshesForShadowVolumes($bool enable) I =over =item $bool enable : (no info available) =back I =over =item void =back =head2 $obj->getPrepareAllMeshesForShadowVolumes() I =over =item bool =back =head2 $obj->getBoundsPaddingFactor() I =over =item Real =back =head2 $obj->setBoundsPaddingFactor($Real paddingFactor) I =over =item $Real paddingFactor : (no info available) =back I =over =item void =back =head2 $obj->loadResource($res) I =over =item $res : Resource * =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/DataStream.pm0000644000175000017500000000010312146460465016020 0ustar slanningslanningpackage Ogre::DataStream; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/SceneNode.pm0000644000175000017500000000524212146460465015647 0ustar slanningslanningpackage Ogre::SceneNode; use strict; use warnings; use Ogre::Node; our @ISA = qw(Ogre::Node); 1; __END__ =head1 NAME Ogre::SceneNode =head1 SYNOPSIS use Ogre; use Ogre::SceneNode; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->createChildSceneNode(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item SceneNode * =back =head2 $obj->attachObject($obj) I =over =item $obj : MovableObject * =back I =over =item void =back =head2 $obj->detachObject($obj) I =over =item $obj : MovableObject * =back I =over =item void =back =head2 $obj->getParentSceneNode() I =over =item SceneNode * =back =head2 $obj->numAttachedObjects() I =over =item unsigned short =back =head2 $obj->detachAllObjects() I =over =item void =back =head2 $obj->removeAndDestroyAllChildren() I =over =item void =back =head2 $obj->isInSceneGraph() I =over =item bool =back =head2 $obj->getCreator() I =over =item SceneManager * =back =head2 $obj->showBoundingBox($bShow) I =over =item $bShow : bool =back I =over =item void =back =head2 $obj->getShowBoundingBox() I =over =item bool =back =head2 $obj->setFixedYawAxis($useFixed, $fixedAxis) I =over =item $useFixed : bool =item $fixedAxis : Vector3 * =back I =over =item void =back =head2 $obj->setDirection($x, $y, $z, $relativeTo, $localDirectionVector) I =over =item $x : Real =item $y : Real =item $z : Real =item $relativeTo : int =item $localDirectionVector : Vector3 * =back I =over =item void =back =head2 $obj->lookAt($targetPoint, $relativeTo, $localDirectionVector) I =over =item $targetPoint : Vector3 * =item $relativeTo : int =item $localDirectionVector : Vector3 * =back I =over =item void =back =head2 $obj->setAutoTracking($enabled, $target, $localDirectionVector, $offset) I =over =item $enabled : bool =item $target : SceneNode * =item $localDirectionVector : Vector3 * =item $offset : Vector3 * =back I =over =item void =back =head2 $obj->getAutoTrackTarget() I =over =item SceneNode * =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/WorldFragment.pm0000644000175000017500000000221112146460465016550 0ustar slanningslanningpackage Ogre::SceneQuery::WorldFragment; use strict; use warnings; 1; __END__ =head1 NAME Ogre::SceneQuery::WorldFragment =head1 SYNOPSIS use Ogre; use Ogre::SceneQuery::WorldFragment; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->fragmentType($THIS) I =over =item $THIS : WorldFragment * =back I =over =item int =back =head2 $obj->singleIntersection($THIS) I =over =item $THIS : WorldFragment * =back I =over =item Vector3 * =back =head2 $obj->planes($THIS) I =over =item $THIS : WorldFragment *THIS =back I =over =item SV * =back =head2 $obj->renderOp($THIS) I =over =item $THIS : WorldFragment * =back I =over =item RenderOperation * =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/InstancedGeometry/0000755000175000017500000000000012162410433017053 5ustar slanningslanningOgre-0.60/Ogre/InstancedGeometry/InstancedObject.pm0000644000175000017500000000073412146460465022470 0ustar slanningslanningpackage Ogre::InstancedGeometry::InstancedObject; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::InstancedGeometry::InstancedObject::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'TransformSpace' => [qw( TS_LOCAL TS_PARENT TS_WORLD )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/LogManager.pm0000644000175000017500000000141212146460465016013 0ustar slanningslanningpackage Ogre::LogManager; use strict; use warnings; 1; __END__ =head1 NAME Ogre::LogManager =head1 SYNOPSIS use Ogre; use Ogre::LogManager; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::LogManager->getSingletonPtr() I =over =item LogManager * =back =head1 INSTANCE METHODS =head2 $obj->logMessage($message) I =over =item $message : String =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/VertexAnimationTrack.pm0000644000175000017500000000076612146460465020114 0ustar slanningslanningpackage Ogre::VertexAnimationTrack; use strict; use warnings; use Ogre::AnimationTrack; our @ISA = qw(Ogre::AnimationTrack); ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::VertexAnimationTrack::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'TargetMode' => [qw( TM_SOFTWARE TM_HARDWARE )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/Matrix4.pm0000644000175000017500000000010012146460465015320 0ustar slanningslanningpackage Ogre::Matrix4; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/ManualObjectSection.pm0000644000175000017500000000104112146460465017666 0ustar slanningslanningpackage Ogre::ManualObjectSection; use strict; use warnings; 1; __END__ =head1 NAME Ogre::ManualObjectSection =head1 SYNOPSIS use Ogre; use Ogre::ManualObjectSection; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Overlay.pm0000644000175000017500000000560412146460465015427 0ustar slanningslanningpackage Ogre::Overlay; use strict; use warnings; 1; __END__ =head1 NAME Ogre::Overlay =head1 SYNOPSIS use Ogre; use Ogre::Overlay; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->getChild($name) I =over =item $name : String =back I =over =item OverlayContainer * =back =head2 $obj->getName() I =over =item String =back =head2 $obj->setZOrder($zorder) I =over =item $zorder : unsigned short =back I =over =item void =back =head2 $obj->getZOrder() I =over =item unsigned short =back =head2 $obj->isVisible() I =over =item bool =back =head2 $obj->isInitialised() I =over =item bool =back =head2 $obj->show() I =over =item void =back =head2 $obj->hide() I =over =item void =back =head2 $obj->add2D($cont) I =over =item $cont : OverlayContainer * =back I =over =item void =back =head2 $obj->remove2D($cont) I =over =item $cont : OverlayContainer * =back I =over =item void =back =head2 $obj->add3D($node) I =over =item $node : SceneNode * =back I =over =item void =back =head2 $obj->remove3D($node) I =over =item $node : SceneNode * =back I =over =item void =back =head2 $obj->clear() I =over =item void =back =head2 $obj->setScroll($x, $y) I =over =item $x : Real =item $y : Real =back I =over =item void =back =head2 $obj->getScrollX() I =over =item Real =back =head2 $obj->getScrollY() I =over =item Real =back =head2 $obj->scroll($xoff, $yoff) I =over =item $xoff : Real =item $yoff : Real =back I =over =item void =back =head2 $obj->setRotate($angle) I =over =item $angle : Degree (or Radian) * =back I =over =item void =back =head2 $obj->rotate($angle) I =over =item $angle : Degree (or Radian) * =back I =over =item void =back =head2 $obj->setScale($x, $y) I =over =item $x : Real =item $y : Real =back I =over =item void =back =head2 $obj->getScaleX() I =over =item Real =back =head2 $obj->getScaleY() I =over =item Real =back =head2 $obj->findElementAt($x, $y) I =over =item $x : Real =item $y : Real =back I =over =item OverlayElement * =back =head2 $obj->getOrigin() I =over =item String =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/ConfigFile.pm0000644000175000017500000000173212146460465016011 0ustar slanningslanningpackage Ogre::ConfigFile; use strict; use warnings; 1; __END__ =head1 NAME Ogre::ConfigFile =head1 SYNOPSIS use Ogre; use Ogre::ConfigFile; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::ConfigFile->new() I =over =item ConfigFile * =back =head2 Ogre::ConfigFile->DESTROY() This method is called automatically; don't call it yourself. =head1 INSTANCE METHODS =head2 $obj->load($filename) I =over =item $filename : String =back I =over =item void =back =head2 $obj->clear() I =over =item void =back =head2 $obj->getSections() I =over =item SV * =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/OverlayElement.pm0000644000175000017500000000757012146460465016745 0ustar slanningslanningpackage Ogre::OverlayElement; use strict; use warnings; use Ogre::StringInterface; our @ISA = qw(Ogre::StringInterface); # Ogre::Renderable 1; __END__ =head1 NAME Ogre::OverlayElement =head1 SYNOPSIS use Ogre; use Ogre::OverlayElement; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->initialise() I =over =item void =back =head2 $obj->show() I =over =item void =back =head2 $obj->hide() I =over =item void =back =head2 $obj->getName() I =over =item String =back =head2 $obj->isVisible() I =over =item bool =back =head2 $obj->isEnabled() I =over =item bool =back =head2 $obj->setEnabled($b) I =over =item $b : bool =back I =over =item void =back =head2 $obj->setDimensions($width, $height) I =over =item $width : Real =item $height : Real =back I =over =item void =back =head2 $obj->setPosition($left, $top) I =over =item $left : Real =item $top : Real =back I =over =item void =back =head2 $obj->setWidth($width) I =over =item $width : Real =back I =over =item void =back =head2 $obj->setHeight($height) I =over =item $height : Real =back I =over =item void =back =head2 $obj->setLeft($left) I =over =item $left : Real =back I =over =item void =back =head2 $obj->setTop($top) I =over =item $top : Real =back I =over =item void =back =head2 $obj->getWidth() I =over =item Real =back =head2 $obj->getHeight() I =over =item Real =back =head2 $obj->getLeft() I =over =item Real =back =head2 $obj->getTop() I =over =item Real =back =head2 $obj->getMaterialName() I =over =item String =back =head2 $obj->setMaterialName($matName) I =over =item $matName : String =back I =over =item void =back =head2 $obj->getTypeName() I =over =item String =back =head2 $obj->getCaption() I =over =item String =back =head2 $obj->setCaption($text) I =over =item $text : String =back I =over =item void =back =head2 $obj->setColour($col) I =over =item $col : ColourValue * =back I =over =item void =back =head2 $obj->contains($x, $y) I =over =item $x : Real =item $y : Real =back I =over =item bool =back =head2 $obj->findElementAt($x, $y) I =over =item $x : Real =item $y : Real =back I =over =item OverlayElement * =back =head2 $obj->isContainer() I =over =item bool =back =head2 $obj->isKeyEnabled() I =over =item bool =back =head2 $obj->isCloneable() I =over =item bool =back =head2 $obj->getParent() I =over =item OverlayContainer * =back =head2 $obj->getZOrder() I =over =item unsigned short =back =head2 $obj->getSquaredViewDepth($cam) I =over =item $cam : Camera * =back I =over =item Real =back =head2 $obj->copyFromTemplate($templateOverlay) I =over =item $templateOverlay : OverlayElement * =back I =over =item void =back =head2 $obj->clone($instanceName) I =over =item $instanceName : String =back I =over =item OverlayElement * =back =head2 $obj->getSourceTemplate() I =over =item const OverlayElement * =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/GpuProgramParameters.pm0000644000175000017500000000656012146460465020117 0ustar slanningslanningpackage Ogre::GpuProgramParameters; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::GpuProgramParameters::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'AutoConstantType' => [qw( ACT_WORLD_MATRIX ACT_INVERSE_WORLD_MATRIX ACT_TRANSPOSE_WORLD_MATRIX ACT_INVERSE_TRANSPOSE_WORLD_MATRIX ACT_WORLD_MATRIX_ARRAY_3x4 ACT_WORLD_MATRIX_ARRAY ACT_VIEW_MATRIX ACT_INVERSE_VIEW_MATRIX ACT_TRANSPOSE_VIEW_MATRIX ACT_INVERSE_TRANSPOSE_VIEW_MATRIX ACT_PROJECTION_MATRIX ACT_INVERSE_PROJECTION_MATRIX ACT_TRANSPOSE_PROJECTION_MATRIX ACT_INVERSE_TRANSPOSE_PROJECTION_MATRIX ACT_VIEWPROJ_MATRIX ACT_INVERSE_VIEWPROJ_MATRIX ACT_TRANSPOSE_VIEWPROJ_MATRIX ACT_INVERSE_TRANSPOSE_VIEWPROJ_MATRIX ACT_WORLDVIEW_MATRIX ACT_INVERSE_WORLDVIEW_MATRIX ACT_TRANSPOSE_WORLDVIEW_MATRIX ACT_INVERSE_TRANSPOSE_WORLDVIEW_MATRIX ACT_WORLDVIEWPROJ_MATRIX ACT_INVERSE_WORLDVIEWPROJ_MATRIX ACT_TRANSPOSE_WORLDVIEWPROJ_MATRIX ACT_INVERSE_TRANSPOSE_WORLDVIEWPROJ_MATRIX ACT_RENDER_TARGET_FLIPPING ACT_FOG_COLOUR ACT_FOG_PARAMS ACT_SURFACE_AMBIENT_COLOUR ACT_SURFACE_DIFFUSE_COLOUR ACT_SURFACE_SPECULAR_COLOUR ACT_SURFACE_EMISSIVE_COLOUR ACT_SURFACE_SHININESS ACT_AMBIENT_LIGHT_COLOUR ACT_LIGHT_DIFFUSE_COLOUR ACT_LIGHT_SPECULAR_COLOUR ACT_LIGHT_ATTENUATION ACT_SPOTLIGHT_PARAMS ACT_LIGHT_POSITION ACT_LIGHT_POSITION_OBJECT_SPACE ACT_LIGHT_POSITION_VIEW_SPACE ACT_LIGHT_DIRECTION ACT_LIGHT_DIRECTION_OBJECT_SPACE ACT_LIGHT_DIRECTION_VIEW_SPACE ACT_LIGHT_DISTANCE_OBJECT_SPACE ACT_LIGHT_POWER_SCALE ACT_LIGHT_DIFFUSE_COLOUR_ARRAY ACT_LIGHT_SPECULAR_COLOUR_ARRAY ACT_LIGHT_ATTENUATION_ARRAY ACT_LIGHT_POSITION_ARRAY ACT_LIGHT_POSITION_OBJECT_SPACE_ARRAY ACT_LIGHT_POSITION_VIEW_SPACE_ARRAY ACT_LIGHT_DIRECTION_ARRAY ACT_LIGHT_DIRECTION_OBJECT_SPACE_ARRAY ACT_LIGHT_DIRECTION_VIEW_SPACE_ARRAY ACT_LIGHT_DISTANCE_OBJECT_SPACE_ARRAY ACT_LIGHT_POWER_SCALE_ARRAY ACT_SPOTLIGHT_PARAMS_ARRAY ACT_DERIVED_AMBIENT_LIGHT_COLOUR ACT_DERIVED_SCENE_COLOUR ACT_DERIVED_LIGHT_DIFFUSE_COLOUR ACT_DERIVED_LIGHT_SPECULAR_COLOUR ACT_DERIVED_LIGHT_DIFFUSE_COLOUR_ARRAY ACT_DERIVED_LIGHT_SPECULAR_COLOUR_ARRAY ACT_SHADOW_EXTRUSION_DISTANCE ACT_CAMERA_POSITION ACT_CAMERA_POSITION_OBJECT_SPACE ACT_TEXTURE_VIEWPROJ_MATRIX ACT_CUSTOM ACT_TIME ACT_TIME_0_X ACT_COSTIME_0_X ACT_SINTIME_0_X ACT_TANTIME_0_X ACT_TIME_0_X_PACKED ACT_TIME_0_1 ACT_COSTIME_0_1 ACT_SINTIME_0_1 ACT_TANTIME_0_1 ACT_TIME_0_1_PACKED ACT_TIME_0_2PI ACT_COSTIME_0_2PI ACT_SINTIME_0_2PI ACT_TANTIME_0_2PI ACT_TIME_0_2PI_PACKED ACT_FRAME_TIME ACT_FPS ACT_VIEWPORT_WIDTH ACT_VIEWPORT_HEIGHT ACT_INVERSE_VIEWPORT_WIDTH ACT_INVERSE_VIEWPORT_HEIGHT ACT_VIEWPORT_SIZE ACT_VIEW_DIRECTION ACT_VIEW_SIDE_VECTOR ACT_VIEW_UP_VECTOR ACT_FOV ACT_NEAR_CLIP_DISTANCE ACT_FAR_CLIP_DISTANCE ACT_PASS_NUMBER ACT_PASS_ITERATION_NUMBER ACT_ANIMATION_PARAMETRIC ACT_TEXEL_OFFSETS ACT_SCENE_DEPTH_RANGE ACT_SHADOW_SCENE_DEPTH_RANGE ACT_TEXTURE_SIZE ACT_INVERSE_TEXTURE_SIZE ACT_PACKED_TEXTURE_SIZE )], 'ACDataType' => [qw( ACDT_NONE ACDT_INT ACDT_REAL )], 'ElementType' => [qw( ET_INT ET_REAL )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/Vector4.pm0000644000175000017500000000010112146460465015317 0ustar slanningslanningpackage Ogre::Vector4; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/ExampleFrameListener.pm0000644000175000017500000003212612146460465020061 0ustar slanningslanningpackage Ogre::ExampleFrameListener; # implements FrameListener, WindowEventListener use strict; use warnings; use Ogre 0.38 qw(:TextureFilterOptions :PolygonMode); use Ogre::Degree; use Ogre::OverlayManager; use Ogre::LogManager; use Ogre::MaterialManager; use Ogre::Vector3; use Ogre::WindowEventUtilities; # keep CPAN indexer from barfing on OIS below our $VERSION = 0.38; BEGIN { if (eval { require OIS && $OIS::VERSION >= 0.05 }) { require OIS::InputManager; OIS::InputManager->import(); # xxx: these constants don't export right... require OIS::Keyboard; OIS::Keyboard->import(qw(:KeyCode)); require OIS::Mouse; OIS::Mouse->import(qw(:MouseButtonID)); } else { die(__PACKAGE__ . " requires OIS 0.05 or greater\n"); } } # Note: I don't have a joystick to test with.... :P sub new { my ($pkg, $win, $cam, $bufferedKeys, $bufferedMouse, $bufferedJoy) = @_; $bufferedKeys = 0 unless defined $bufferedKeys; $bufferedMouse = 0 unless defined $bufferedMouse; $bufferedJoy = 0 unless defined $bufferedJoy; my $self = bless { mWindow => $win, # RenderWindow mCamera => $cam, # Camera mTranslateVector => Ogre::Vector3->new(0, 0, 0), mStatsOn => 1, mNumScreenShots => 0, mMoveScale => 0, mRotScale => 0, mTimeUntilNextToggle => 0, mFiltering => TFO_BILINEAR, mAniso => 1, mSceneDetailIndex => 0, mMoveSpeed => 100, mRotateSpeed => 36, mDebugOverlay => undef, mInputManager => undef, mMouse => undef, mKeyboard => undef, mJoy => undef, mDebugText => '', displayCameraDetails => 0, # static variable, I put it here instead }, $pkg; $self->{mDebugOverlay} = Ogre::OverlayManager->getSingletonPtr->getByName("Core/DebugOverlay"); Ogre::LogManager->getSingletonPtr->logMessage("*** Initializing OIS ***"); my $windowHnd = $win->getCustomAttributePtr('WINDOW'); $self->{mInputManager} = OIS::InputManager->createInputSystemPtr($windowHnd); $self->{mKeyboard} = $self->{mInputManager}->createInputObjectKeyboard($bufferedKeys); $self->{mMouse} = $self->{mInputManager}->createInputObjectMouse($bufferedMouse); # $self->{mJoy} = $self->{mInputManager}->createInputObjectJoyStick($bufferedJoy); $self->windowResized($win); $self->showDebugOverlay(1); Ogre::WindowEventUtilities->addWindowEventListener($win, $self); return $self; } sub DESTROY { my ($self) = @_; # XXX: not sure where things are getting destroyed... # I wonder if this is why autorepeat turns off when you close # the application.... # Ogre::WindowEventUtilities->removeWindowEventListener($self->{mWindow}, $self); # $self->windowClosed($self->{mWindow}); } sub updateStats { my ($self) = @_; # there's a `try' block around this in C++, # not sure why - maybe for when these overlay elements # don't exist? my $om = Ogre::OverlayManager->getSingletonPtr(); my $guiAvg = $om->getOverlayElement("Core/AverageFps"); my $guiCurr = $om->getOverlayElement("Core/CurrFps"); my $guiBest = $om->getOverlayElement("Core/BestFps"); my $guiWorst = $om->getOverlayElement("Core/WorstFps"); # I can't get getStatistics to work, so have to use individual # methods from RenderTarget as follows. # my $stats = $self->{mWindow}->getStatistics(); my $win = $self->{mWindow}; $guiAvg->setCaption("Average FPS: " . $win->getAverageFPS); $guiCurr->setCaption("Current FPS: " . $win->getLastFPS); $guiBest->setCaption("Best FPS: " . $win->getBestFPS . " " . $win->getBestFrameTime . " ms"); $guiWorst->setCaption("Worst FPS: " . $win->getWorstFPS . " " . $win->getWorstFrameTime . " ms"); my $guiTris = $om->getOverlayElement("Core/NumTris"); my $guiBatches = $om->getOverlayElement("Core/NumBatches"); my $guiDbg = $om->getOverlayElement("Core/DebugText"); $guiTris->setCaption("Triangle Count: " . $win->getTriangleCount); $guiBatches->setCaption("Batch Count: " . $win->getBatchCount); $guiDbg->setCaption($self->{mDebugText}); } # windowEventListener sub windowResized { my ($self, $win) = @_; my ($width, $height) = $win->getMetrics(); my $mousestate = $self->{mMouse}->getMouseState(); # note: in C++ this would be like mousestate.width = width; $mousestate->setWidth($width); $mousestate->setHeight($height); } # windowEventListener sub windowClosed { my ($self, $win) = @_; # note: NEED TO IMPLEMENT overload == operator (etc...) # if ($win == $self->{mWindow}) { if ($win->getName == $self->{mWindow}->getName) { if ($self->{mInputManager}) { my $im = $self->{mInputManager}; if ($self->{mMouse}) { $im->destroyInputObject($self->{mMouse}); delete $self->{mMouse}; } if ($self->{mKeyboard}) { $im->destroyInputObject($self->{mKeyboard}); delete $self->{mMouse}; } if ($self->{mJoy}) { $im->destroyInputObject($self->{mJoy}); delete $self->{mJoy}; } OIS::InputManager->destroyInputSystem($im); delete $self->{mInputManager}; } } } sub processUnbufferedKeyInput { my ($self, $evt) = @_; my $kb = $self->{mKeyboard}; my $tv = $self->{mTranslateVector}; my $cam = $self->{mCamera}; if ($kb->isKeyDown(OIS::Keyboard->KC_A)) { $tv->setX(-$self->{mMoveScale}); # Move camera left } if ($kb->isKeyDown(OIS::Keyboard->KC_D)) { $tv->setX($self->{mMoveScale}); # Move camera RIGHT } if ($kb->isKeyDown(OIS::Keyboard->KC_UP) || $kb->isKeyDown(OIS::Keyboard->KC_W) ) { $tv->setZ(-$self->{mMoveScale}); # Move camera forward } if ($kb->isKeyDown(OIS::Keyboard->KC_DOWN) || $kb->isKeyDown(OIS::Keyboard->KC_S) ) { $tv->setZ($self->{mMoveScale}); # Move camera backward } if ($kb->isKeyDown(OIS::Keyboard->KC_PGUP)) { $tv->setY($self->{mMoveScale}); # Move camera up } if ($kb->isKeyDown(OIS::Keyboard->KC_PGDOWN)) { $tv->setY(-$self->{mMoveScale}); # Move camera down } if ($kb->isKeyDown(OIS::Keyboard->KC_RIGHT)) { $cam->yaw(Ogre::Degree->new(- $self->{mRotScale})); } if ($kb->isKeyDown(OIS::Keyboard->KC_LEFT)) { $cam->yaw(Ogre::Degree->new($self->{mRotScale})); } if ($kb->isKeyDown(OIS::Keyboard->KC_ESCAPE) || $kb->isKeyDown(OIS::Keyboard->KC_Q)) { return 0; } if ($kb->isKeyDown(OIS::Keyboard->KC_F) && $self->{mTimeUntilNextToggle} <= 0) { $self->{mStatsOn} = !$self->{mStatsOn}; $self->showDebugOverlay($self->{mStatsOn}); $self->{mTimeUntilNextToggle} = 1; } if ($kb->isKeyDown(OIS::Keyboard->KC_T) && $self->{mTimeUntilNextToggle} <= 0) { if ($self->{mFiltering} == TFO_BILINEAR) { $self->{mFiltering} = TFO_TRILINEAR; $self->{mAniso} = 1; } elsif ($self->{mFiltering} == TFO_TRILINEAR) { $self->{mFiltering} = TFO_ANISOTROPIC; $self->{mAniso} = 8; } elsif ($self->{mFiltering} == TFO_ANISOTROPIC) { $self->{mFiltering} = TFO_BILINEAR; $self->{mAniso} = 1; } Ogre::MaterialManager->getSingletonPtr->setDefaultTextureFiltering($self->{mFiltering}); Ogre::MaterialManager->getSingletonPtr->setDefaultAnisotropy($self->{mAniso}); $self->showDebugOverlay($self->{mStatsOn}); $self->{mTimeUntilNextToggle} = 1; } if ($kb->isKeyDown(OIS::Keyboard->KC_SYSRQ) && $self->{mTimeUntilNextToggle} <= 0) { my $ss = "screenshot_" . ++$self->{mNumScreenShots} . ".png"; $self->{mWindow}->writeContentsToFile($ss); $self->{mTimeUntilNextToggle} = 0.5; $self->{mDebugText} = "Saved: $ss"; } if ($kb->isKeyDown(OIS::Keyboard->KC_R) && $self->{mTimeUntilNextToggle} <= 0) { $self->{mSceneDetailIndex} = ($self->{mSceneDetailIndex} + 1) % 3; if ($self->{mSceneDetailIndex} == 0) { $cam->setPolygonMode(PM_SOLID); } elsif ($self->{mSceneDetailIndex} == 1) { $cam->setPolygonMode(PM_WIREFRAME); } elsif ($self->{mSceneDetailIndex} == 2) { $cam->setPolygonMode(PM_POINTS); } $self->{mTimeUntilNextToggle} = 0.5; } if ($kb->isKeyDown(OIS::Keyboard->KC_P) && $self->{mTimeUntilNextToggle} <= 0) { $self->{displayCameraDetails} = !$self->{displayCameraDetails}; $self->{$self->{mTimeUntilNextToggle}} = 0.5; if (!$self->{displayCameraDetails}) { $self->{mDebugText} = ""; } } # Print camera details # XXX: not for now - requires overloading "" for Quaternion # and Vector3 #if ($self-{displayCameraDetails}) { # $self->{mDebugText} = "P: " . $cam->getDerivedPosition() . # " " . "O: " . $cam->getDerivedOrientation(); #} if ($self->{displayCameraDetails}) { $self->{mDebugText} = "P: --- O: ---"; } # Return true to continue rendering return 1; } sub processUnbufferedMouseInput { my ($self, $evt) = @_; # Rotation factors, may not be used if the second mouse button is pressed # 2nd mouse button - slide, otherwise rotate my $ms = $self->{mMouse}->getMouseState(); if ($ms->buttonDown(OIS::Mouse->MB_Right)) { my $tv = $self->{mTranslateVector}; $tv->setX($tv->x + $ms->X->rel * 0.13); $tv->setY($tv->y - $ms->Y->rel * 0.13); } else { $self->{mRotX} = Ogre::Degree->new(- $ms->X->rel * 0.13); $self->{mRotY} = Ogre::Degree->new(- $ms->Y->rel * 0.13); } return 1; } sub moveCamera { my ($self) = @_; # Make all the changes to the camera # Note that YAW direction is around a fixed axis (freelook style) rather than a natural YAW # (e.g. airplane) my $cam = $self->{mCamera}; die "mRotX and mRotY must be Ogre::Degree!\n" unless ref($self->{mRotX}) && ref($self->{mRotY}); $cam->yaw($self->{mRotX}); $cam->pitch($self->{mRotY}); $cam->moveRelative($self->{mTranslateVector}); } sub showDebugOverlay { my ($self, $show) = @_; if ($self->{mDebugOverlay}) { if ($show) { $self->{mDebugOverlay}->show(); } else { $self->{mDebugOverlay}->hide(); } } } sub frameStarted { my ($self, $evt) = @_; my $mouse = $self->{mMouse}; my $keyboard = $self->{mKeyboard}; my $joy = $self->{mJoy}; if ($self->{mWindow}->isClosed()) { return 0; } # Need to capture/update each device $keyboard->capture(); $mouse->capture(); if ($joy) { $joy->capture(); } my $buffJ = $joy ? $joy->buffered() : 1; # Check if one of the devices is not buffered if (!$mouse->buffered() || !$keyboard->buffered() || !$buffJ) { # one of the input modes is immediate, so setup what is needed for immediate movement if ($self->{mTimeUntilNextToggle} >= 0) { $self->{mTimeUntilNextToggle} -= $evt->timeSinceLastFrame; } # If this is the first frame, pick a speed if ($evt->timeSinceLastFrame == 0) { $self->{mMoveScale} = 1; $self->{mRotScale} = 0.1; } # Otherwise scale movement units by time passed since last frame else { # Move about 100 units per second, $self->{mMoveScale} = $self->{mMoveSpeed} * $evt->timeSinceLastFrame; # Take about 10 seconds for full rotation $self->{mRotScale} = $self->{mRotateSpeed} * $evt->timeSinceLastFrame; } $self->{mRotX} = Ogre::Degree->new(0); $self->{mRotY} = Ogre::Degree->new(0); $self->{mTranslateVector} = Ogre::Vector3->new(0, 0, 0); } # Check to see which device is not buffered, and handle it if (!$keyboard->buffered()) { unless ($self->processUnbufferedKeyInput($evt)) { return 0; } } if (!$mouse->buffered()) { unless ($self->processUnbufferedMouseInput($evt)) { return 0; } } if (!$mouse->buffered() || !$keyboard->buffered() || !$buffJ) { $self->moveCamera(); } return 1; } sub frameEnded { $_[0]->updateStats(); return 1; } 1; __END__ =head1 NAME Ogre::ExampleFrameListener =head1 SYNOPSIS package MyFrameListener; use Ogre::ExampleFrameListener; @ISA = qw(Ogre::ExampleFrameListener); # override methods... package MyApplication; # ... my $framelistener = MyFrameListener->new(); $root->addFrameListener($framelistener); =head1 DESCRIPTION This is a port of OGRE's F. See the examples referred to in F. =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/SceneQuery.pm0000644000175000017500000000077212146460465016072 0ustar slanningslanningpackage Ogre::SceneQuery; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::SceneQuery::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'WorldFragmentType' => [qw( WFT_NONE WFT_PLANE_BOUNDED_REGION WFT_SINGLE_INTERSECTION WFT_CUSTOM_GEOMETRY WFT_RENDER_OPERATION )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/HardwareBufferManager.pm0000644000175000017500000000072012146460465020162 0ustar slanningslanningpackage Ogre::HardwareBufferManager; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::HardwareBufferManager::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'BufferLicenseType' => [qw( BLT_MANUAL_RELEASE BLT_AUTOMATIC_RELEASE )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/RegionSceneQuery.pm0000644000175000017500000000027512146460465017234 0ustar slanningslanningpackage Ogre::RegionSceneQuery; use strict; use warnings; use Ogre::SceneQuery; # use Ogre::SceneQueryListener; our @ISA = qw(Ogre::SceneQuery); # Ogre::SceneQueryListener 1; __END__ Ogre-0.60/Ogre/Vector2.pm0000644000175000017500000000060012146460465015321 0ustar slanningslanningpackage Ogre::Vector2; use strict; use warnings; # xxx: this should be in XS, but I can't get it to work use overload '==' => \&vec2_eq_xs, '!=' => \&vec2_ne_xs, '<' => \&vec2_lt_xs, '>' => \&vec2_gt_xs, '+' => \&vec2_plus_xs, '-' => \&vec2_minus_xs, '*' => \&vec2_mult_xs, '/' => \&vec2_div_xs, '0+' => sub { $_[0] }, 'neg' => \&vec2_neg_xs, ; 1; __END__ Ogre-0.60/Ogre/Resource.pm0000644000175000017500000000103012146460465015562 0ustar slanningslanningpackage Ogre::Resource; use strict; use warnings; use Ogre::StringInterface; our @ISA = qw(Ogre::StringInterface); ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::Resource::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'LoadingState' => [qw( LOADSTATE_UNLOADED LOADSTATE_LOADING LOADSTATE_LOADED LOADSTATE_UNLOADING )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/IntersectionSceneQuery.pm0000644000175000017500000000033312146460465020452 0ustar slanningslanningpackage Ogre::IntersectionSceneQuery; use strict; use warnings; use Ogre::SceneQuery; # use Ogre::IntersectionSceneQueryListener; our @ISA = qw(Ogre::SceneQuery); # Ogre::IntersectionSceneQueryListener 1; __END__ Ogre-0.60/Ogre/StringInterface.pm0000644000175000017500000000211112146460465017063 0ustar slanningslanningpackage Ogre::StringInterface; use strict; use warnings; 1; __END__ =head1 NAME Ogre::StringInterface =head1 SYNOPSIS use Ogre; use Ogre::StringInterface; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::StringInterface->cleanupDictionary() I =over =item void =back =head1 INSTANCE METHODS =head2 $obj->setParameter($name, $value) I =over =item $name : String =item $value : String =back I =over =item bool =back =head2 $obj->getParameter($name) I =over =item $name : String =back I =over =item String =back =head2 $obj->copyParametersTo($dest) I =over =item $dest : StringInterface * =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Plane.pm0000644000175000017500000000327612146460465015050 0ustar slanningslanningpackage Ogre::Plane; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::Plane::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'Side' => [qw( NO_SIDE POSITIVE_SIDE NEGATIVE_SIDE BOTH_SIDE )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ =head1 NAME Ogre::Plane =head1 SYNOPSIS use Ogre; use Ogre::Plane; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::Plane->new(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item Plane * =back =head2 Ogre::Plane->DESTROY() This method is called automatically; don't call it yourself. =head1 INSTANCE METHODS =head2 $obj->getDistance($rkPoint) I =over =item $rkPoint : Vector3 * =back I =over =item Real =back =head2 $obj->normalise() I =over =item Real =back =head2 $obj->d() I =over =item Real =back =head2 $obj->setD($d) I =over =item $d : Real =back I =over =item void =back =head2 $obj->normal() I =over =item Vector3 * =back =head2 $obj->setNormal($normal) I =over =item $normal : Vector3 * =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/ExampleApplication.pm0000644000175000017500000001537312146460465017571 0ustar slanningslanningpackage Ogre::ExampleApplication; use strict; use warnings; use Ogre 0.27 qw(:SceneType); use Ogre::ColourValue; use Ogre::Root; use Ogre::SceneManager; use Ogre::ResourceGroupManager; use Ogre::TextureManager; use Ogre::ExampleFrameListener; sub new { my ($pkg) = @_; my $self = bless { mFrameListener => undef, mRoot => undef, mResourcePath => '', mCamera => undef, mSceneMgr => undef, mWindow => undef, }, $pkg; # if OGRE_PLATFORM == OGRE_PLATFORM_APPLE # $self->mResourcePath = macBundlePath() + "/Contents/Resources/"; return $self; } sub DESTROY { my ($self) = @_; # not sure this is right.. if ($self->{mFrameListener}) { delete $self->{mFrameListener}; } if ($self->{mRoot}) { delete $self->{mRoot}; } } # XXX: # This function will locate the path to our application on OS X, # unlike windows you can not rely on the curent working directory # for locating your configuration files and resources. # (note: this is a FUNCTION, not a method) sub macBundlePath { # xxx: ExampleApplication.h contains a function macBundlePath # which gets the full path for mResourcePath (it says OS X must # be given a full path, not relative). That needs to be implemented # (presumably in Perl, though). # I'm not sure if all platforms can take a full path; # assuming so, it'll be easy enough, but otherwise I'll also # have to get the OGRE_PLATFORM, OGRE_PLATFORM_APPLE #defines return ''; } sub go { my ($self) = @_; return unless $self->setup(); $self->{mRoot}->startRendering(); $self->destroyScene(); } # These internal methods package up the stages in the startup process # Sets up the application - returns false if the user chooses to abandon configuration. sub setup { my ($self) = @_; $self->{mRoot} = Ogre::Root->new($self->{mResourcePath} . 'plugins.cfg', $self->{mResourcePath} . 'ogre.cfg', $self->{mResourcePath} . 'Ogre.log'); $self->setupResources(); return 0 unless $self->configure(); $self->chooseSceneManager(); $self->createCamera(); $self->createViewports(); # Set default mipmap level (NB some APIs ignore this) Ogre::TextureManager->getSingletonPtr->setDefaultNumMipmaps(5); # Create any resource listeners (for loading screens) $self->createResourceListener(); $self->loadResources(); $self->createScene(); $self->createFrameListener(); return 1; } # Configures the application - returns false if the user chooses to abandon configuration. sub configure { my ($self) = @_; # Show the configuration dialog and initialise the system # You can skip this and use root.restoreConfig() to load configuration # settings if you were sure there are valid ones saved in ogre.cfg if ($self->{mRoot}->showConfigDialog()) { # If returned true, user clicked OK so initialise # Here we choose to let the system create a default rendering window by passing 'true' $self->{mWindow} = $self->{mRoot}->initialise(1, "OGRE Render Window"); return 1; } else { return 0; } } sub chooseSceneManager { my ($self) = @_; # Create the SceneManager, in this case a generic one $self->{mSceneMgr} = $self->{mRoot}->createSceneManager(ST_GENERIC, "ExampleSMInstance"); } sub createCamera { my ($self) = @_; # Create the camera $self->{mCamera} = $self->{mSceneMgr}->createCamera("PlayerCam"); # Position it at 500 in Z direction $self->{mCamera}->setPosition(0, 0, 500); # Look back along -Z $self->{mCamera}->lookAt(0, 0, -300); $self->{mCamera}->setNearClipDistance(5); } sub createFrameListener { my ($self) = @_; $self->{mFrameListener} = Ogre::ExampleFrameListener->new($self->{mWindow}, $self->{mCamera}); $self->{mFrameListener}->showDebugOverlay(1); $self->{mRoot}->addFrameListener($self->{mFrameListener}); } sub createScene { die "implement createScene!\n"; } sub destroyScene { } sub createViewports { my ($self) = @_; # Create one viewport, entire window my $vp = $self->{mWindow}->addViewport($self->{mCamera}); $vp->setBackgroundColour(Ogre::ColourValue->new(0,0,0)); # Alter the camera aspect ratio to match the viewport $self->{mCamera}->setAspectRatio($vp->getActualWidth() / $vp->getActualHeight()); } # Method which will define the source of resources (other than current folder) sub setupResources { my ($self) = @_; my $cf = Ogre::ConfigFile->new(); # resources.cfg and its required media files are included in this directory. # You may want to change this, and use different media. # Look in the source distribution for OGRE under Samples/Media/ . $cf->load($self->{mResourcePath} . "resources.cfg"); # note: this is a Perlish replacement for iterators used in C++ my $secs = $cf->getSections(); # moved this outside the for loops my $rgm = Ogre::ResourceGroupManager->getSingletonPtr(); foreach my $sec (@$secs) { my $secName = $sec->{name}; my $settings = $sec->{settings}; foreach my $setting (@$settings) { my ($typeName, $archName) = @$setting; # XXX: # if OGRE_PLATFORM == OGRE_PLATFORM_APPLE # OS X does not set the working directory relative to the app, # In order to make things portable on OS X we need to provide # the loading with it's own bundle path location # $archName = macBundlePath() . "/" . $archName $rgm->addResourceLocation($archName, $typeName, $secName); } } } # Optional override method where you can create resource listeners (e.g. for loading screens) sub createResourceListener { } # Optional override method where you can perform resource group loading # Must at least do ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); sub loadResources { # Initialise, parse scripts etc Ogre::ResourceGroupManager->getSingletonPtr->initialiseAllResourceGroups(); } 1; __END__ =head1 NAME Ogre::ExampleApplication =head1 SYNOPSIS package MyApplication; use Ogre::ExampleApplication; @ISA = qw(Ogre::ExampleApplication); # override methods... =head1 DESCRIPTION This is a port of OGRE's F. As the name implies, it's an example of how to do things. You can subclass it to customize it how you want. See the examples referred to in F. =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/ResourceManager.pm0000644000175000017500000000020412146460465017057 0ustar slanningslanningpackage Ogre::ResourceManager; use strict; use warnings; use Ogre::ScriptLoader; our @ISA = qw(Ogre::ScriptLoader); 1; __END__ Ogre-0.60/Ogre/WindowEventUtilities.pm0000644000175000017500000000207012146460465020145 0ustar slanningslanningpackage Ogre::WindowEventUtilities; use strict; use warnings; 1; __END__ =head1 NAME Ogre::WindowEventUtilities =head1 SYNOPSIS use Ogre; use Ogre::WindowEventUtilities; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::WindowEventUtilities->messagePump() I =over =item void =back =head2 Ogre::WindowEventUtilities->addWindowEventListener($win, $perlListener) I =over =item $win : RenderWindow * =item $perlListener : SV * =back I =over =item void =back =head2 Ogre::WindowEventUtilities->removeWindowEventListener($win, $perlListener) I =over =item $win : RenderWindow * =item $perlListener : SV * =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/ColourValue.pm0000644000175000017500000000304212146460465016240 0ustar slanningslanningpackage Ogre::ColourValue; use strict; use warnings; # xxx: this should be in XS, but I can't get it to work use overload '==' => \&eq_xs, '!=' => \&ne_xs, ; 1; __END__ =head1 NAME Ogre::ColourValue =head1 SYNOPSIS use Ogre; use Ogre::ColourValue; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::ColourValue->new($red=1, $green=1, $blue=1, $alpha=1) I =over =item $red=1 : Real =item $green=1 : Real =item $blue=1 : Real =item $alpha=1 : Real =back I =over =item ColourValue * =back =head2 Ogre::ColourValue->DESTROY() This method is called automatically; don't call it yourself. =head2 \&eq_xs This is an operator overload method; don't call it yourself. =head1 INSTANCE METHODS =head2 $obj->saturate() I =over =item void =back =head2 $obj->setHSB($hue, $saturation, $brightness) I =over =item $hue : Real =item $saturation : Real =item $brightness : Real =back I =over =item void =back =head2 $obj->r() I =over =item Real =back =head2 $obj->g() I =over =item Real =back =head2 $obj->b() I =over =item Real =back =head2 $obj->a() I =over =item Real =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/VertexCacheProfiler.pm0000644000175000017500000000064412146460465017711 0ustar slanningslanningpackage Ogre::VertexCacheProfiler; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::VertexCacheProfiler::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'CacheType' => [qw( FIFO LRU )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/HardwareIndexBuffer.pm0000644000175000017500000000075512146460465017667 0ustar slanningslanningpackage Ogre::HardwareIndexBuffer; use strict; use warnings; use Ogre::HardwareBuffer; our @ISA = qw(Ogre::HardwareBuffer); ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::HardwareIndexBuffer::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'IndexType' => [qw( IT_16BIT IT_32BIT )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/Ray.pm0000644000175000017500000000007412146460465014535 0ustar slanningslanningpackage Ogre::Ray; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/AnimationTrack.pm0000644000175000017500000000010712146460465016703 0ustar slanningslanningpackage Ogre::AnimationTrack; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/RenderTexture.pm0000644000175000017500000000020212146460465016573 0ustar slanningslanningpackage Ogre::RenderTexture; use strict; use warnings; use Ogre::RenderTarget; our @ISA = qw(Ogre::RenderTarget); 1; __END__ Ogre-0.60/Ogre/Light.pm0000644000175000017500000001116712146460465015056 0ustar slanningslanningpackage Ogre::Light; use strict; use warnings; use Ogre::MovableObject; our @ISA = qw(Ogre::MovableObject); ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::Light::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'LightTypes' => [qw( LT_POINT LT_DIRECTIONAL LT_SPOTLIGHT )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ =head1 NAME Ogre::Light =head1 SYNOPSIS use Ogre; use Ogre::Light; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->setType($type) I =over =item $type : int =back I =over =item void =back =head2 $obj->getType() I =over =item int =back =head2 $obj->setDiffuseColour(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->getDiffuseColour() I =over =item ColourValue * =back =head2 $obj->setSpecularColour(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->getSpecularColour() I =over =item ColourValue * =back =head2 $obj->setAttenuation($Real range, $Real constant, $Real linear, $Real quadratic) I =over =item $Real range : (no info available) =item $Real constant : (no info available) =item $Real linear : (no info available) =item $Real quadratic : (no info available) =back I =over =item void =back =head2 $obj->getAttenuationRange() I =over =item Real =back =head2 $obj->getAttenuationConstant() I =over =item Real =back =head2 $obj->getAttenuationLinear() I =over =item Real =back =head2 $obj->getAttenuationQuadric() I =over =item Real =back =head2 $obj->setPosition(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->getPosition() I =over =item Vector3 * =back =head2 $obj->setDirection(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item void =back =head2 $obj->getDirection() I =over =item Vector3 * =back =head2 $obj->setSpotlightRange($innerAngle, $outerAngle, $falloff=1.0) I =over =item $innerAngle : Degree (or Radian) * =item $outerAngle : Degree (or Radian) * =item $falloff=1.0 : Real =back I =over =item void =back =head2 $obj->getSpotlightInnerAngle() I =over =item Radian * =back =head2 $obj->getSpotlightOuterAngle() I =over =item Radian * =back =head2 $obj->getSpotlightFalloff() I =over =item Real =back =head2 $obj->setSpotlightInnerAngle($val) I =over =item $val : Degree (or Radian) * =back I =over =item void =back =head2 $obj->setSpotlightOuterAngle($val) I =over =item $val : Degree (or Radian) * =back I =over =item void =back =head2 $obj->setSpotlightFalloff($Real val) I =over =item $Real val : (no info available) =back I =over =item void =back =head2 $obj->setPowerScale($Real power) I =over =item $Real power : (no info available) =back I =over =item void =back =head2 $obj->getPowerScale() I =over =item Real =back =head2 $obj->getBoundingBox() I =over =item AxisAlignedBox * =back =head2 $obj->getMovableType() I =over =item String =back =head2 $obj->getDerivedPosition() I =over =item Vector3 * =back =head2 $obj->getDerivedDirection() I =over =item Vector3 * =back =head2 $obj->setVisible($bool visible) I =over =item $bool visible : (no info available) =back I =over =item void =back =head2 $obj->getBoundingRadius() I =over =item Real =back =head2 $obj->getTypeFlags() I =over =item uint32 =back =head2 $obj->createAnimableValue($valueName) I =over =item $valueName : String =back I =over =item AnimableValue * =back =head2 $obj->resetCustomShadowCameraSetup() I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/VertexDeclaration.pm0000644000175000017500000000011212146460465017416 0ustar slanningslanningpackage Ogre::VertexDeclaration; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/Viewport.pm0000644000175000017500000000741712146460465015631 0ustar slanningslanningpackage Ogre::Viewport; use strict; use warnings; 1; __END__ =head1 NAME Ogre::Viewport =head1 SYNOPSIS use Ogre; use Ogre::Viewport; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->update() I =over =item void =back =head2 $obj->getTarget() I =over =item RenderTarget * =back =head2 $obj->getCamera() I =over =item Camera * =back =head2 $obj->setCamera($cam) I =over =item $cam : Camera * =back I =over =item void =back =head2 $obj->getZOrder() I =over =item int =back =head2 $obj->getLeft() I =over =item Real =back =head2 $obj->getTop() I =over =item Real =back =head2 $obj->getWidth() I =over =item Real =back =head2 $obj->getHeight() I =over =item Real =back =head2 $obj->getActualLeft() I =over =item int =back =head2 $obj->getActualTop() I =over =item int =back =head2 $obj->getActualWidth() I =over =item int =back =head2 $obj->getActualHeight() I =over =item int =back =head2 $obj->setDimensions($left, $top, $width, $height) I =over =item $left : Real =item $top : Real =item $width : Real =item $height : Real =back I =over =item void =back =head2 $obj->setBackgroundColour($colour) I =over =item $colour : ColourValue *colour =back I =over =item void =back =head2 $obj->setClearEveryFrame($clear, $buffers=FBT_COLOUR|FBT_DEPTH) I =over =item $clear : bool =item $buffers=FBT_COLOUR|FBT_DEPTH : unsigned int =back I =over =item void =back =head2 $obj->getClearEveryFrame() I =over =item bool =back =head2 $obj->getClearBuffers() I =over =item unsigned int =back =head2 $obj->setMaterialScheme($schemeName) I =over =item $schemeName : String =back I =over =item void =back =head2 $obj->getMaterialScheme() I =over =item String =back =head2 $obj->getActualDimensions($OUTLIST int left, $OUTLIST int top, $OUTLIST int width, $OUTLIST int height) I =over =item $OUTLIST int left : (no info available) =item $OUTLIST int top : (no info available) =item $OUTLIST int width : (no info available) =item $OUTLIST int height : (no info available) =back I =over =item void =back =head2 $obj->setOverlaysEnabled($enabled) I =over =item $enabled : bool =back I =over =item void =back =head2 $obj->getOverlaysEnabled() I =over =item bool =back =head2 $obj->setSkiesEnabled($enabled) I =over =item $enabled : bool =back I =over =item void =back =head2 $obj->getSkiesEnabled() I =over =item bool =back =head2 $obj->setShadowsEnabled($enabled) I =over =item $enabled : bool =back I =over =item void =back =head2 $obj->getShadowsEnabled() I =over =item bool =back =head2 $obj->setVisibilityMask($mask) I =over =item $mask : uint32 =back I =over =item void =back =head2 $obj->getVisibilityMask() I =over =item uint32 =back =head2 $obj->setRenderQueueInvocationSequenceName($sequenceName) I =over =item $sequenceName : String =back I =over =item void =back =head2 $obj->getRenderQueueInvocationSequenceName() I =over =item String =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/Technique.pm0000644000175000017500000000010212146460465015717 0ustar slanningslanningpackage Ogre::Technique; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/PassthroughControllerFunction.pm0000644000175000017500000000034712146460465022066 0ustar slanningslanningpackage Ogre::PassthroughControllerFunction; use strict; use warnings; # N.B. although this inherits from Ogre::ControllerFunction, # that doesn't happen here, # and you must not do that in your code, either. 1; __END__ Ogre-0.60/Ogre/ControllerReal.pm0000644000175000017500000000010712146460465016726 0ustar slanningslanningpackage Ogre::ControllerReal; use strict; use warnings; 1; __END__ Ogre-0.60/Ogre/OverlayManager.pm0000644000175000017500000000446112146460465016722 0ustar slanningslanningpackage Ogre::OverlayManager; use strict; use warnings; 1; __END__ =head1 NAME Ogre::OverlayManager =head1 SYNOPSIS use Ogre; use Ogre::OverlayManager; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 CLASS METHODS =head2 Ogre::OverlayManager->getSingletonPtr() I =over =item OverlayManager * =back =head1 INSTANCE METHODS =head2 $obj->create($name) I =over =item $name : String =back I =over =item Overlay * =back =head2 $obj->getByName($name) I =over =item $name : String =back I =over =item Overlay * =back =head2 $obj->destroy($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->destroyAll() I =over =item void =back =head2 $obj->hasViewportChanged() I =over =item bool =back =head2 $obj->getViewportHeight() I =over =item int =back =head2 $obj->getViewportWidth() I =over =item int =back =head2 $obj->getViewportAspectRatio() I =over =item Real =back =head2 $obj->createOverlayElement($typeName, $instanceName, $isTemplate=false) I =over =item $typeName : String =item $instanceName : String =item $isTemplate=false : bool =back I =over =item OverlayElement * =back =head2 $obj->getOverlayElement($name, $isTemplate=false) I =over =item $name : String =item $isTemplate=false : bool =back I =over =item OverlayElement * =back =head2 $obj->destroyOverlayElement($instanceName, $isTemplate=false) I =over =item $instanceName : String =item $isTemplate=false : bool =back I =over =item void =back =head2 $obj->destroyAllOverlayElements($isTemplate=false) I =over =item $isTemplate=false : bool =back I =over =item void =back =head2 $obj->isTemplate($strName) I =over =item $strName : String =back I =over =item bool =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/AnimationStateSet.pm0000644000175000017500000000103112146460465017370 0ustar slanningslanningpackage Ogre::AnimationStateSet; use strict; use warnings; 1; __END__ =head1 NAME Ogre::AnimationStateSet =head1 SYNOPSIS use Ogre; use Ogre::AnimationStateSet; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/ScaleControllerFunction.pm0000644000175000017500000000034112146460465020600 0ustar slanningslanningpackage Ogre::ScaleControllerFunction; use strict; use warnings; # N.B. although this inherits from Ogre::ControllerFunction, # that doesn't happen here, # and you must not do that in your code, either. 1; __END__ Ogre-0.60/Ogre/SceneManager.pm0000644000175000017500000005422012146460465016334 0ustar slanningslanningpackage Ogre::SceneManager; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::SceneManager::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'IlluminationRenderStage' => [qw( IRS_NONE IRS_RENDER_TO_TEXTURE IRS_RENDER_RECEIVER_PASS )], 'SpecialCaseRenderQueueMode' => [qw( SCRQM_INCLUDE SCRQM_EXCLUDE )], 'PrefabType' => [qw( PT_PLANE PT_CUBE PT_SPHERE )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ =head1 NAME Ogre::SceneManager =head1 SYNOPSIS use Ogre; use Ogre::SceneManager; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->getName() I =over =item String =back =head2 $obj->getTypeName() I =over =item String =back =head2 $obj->createCamera($name) I =over =item $name : String =back I =over =item Camera * =back =head2 $obj->getCamera($name) I =over =item $name : String =back I =over =item Camera * =back =head2 $obj->hasCamera($name) I =over =item $name : String =back I =over =item bool =back =head2 $obj->destroyCamera($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->destroyAllCameras() I =over =item void =back =head2 $obj->createLight($name) I =over =item $name : String =back I =over =item Light * =back =head2 $obj->getLight($name) I =over =item $name : String =back I =over =item Light * =back =head2 $obj->hasLight($name) I =over =item $name : String =back I =over =item bool =back =head2 $obj->destroyLight($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->destroyAllLights() I =over =item void =back =head2 $obj->createSceneNode($name) I =over =item $name : String =back I =over =item SceneNode * =back =head2 $obj->destroySceneNode($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->getRootSceneNode() I =over =item SceneNode * =back =head2 $obj->getSceneNode($name) I =over =item $name : String =back I =over =item SceneNode * =back =head2 $obj->hasSceneNode($name) I =over =item $name : String =back I =over =item bool =back =head2 $obj->createEntity($entityName, $meshName) I =over =item $entityName : String =item $meshName : String =back I =over =item Entity * =back =head2 $obj->getEntity($name) I =over =item $name : String =back I =over =item Entity * =back =head2 $obj->hasEntity($name) I =over =item $name : String =back I =over =item bool =back =head2 $obj->destroyEntity($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->destroyAllEntities() I =over =item void =back =head2 $obj->createManualObject($name) I =over =item $name : String =back I =over =item ManualObject * =back =head2 $obj->getManualObject($name) I =over =item $name : String =back I =over =item ManualObject * =back =head2 $obj->hasManualObject($name) I =over =item $name : String =back I =over =item bool =back =head2 $obj->destroyManualObject($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->destroyAllManualObjects() I =over =item void =back =head2 $obj->createBillboardChain($name) I =over =item $name : String =back I =over =item BillboardChain * =back =head2 $obj->getBillboardChain($name) I =over =item $name : String =back I =over =item BillboardChain * =back =head2 $obj->hasBillboardChain($name) I =over =item $name : String =back I =over =item bool =back =head2 $obj->destroyBillboardChain($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->destroyAllBillboardChains() I =over =item void =back =head2 $obj->createRibbonTrail($name) I =over =item $name : String =back I =over =item RibbonTrail * =back =head2 $obj->getRibbonTrail($name) I =over =item $name : String =back I =over =item RibbonTrail * =back =head2 $obj->hasRibbonTrail($name) I =over =item $name : String =back I =over =item bool =back =head2 $obj->destroyRibbonTrail($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->destroyAllRibbonTrails() I =over =item void =back =head2 $obj->createParticleSystem($name, $templateName) I =over =item $name : String =item $templateName : String =back I =over =item ParticleSystem * =back =head2 $obj->createAndAttachParticleSystem($name, $templateName, $node) I =over =item $name : String =item $templateName : String =item $node : SceneNode * =back I =over =item void =back =head2 $obj->getParticleSystem($name) I =over =item $name : String =back I =over =item ParticleSystem * =back =head2 $obj->hasParticleSystem($name) I =over =item $name : String =back I =over =item bool =back =head2 $obj->destroyParticleSystem($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->destroyAllParticleSystems() I =over =item void =back =head2 $obj->clearScene() I =over =item void =back =head2 $obj->setAmbientLight($colour) I =over =item $colour : ColourValue * =back I =over =item void =back =head2 $obj->setWorldGeometry($filename) I =over =item $filename : String =back I =over =item void =back =head2 $obj->estimateWorldGeometry($filename) I =over =item $filename : String =back I =over =item size_t =back =head2 $obj->hasOption($strKey) I =over =item $strKey : String =back I =over =item bool =back =head2 $obj->setSkyPlane($enable, $plane, $materialName, $scale=1000, $tiling=10, $drawFirst=true, $bow=0, $xsegments=1, $ysegments=1, $groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) I =over =item $enable : bool =item $plane : Plane * =item $materialName : String =item $scale=1000 : Real =item $tiling=10 : Real =item $drawFirst=true : bool =item $bow=0 : Real =item $xsegments=1 : int =item $ysegments=1 : int =item $groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME : String =back I =over =item void =back =head2 $obj->isSkyPlaneEnabled() I =over =item bool =back =head2 $obj->getSkyPlaneNode() I =over =item SceneNode * =back =head2 $obj->setSkyBox($enable, $materialName, $distance=5000, $drawFirst=true, $orientation=&Quaternion::IDENTITY, $groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) I =over =item $enable : bool =item $materialName : String =item $distance=5000 : Real =item $drawFirst=true : bool =item $orientation=&Quaternion::IDENTITY : const Quaternion * =item $groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME : String =back I =over =item void =back =head2 $obj->isSkyBoxEnabled() I =over =item bool =back =head2 $obj->getSkyBoxNode() I =over =item SceneNode * =back =head2 $obj->setSkyDome($enable, $materialName, $curvature=10, $tiling=8, $distance=4000, $drawFirst=true, $orientation=&Quaternion::IDENTITY, $xsegments=16, $ysegments=16, $ysegments_keep=-1, $groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) I =over =item $enable : bool =item $materialName : String =item $curvature=10 : Real =item $tiling=8 : Real =item $distance=4000 : Real =item $drawFirst=true : bool =item $orientation=&Quaternion::IDENTITY : const Quaternion * =item $xsegments=16 : int =item $ysegments=16 : int =item $ysegments_keep=-1 : int =item $groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME : String =back I =over =item void =back =head2 $obj->isSkyDomeEnabled() I =over =item bool =back =head2 $obj->getSkyDomeNode() I =over =item SceneNode * =back =head2 $obj->setFog($mode=FOG_NONE, $colour=&ColourValue::White, $expDensity=0.001, $linearStart=0.0, $linearEnd=1.0) I =over =item $mode=FOG_NONE : int =item $colour=&ColourValue::White : const ColourValue * =item $expDensity=0.001 : Real =item $linearStart=0.0 : Real =item $linearEnd=1.0 : Real =back I =over =item void =back =head2 $obj->getFogMode() I =over =item int =back =head2 $obj->getFogStart() I =over =item Real =back =head2 $obj->getFogEnd() I =over =item Real =back =head2 $obj->getFogDensity() I =over =item Real =back =head2 $obj->createBillboardSet($name, $poolSize=20) I =over =item $name : String =item $poolSize=20 : unsigned int =back I =over =item BillboardSet * =back =head2 $obj->getBillboardSet($name) I =over =item $name : String =back I =over =item BillboardSet * =back =head2 $obj->hasBillboardSet($name) I =over =item $name : String =back I =over =item bool =back =head2 $obj->destroyBillboardSet($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->destroyAllBillboardSets() I =over =item void =back =head2 $obj->setDisplaySceneNodes($display) I =over =item $display : bool =back I =over =item void =back =head2 $obj->getDisplaySceneNodes() I =over =item bool =back =head2 $obj->createAnimation($name, $length) I =over =item $name : String =item $length : Real =back I =over =item Animation * =back =head2 $obj->getAnimation($name) I =over =item $name : String =back I =over =item Animation * =back =head2 $obj->hasAnimation($name) I =over =item $name : String =back I =over =item bool =back =head2 $obj->destroyAnimation($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->destroyAllAnimations() I =over =item void =back =head2 $obj->createAnimationState($name) I =over =item $name : String =back I =over =item AnimationState * =back =head2 $obj->getAnimationState($name) I =over =item $name : String =back I =over =item AnimationState * =back =head2 $obj->hasAnimationState($name) I =over =item $name : String =back I =over =item bool =back =head2 $obj->destroyAnimationState($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->destroyAllAnimationStates() I =over =item void =back =head2 $obj->manualRender($rend, $pass, $vp, $worldMatrix, $viewMatrix, $projMatrix, $doBeginEndFrame=false) I =over =item $rend : RenderOperation * =item $pass : Pass * =item $vp : Viewport * =item $worldMatrix : const Matrix4 * =item $viewMatrix : const Matrix4 * =item $projMatrix : const Matrix4 * =item $doBeginEndFrame=false : bool =back I =over =item void =back =head2 $obj->getRenderQueue() I =over =item RenderQueue * =back =head2 $obj->addSpecialCaseRenderQueue($uint8 qid) I =over =item $uint8 qid : (no info available) =back I =over =item void =back =head2 $obj->removeSpecialCaseRenderQueue($uint8 qid) I =over =item $uint8 qid : (no info available) =back I =over =item void =back =head2 $obj->clearSpecialCaseRenderQueues() I =over =item void =back =head2 $obj->setSpecialCaseRenderQueueMode($int mode) I =over =item $int mode : (no info available) =back I =over =item void =back =head2 $obj->getSpecialCaseRenderQueueMode() I =over =item int =back =head2 $obj->isRenderQueueToBeProcessed($uint8 qid) I =over =item $uint8 qid : (no info available) =back I =over =item bool =back =head2 $obj->setWorldGeometryRenderQueue($uint8 qid) I =over =item $uint8 qid : (no info available) =back I =over =item void =back =head2 $obj->getWorldGeometryRenderQueue() I =over =item uint8 =back =head2 $obj->showBoundingBoxes($bShow) I =over =item $bShow : bool =back I =over =item void =back =head2 $obj->getShowBoundingBoxes() I =over =item bool =back =head2 $obj->createAABBQuery($box, $mask=0xFFFFFFFF) I =over =item $box : AxisAlignedBox * =item $mask=0xFFFFFFFF : unsigned long =back I =over =item AxisAlignedBoxSceneQuery * =back =head2 $obj->createSphereQuery($sphere, $mask=0xFFFFFFFF) I =over =item $sphere : Sphere * =item $mask=0xFFFFFFFF : unsigned long =back I =over =item SphereSceneQuery * =back =head2 $obj->createRayQuery($ray, $mask=0xFFFFFFFF) I =over =item $ray : Ray * =item $mask=0xFFFFFFFF : unsigned long =back I =over =item RaySceneQuery * =back =head2 $obj->createIntersectionQuery($unsigned long mask=0xFFFFFFFF) I =over =item $unsigned long mask=0xFFFFFFFF : (no info available) =back I =over =item IntersectionSceneQuery * =back =head2 $obj->destroyQuery($query) I =over =item $query : SceneQuery * =back I =over =item void =back =head2 $obj->setShadowTechnique($technique) I =over =item $technique : int =back I =over =item void =back =head2 $obj->getShadowTechnique() I =over =item int =back =head2 $obj->setShowDebugShadows($debug) I =over =item $debug : bool =back I =over =item void =back =head2 $obj->getShowDebugShadows() I =over =item bool =back =head2 $obj->setShadowColour($colour) I =over =item $colour : ColourValue * =back I =over =item void =back =head2 $obj->setShadowDirectionalLightExtrusionDistance($dist) I =over =item $dist : Real =back I =over =item void =back =head2 $obj->getShadowDirectionalLightExtrusionDistance() I =over =item Real =back =head2 $obj->setShadowFarDistance($distance) I =over =item $distance : Real =back I =over =item void =back =head2 $obj->getShadowFarDistance() I =over =item Real =back =head2 $obj->setShadowIndexBufferSize($size) I =over =item $size : size_t =back I =over =item void =back =head2 $obj->getShadowIndexBufferSize() I =over =item size_t =back =head2 $obj->setShadowTextureSize($size) I =over =item $size : unsigned short =back I =over =item void =back =head2 $obj->setShadowTextureConfig($size_t shadowIndex, $unsigned short width, $unsigned short height, $int format) I =over =item $size_t shadowIndex : (no info available) =item $unsigned short width : (no info available) =item $unsigned short height : (no info available) =item $int format : (no info available) =back I =over =item void =back =head2 $obj->setShadowTexturePixelFormat($int fmt) I =over =item $int fmt : (no info available) =back I =over =item void =back =head2 $obj->setShadowTextureCount($size_t count) I =over =item $size_t count : (no info available) =back I =over =item void =back =head2 $obj->getShadowTextureCount() I =over =item size_t =back =head2 $obj->setShadowTextureSettings($unsigned short size, $unsigned short count, $int fmt=PF_X8R8G8B8) I =over =item $unsigned short size : (no info available) =item $unsigned short count : (no info available) =item $int fmt=PF_X8R8G8B8 : (no info available) =back I =over =item void =back =head2 $obj->setShadowDirLightTextureOffset($Real offset) I =over =item $Real offset : (no info available) =back I =over =item void =back =head2 $obj->getShadowDirLightTextureOffset() I =over =item Real =back =head2 $obj->setShadowTextureFadeStart($Real fadeStart) I =over =item $Real fadeStart : (no info available) =back I =over =item void =back =head2 $obj->setShadowTextureFadeEnd($Real fadeEnd) I =over =item $Real fadeEnd : (no info available) =back I =over =item void =back =head2 $obj->setShadowTextureSelfShadow($bool selfShadow) I =over =item $bool selfShadow : (no info available) =back I =over =item void =back =head2 $obj->getShadowTextureSelfShadow() I =over =item bool =back =head2 $obj->setShadowTextureCasterMaterial($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->setShadowTextureReceiverMaterial($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->setShadowCasterRenderBackFaces($bool bf) I =over =item $bool bf : (no info available) =back I =over =item void =back =head2 $obj->getShadowCasterRenderBackFaces() I =over =item bool =back =head2 $obj->setShadowUseInfiniteFarPlane($bool enable) I =over =item $bool enable : (no info available) =back I =over =item void =back =head2 $obj->isShadowTechniqueStencilBased() I =over =item bool =back =head2 $obj->isShadowTechniqueTextureBased() I =over =item bool =back =head2 $obj->isShadowTechniqueModulative() I =over =item bool =back =head2 $obj->isShadowTechniqueAdditive() I =over =item bool =back =head2 $obj->isShadowTechniqueIntegrated() I =over =item bool =back =head2 $obj->isShadowTechniqueInUse() I =over =item bool =back =head2 $obj->createStaticGeometry($name) I =over =item $name : String =back I =over =item StaticGeometry * =back =head2 $obj->getStaticGeometry($name) I =over =item $name : String =back I =over =item StaticGeometry * =back =head2 $obj->hasStaticGeometry($name) I =over =item $name : String =back I =over =item bool =back =head2 $obj->destroyStaticGeometry($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->destroyAllStaticGeometry() I =over =item void =back =head2 $obj->createInstancedGeometry($name) I =over =item $name : String =back I =over =item InstancedGeometry * =back =head2 $obj->getInstancedGeometry($name) I =over =item $name : String =back I =over =item InstancedGeometry * =back =head2 $obj->destroyInstancedGeometry($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->destroyAllInstancedGeometry() I =over =item void =back =head2 $obj->createMovableObject($name, $typeName) I =over =item $name : String =item $typeName : String =back I =over =item MovableObject * =back =head2 $obj->destroyMovableObject($name, $typeName) I =over =item $name : String =item $typeName : String =back I =over =item void =back =head2 $obj->destroyAllMovableObjectsByType($typeName) I =over =item $typeName : String =back I =over =item void =back =head2 $obj->destroyAllMovableObjects() I =over =item void =back =head2 $obj->getMovableObject($name, $typeName) I =over =item $name : String =item $typeName : String =back I =over =item MovableObject * =back =head2 $obj->hasMovableObject($name, $typeName) I =over =item $name : String =item $typeName : String =back I =over =item bool =back =head2 $obj->injectMovableObject($m) I =over =item $m : MovableObject * =back I =over =item void =back =head2 $obj->extractMovableObject($name, $typeName) I =over =item $name : String =item $typeName : String =back I =over =item void =back =head2 $obj->extractAllMovableObjectsByType($typeName) I =over =item $typeName : String =back I =over =item void =back =head2 $obj->setVisibilityMask($uint32 vmask) I =over =item $uint32 vmask : (no info available) =back I =over =item void =back =head2 $obj->getVisibilityMask() I =over =item uint32 =back =head2 $obj->setFindVisibleObjects($bool find) I =over =item $bool find : (no info available) =back I =over =item void =back =head2 $obj->getFindVisibleObjects() I =over =item bool =back =head2 $obj->getDestinationRenderSystem() I =over =item RenderSystem * =back =head2 $obj->getCurrentViewport() I =over =item Viewport * =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/Ogre/AnimableValue.pm0000644000175000017500000000071412146460465016510 0ustar slanningslanningpackage Ogre::AnimableValue; use strict; use warnings; ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::AnimableValue::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'ValueType' => [qw( INT REAL VECTOR2 VECTOR3 VECTOR4 QUATERNION COLOUR )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ Ogre-0.60/Ogre/Entity.pm0000644000175000017500000001367012146460465015264 0ustar slanningslanningpackage Ogre::Entity; use strict; use warnings; use Ogre::MovableObject; our @ISA = qw(Ogre::MovableObject); # Ogre::Resource::Listener ########## GENERATED CONSTANTS BEGIN require Exporter; unshift @Ogre::Entity::ISA, 'Exporter'; our %EXPORT_TAGS = ( 'VertexDataBindChoice' => [qw( BIND_ORIGINAL BIND_SOFTWARE_SKELETAL BIND_SOFTWARE_MORPH BIND_HARDWARE_MORPH )], ); $EXPORT_TAGS{'all'} = [ map { @{ $EXPORT_TAGS{$_} } } keys %EXPORT_TAGS ]; our @EXPORT_OK = @{ $EXPORT_TAGS{'all'} }; our @EXPORT = (); ########## GENERATED CONSTANTS END 1; __END__ =head1 NAME Ogre::Entity =head1 SYNOPSIS use Ogre; use Ogre::Entity; # (for now see examples/README.txt) =head1 DESCRIPTION See the online API documentation at L B this Perl binding is currently I and subject to API changes. =head1 INSTANCE METHODS =head2 $obj->getMesh() I =over =item const Mesh * =back =head2 $obj->getSubEntity(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item SubEntity * =back =head2 $obj->getNumSubEntities() I =over =item unsigned int =back =head2 $obj->clone($name) I =over =item $name : String =back I =over =item Entity * =back =head2 $obj->setMaterialName($name) I =over =item $name : String =back I =over =item void =back =head2 $obj->setRenderQueueGroup($uint8 queueID) I =over =item $uint8 queueID : (no info available) =back I =over =item void =back =head2 $obj->getMovableType() I =over =item String =back =head2 $obj->getAnimationState($name) I =over =item $name : String =back I =over =item AnimationState * =back =head2 $obj->getAllAnimationStates() I =over =item AnimationStateSet * =back =head2 $obj->setDisplaySkeleton($display) I =over =item $display : bool =back I =over =item void =back =head2 $obj->getDisplaySkeleton() I =over =item bool =back =head2 $obj->getManualLodLevel($index) I =over =item $index : size_t =back I =over =item Entity * =back =head2 $obj->getNumManualLodLevels() I =over =item size_t =back =head2 $obj->setMeshLodBias($factor, $maxDetailIndex=0, $minDetailIndex=99) I =over =item $factor : Real =item $maxDetailIndex=0 : unsigned short =item $minDetailIndex=99 : unsigned short =back I =over =item void =back =head2 $obj->setMaterialLodBias($factor, $maxDetailIndex=0, $minDetailIndex=99) I =over =item $factor : Real =item $maxDetailIndex=0 : unsigned short =item $minDetailIndex=99 : unsigned short =back I =over =item void =back =head2 $obj->setPolygonModeOverrideable($PolygonModeOverrideable) I =over =item $PolygonModeOverrideable : bool =back I =over =item void =back =head2 $obj->attachObjectToBone($boneName, $pMovable, $offsetOrientation=&Quaternion::IDENTITY, $offsetPosition=&Vector3::ZERO) I =over =item $boneName : String =item $pMovable : MovableObject * =item $offsetOrientation=&Quaternion::IDENTITY : const Quaternion * =item $offsetPosition=&Vector3::ZERO : const Vector3 * =back I =over =item TagPoint * =back =head2 $obj->detachObjectFromBone(...) I =over =item ... : this varies... (sorry, look in the .xs file) =back I =over =item MovableObject * =back =head2 $obj->detachAllObjectsFromBone() I =over =item void =back =head2 $obj->getBoundingRadius() I =over =item Real =back =head2 $obj->setNormaliseNormals($bool normalise) I =over =item $bool normalise : (no info available) =back I =over =item void =back =head2 $obj->getNormaliseNormals() I =over =item bool =back =head2 $obj->getEdgeList() I =over =item EdgeData * =back =head2 $obj->hasEdgeList() I =over =item bool =back =head2 $obj->hasSkeleton() I =over =item bool =back =head2 $obj->getSkeleton() I =over =item SkeletonInstance * =back =head2 $obj->isHardwareAnimationEnabled() I =over =item bool =back =head2 $obj->getSoftwareAnimationRequests() I =over =item int =back =head2 $obj->getSoftwareAnimationNormalsRequests() I =over =item int =back =head2 $obj->addSoftwareAnimationRequest($bool normalsAlso) I =over =item $bool normalsAlso : (no info available) =back I =over =item void =back =head2 $obj->removeSoftwareAnimationRequest($bool normalsAlso) I =over =item $bool normalsAlso : (no info available) =back I =over =item void =back =head2 $obj->shareSkeletonInstanceWith($entity) I =over =item $entity : Entity * =back I =over =item void =back =head2 $obj->hasVertexAnimation() I =over =item bool =back =head2 $obj->stopSharingSkeletonInstance() I =over =item void =back =head2 $obj->sharesSkeletonInstance() I =over =item bool =back =head2 $obj->refreshAvailableAnimationState() I =over =item void =back =head2 $obj->getTypeFlags() I =over =item uint32 =back =head2 $obj->getVertexDataForBinding() I =over =item VertexData * =back =head2 $obj->chooseVertexDataForBinding($bool hasVertexAnim) I =over =item $bool hasVertexAnim : (no info available) =back I =over =item int =back =head2 $obj->isInitialised() I =over =item bool =back =head2 $obj->backgroundLoadingComplete($res) I =over =item $res : Resource * =back I =over =item void =back =head1 AUTHOR Scott Lanning Eslanning@cpan.orgE For licensing information, see README.txt . =cut Ogre-0.60/perlOGRE.h0000644000175000017500000000517612150504224014333 0ustar slanningslanning#ifndef _PERLOGRE_H_ #define _PERLOGRE_H_ #include // I'm not sure what version this changed... #if OGRE_VERSION >= 0x010900 #include #include #include #else #include #include #include #endif // typedefs for deeply nested classes typedef Ogre::SceneQuery::WorldFragment WorldFragment; typedef Ogre::ManualObject::ManualObjectSection ManualObjectSection; // TODO: all the Overlay renaming..... // typedef for handling Degree or Radian input parameters typedef Ogre::Radian DegRad; // typedefs for controllers, especially input params typedef Ogre::Controller ControllerReal; typedef Ogre::ControllerValue ControllerValueReal; typedef Ogre::ControllerFunction ControllerFunctionReal; // macros for typemap // xxx: let me know if you have a better way to do this... #define TMOGRE_OUT(arg, var, pkg) sv_setref_pv(arg, "Ogre::" #pkg, (void *) var); #define TMOGRE_IN(arg, var, type, package, func, pkg) \ if (sv_isobject(arg) && sv_derived_from(arg, "Ogre::" #pkg)) { \ var = (type) SvIV((SV *) SvRV(arg)); \ } else { \ croak(#package "::" #func "(): " #var " is not an Ogre::" #pkg " object\n"); \ } // handle Degree, Radian, and Real args as Radian #define TMOGRE_DEGRAD_IN(arg, var, package, func) \ Radian rad_ ## var; \ if (sv_isobject(arg) && sv_derived_from(arg, "Ogre::Radian")) { \ var = (Radian *) SvIV((SV *) SvRV(arg)); \ } else if (sv_isobject(arg) && sv_derived_from(arg, "Ogre::Degree")) { \ Degree * degptr_ ## var = (Degree *) SvIV((SV *) SvRV(arg)); \ rad_ ## var = * degptr_ ## var; \ var = &rad_ ## var; \ } else if (looks_like_number(arg)) { \ rad_ ## var = (Real)SvNV(arg); \ var = &rad_ ## var; \ } else { \ croak(#package "::" #func "(): " #var " is not a Degree or Radian object or Real number\n"); \ } // handle ControllerValue input args #define TMOGRE_CONTVAL_IN(arg, var) \ if (sv_isa(arg, "Ogre::ControllerValueReal")) { \ var = (ControllerValueReal *) SvIV((SV *) SvRV(arg)); \ } else { \ var = new PerlOGREControllerValue(arg); \ } // handle ControllerFunction input args #define TMOGRE_CONTFUNC_IN(arg, var) \ if (sv_isa(arg, "Ogre::ControllerFunctionReal")) { \ var = (ControllerFunctionReal *) SvIV((SV *) SvRV(arg)); \ } else { \ var = new PerlOGREControllerFunction(arg); \ } // for C++ #ifdef __cplusplus extern "C" { #endif #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #ifdef __cplusplus } #endif #endif /* define _PERLOGRE_H_ */ Ogre-0.60/META.yml0000664000175000017500000000114512162410433014007 0ustar slanningslanning--- #YAML:1.0 name: Ogre version: 0.60 abstract: Perl binding for the OGRE C++ graphics library author: - Scott Lanning license: unknown distribution_type: module configure_requires: ExtUtils::MakeMaker: 0 build_requires: ExtUtils::MakeMaker: 0 requires: Test::More: 0 no_index: directory: - t - inc - t - examples - genscripts generated_by: ExtUtils::MakeMaker version 6.57_05 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 Ogre-0.60/perlobject.map0000644000175000017500000000507712146460465015410 0ustar slanningslanning# "perlobject.map" Dean Roehrich, version 19960302 # # TYPEMAPs # # HV * -> unblessed Perl HV object. # AV * -> unblessed Perl AV object. # # INPUT/OUTPUT maps # # O_* -> opaque blessed objects # T_* -> opaque blessed or unblessed objects # # O_OBJECT -> link an opaque C or C++ object to a blessed Perl object. # T_OBJECT -> link an opaque C or C++ object to an unblessed Perl object. # O_HvRV -> a blessed Perl HV object. # T_HvRV -> an unblessed Perl HV object. # O_AvRV -> a blessed Perl AV object. # T_AvRV -> an unblessed Perl AV object. TYPEMAP HV * T_HvRV AV * T_AvRV ###################################################################### OUTPUT # The Perl object is blessed into 'CLASS', which should be a # char* having the name of the package for the blessing. O_OBJECT sv_setref_pv( $arg, CLASS, (void*)$var ); T_OBJECT sv_setref_pv( $arg, Nullch, (void*)$var ); # Cannot use sv_setref_pv() because that will destroy # the HV-ness of the object. Remember that newRV() will increment # the refcount. O_HvRV $arg = sv_bless( newRV((SV*)$var), gv_stashpv(CLASS,1) ); T_HvRV $arg = newRV((SV*)$var); # Cannot use sv_setref_pv() because that will destroy # the AV-ness of the object. Remember that newRV() will increment # the refcount. O_AvRV $arg = sv_bless( newRV((SV*)$var), gv_stashpv(CLASS,1) ); T_AvRV $arg = newRV((SV*)$var); ###################################################################### INPUT O_OBJECT if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) ) $var = ($type)SvIV((SV*)SvRV( $arg )); else{ warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" ); XSRETURN_UNDEF; } T_OBJECT if( SvROK($arg) ) $var = ($type)SvIV((SV*)SvRV( $arg )); else{ warn( \"${Package}::$func_name() -- $var is not an SV reference\" ); XSRETURN_UNDEF; } O_HvRV if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVHV) ) $var = (HV*)SvRV( $arg ); else { warn( \"${Package}::$func_name() -- $var is not a blessed HV reference\" ); XSRETURN_UNDEF; } T_HvRV if( SvROK($arg) && (SvTYPE(SvRV($arg)) == SVt_PVHV) ) $var = (HV*)SvRV( $arg ); else { warn( \"${Package}::$func_name() -- $var is not an HV reference\" ); XSRETURN_UNDEF; } O_AvRV if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVAV) ) $var = (AV*)SvRV( $arg ); else { warn( \"${Package}::$func_name() -- $var is not a blessed AV reference\" ); XSRETURN_UNDEF; } T_AvRV if( SvROK($arg) && (SvTYPE(SvRV($arg)) == SVt_PVAV) ) $var = (AV*)SvRV( $arg ); else { warn( \"${Package}::$func_name() -- $var is not an AV reference\" ); XSRETURN_UNDEF; } Ogre-0.60/PerlOGRECallbackManager.h0000644000175000017500000000270112146460465017207 0ustar slanningslanning#ifndef _PERLOGRE_CALLBACKMANAGER_H_ #define _PERLOGRE_CALLBACKMANAGER_H_ /* In OGRE, there can be multiple FrameListeners added by Root->addFrameListener, and they can be deleted later by passing in the FrameListener to Root->removeFrameListener. Since we're implementing FrameListeners in Perl, we have to instantiate the C++ object to be passed to Root->addFrameListener. */ #include #include "perlOGRE.h" #include "PerlOGREFrameListener.h" #include "PerlOGREWindowEventListener.h" using namespace std; class PerlOGRECallbackManager { private: // Perl pkgname mapped to single C++ FrameListener typedef map FrameListenerMap; FrameListenerMap mFrameListenerMap; // Perl pkgname mapped to single C++ WindowEventListener typedef map WinEvtListenerMap; WinEvtListenerMap mWinEvtListenerMap; // Perl pkgname mapped to multiple C++ RenderWindows typedef multimap WinEvtListenerWindowMMap; WinEvtListenerWindowMMap mWinEvtListenerWindowMMap; public: PerlOGRECallbackManager(); ~PerlOGRECallbackManager(); void addFrameListener(SV *pobj, Ogre::Root *root); void removeFrameListener(SV *pobj, Ogre::Root *root); void addWindowEventListener(SV *pobj, Ogre::RenderWindow *win); void removeWindowEventListener(SV *pobj, Ogre::RenderWindow *win); }; #endif /* define _PERLOGRE_CALLBACKMANAGER_H_ */ Ogre-0.60/PerlOGRECallback.cpp0000644000175000017500000000715012146460465016252 0ustar slanningslanning#include "PerlOGRECallback.h" PerlOGRECallback::PerlOGRECallback(SV *pobj) { if (pobj != (SV *)NULL && sv_isobject(pobj)) { mPerlObj = newSVsv(pobj); // copy the SV* } else { croak("Argument isn't an object, so Perl callback can't be set.\n"); } } PerlOGRECallback::~PerlOGRECallback() { if (mPerlObj != (SV *)NULL && SvREFCNT(mPerlObj)) { SvREFCNT_dec(mPerlObj); // delete our copy } } // check whether the Perl object has a callback method implemented // (xxx: is there a perl API method or something easier than this?) bool PerlOGRECallback::perlCallbackCan(string const &cbmeth) { int count; SV *methret; bool can; dSP; ENTER; SAVETMPS; // call `can' to see if they implemented the callback PUSHMARK(SP); XPUSHs(mPerlObj); XPUSHs(sv_2mortal(newSVpv(cbmeth.c_str(), 0))); PUTBACK; count = call_method("can", G_SCALAR); SPAGAIN; if (count != 1) { croak("can (%s) didn't return a single value?", cbmeth.c_str()); } methret = POPs; PUTBACK; can = SvTRUE(methret); FREETMPS; LEAVE; return can; } // before calling this, push the callback args onto the mCallbackArgs vector bool PerlOGRECallback::callPerlCallback(string const &cbmeth) const { int count; SV *methret; bool retval = true; if (mCanMap[cbmeth] == false) { // method not implemented, just return true return retval; } dSP; ENTER; SAVETMPS; // call the callback PUSHMARK(SP); XPUSHs(mPerlObj); for (CBArgList::iterator it = mCallbackArgs.begin(); it != mCallbackArgs.end(); ++it) { XPUSHs(sv_2mortal(*it)); } PUTBACK; count = call_method(cbmeth.c_str(), G_SCALAR); SPAGAIN; if (count != 1) { croak("Callback must return a single (boolean) value"); } methret = POPs; PUTBACK; retval = SvTRUE(methret) ? true : false; FREETMPS; LEAVE; mCallbackArgs.clear(); return retval; } // xxx: dumb how much copy/paste the next two methods have // before calling this, push the callback args onto the mCallbackArgs vector Ogre::Real PerlOGRECallback::callPerlCallbackReal(string const &cbmeth) const { int count; SV *methret; Ogre::Real retval = 0; if (mCanMap[cbmeth] == false) { // method not implemented, just return 0 return retval; } dSP; ENTER; SAVETMPS; // call the callback PUSHMARK(SP); XPUSHs(mPerlObj); for (CBArgList::iterator it = mCallbackArgs.begin(); it != mCallbackArgs.end(); ++it) { XPUSHs(sv_2mortal(*it)); } PUTBACK; count = call_method(cbmeth.c_str(), G_SCALAR); SPAGAIN; if (count != 1) { croak("Callback must return a single (Real) value"); } methret = POPs; PUTBACK; retval = (Ogre::Real)SvNV(methret); FREETMPS; LEAVE; mCallbackArgs.clear(); return retval; } // before calling this, push the callback args onto the mCallbackArgs vector void PerlOGRECallback::callPerlCallbackVoid(string const &cbmeth) const { int count; if (mCanMap[cbmeth] == false) { // method not implemented, just return return; } dSP; ENTER; SAVETMPS; // call the callback PUSHMARK(SP); XPUSHs(mPerlObj); for (CBArgList::iterator it = mCallbackArgs.begin(); it != mCallbackArgs.end(); ++it) { XPUSHs(sv_2mortal(*it)); } PUTBACK; count = call_method(cbmeth.c_str(), G_SCALAR); SPAGAIN; if (count != 0) { croak("Callback must not return a value"); } FREETMPS; LEAVE; mCallbackArgs.clear(); } Ogre-0.60/Changes0000644000175000017500000001724212162410243014033 0ustar slanningslanning0.60 2013-05-26 | support Ogre = 1.8 (not 1.9 yet) - patch from Mattia Barbon to fix compilation in Ogre 1.8 (1.9 is coming soon, so not going to bother with 1.7 anymore) - uploaded code to https://github.com/slanning/perl-ogre - more patches to fix for Ogre 1.9.1 - I removed references to Ogre::ProgressiveMesh; it wasn't really used, and seems they maybe renamed it to ProgressiveMeshGenerator - 1.9 isn't supported yet; there were some substantial API changes 0.50 2010-12-14 | support Ogre >= 1.7.2 - dropping support for versions of Ogre before 1.7.2 (released 2010-11-03) - removed Readonly (optional) dependence (for one example) - ported to 1.7.2 0.40 2009-10-07 | fixed GTK support, kinda - minor API improvements - added Ogre::Timer 0.39 2009-10-04 | getWorldPosition, getWorldOrientation removed - API change for Ogre 1.6, these are not in Renderable and have been renamed in Node to _getDerivedPosition and _getDerivedOrientation 0.38 2009-10-03 | render Ogre in SDL-perl - added currentGLContext param for Root->createRenderWindow, which at least in Linux allows rendering Ogre in SDL's GL context - added sdlrobot.pl example 0.37 2009-09-22 | update examples - the instructions in the examples directory still said to use Ogre 1.4 media, but in fact 1.6 media are required now due to incompatibilities 0.36 2009-09-15 | update for Ogre version 1.6 - this breaks a little backward-compatibility, but not enough to affect any of the examples. I doubt I'll worry about maintaining version 1.4 (1.7 is coming out soon...) - there is plenty of work to be done; I just removed/renamed enough to get it to compile 0.35 2007-12-15 | Ogre::AL (new module) - new (separate) CPAN module Ogre::AL, which is a binding for the OpenAL audio library and lets you attach sounds to scene nodes - added three Perl-specific methods to OverlayManager, to account for C++ casting (see note for 0.33): createTextAreaOverlayElement, createPanelOverlayElement, createBorderPanelOverlayElement, which are all variations of createOverlayElement; also wrapped those three classes while I was at it - added -Wno-write-strings to Makefile.PL if you compile with g++ >= 4.2, otherwise you would get literally a thousand warnings which I have no control over (I think these might be gone in perl 5.10, so I also check for that) - bumped up OIS requirement in Ogre::ExampleListener to version 0.04 - added more operator overloads to Degree and Radian - wrapped Ogre::MaterialManager to fix Ogre::BetaGUI 0.34 2007-12-09 | scene query enhancements - wrapped SceneQuery, ManualObject, and AxisAlignedBox methods (for Ogre::BetaGUI itute3.pl and itute4.pl examples) note: for ManualObject, still not the constructor/destructor, though it can be created through SceneManager - wrapped createPlaneBoundedVolumeQuery in SceneManager, which takes an array ref of PlaneBoundedVolume* instead of a PlaneBoundedVolumeList (which is a std::vector) - added more support for RegionSceneQuery and its subclasses 0.33 2007-12-04 | Ogre::BetaGUI (new module) - new (separate) CPAN module Ogre::BetaGUI; see it and its itute2.pl example demonstrating a mouse cursor - added createOverlayContainer method to OverlayManager.xs; this Perl-specific method is equivalent to createOverlayElement but returns an OverlayContainer (static_cast) instead - fixed Quaternion operator overloading - added Vector2 constructor/destructor, tests 0.32 2007-11-26 | lighting.pl - added lighting.pl example - implemented Controller, ControllerValue, ControllerFunction for use with lighting example; note that Controller is called ControllerReal in the Perl binding - fixed a little bug with setDiffuseColour/setSpecularColour of Ogre::Light - (internal) renamed PerlOGREListener.h to PerlOGRECallback.h, etc. (generalized from listener to any callback class in Perl, in particular to handle ControllerValue and ControllerFunction) 0.31 2007-11-17 | terrain.pl - added terrain.pl example - wrapped RaySceneQuery class, among others - updated docs (note: I need to update the gendocs.pl script, so there are some weird things like "$bool enabled" instead of "bool $enabled") 0.30 2007-11-16 | skeletalanim.pl - added skeletalanim.pl example - wrapped more classes, again to get the example working - improved Vector3 and Quaternion operator overloading, so now the robot rotates in animate.pl instead of moonwalking - fixed a few places where I'd neglected to put the return value of some methods into RETVAL, so segfaults would happen - added init-class.pl and strip-api-docs.pl genscripts that I use for generating/initializing new classes 0.29 2007-11-14 | cameratrack.pl, particleFX.pl - added cameratrack.pl and particleFX.pl examples - wrapped many classes, mainly to make the examples work - fixed a tiny bug in Ogre::ExampleFrameListener - note: one reason there was a 2-month gap between releases was that I tried to write a script to generate the entire API; the aftermath of that attempt is genscripts/genxsubs.pl, but I've given up on it for now 0.28 2007-09-16 | gtk2-perl and wxPerl - added a VERY EXPERIMENTAL feature to allow Ogre's render window to be an existing Gtk2 or Wx window instead of the defaultly generated one. See README.txt for details (you have to have gtk2 libs/headers installed). I kind of got it working for Gtk2, see examples/gtk2robot.pl. I couldn't get examples/wx.pl to actually work yet, though it's no longer segfaulting at least. (I think the Ogre window is underneath the other ones, i.e it's the "parent" window.) - wrapped more methods in RenderWindow, Viewport 0.27 2007-09-12 | constants - API CHANGE: fixed constants, adding all enums (and genconsts.pl script); now you export them normally, not call as static methods. Some export tags changed, too; they're all named after the corresponding enum's name now. (Note: OIS constants are still "broken".) Thanks to Vladimir Olenin for pointing me to `gccxml`, which was used in parsing the C++ headers. 0.26 2007-09-09 | documentation - added some documentation (and gendocs.pl script which generates it) - added DegRad typemap to handle both Degree or Radian types, so now Degree and Radian are interchangeable like in the C++ API (and wrapping those methods is simpler :) 0.25 2007-09-07 | animate.pl - added animate.pl example, which demos animation (note: this is still a little incomplete, so the robot moonwalks part of the way) 0.24 2007-09-06 | minor improvements - added typemap for Real and changed all occurrences of float to Real (which can be float or double) - added constructors, overloaded (bool) operators, tests to: ColourValue, ConfigFile, Degree, Plane, Quaternion, Radian, Vector3 0.23 2007-09-04 | sky.pl - moved ExampleFrameListener and ExampleApplication packages from examples/buffered.pl out under Ogre/ , so they can be used by other applications - added sky.pl example, which implements OGRE's "Basic Tutorial 3" - fixed unbuffered input in the Example* classes - wrapped a lot of SceneManager 0.22 2007-09-02 | buffered.pl - added buffered.pl, which implements OGRE's "Basic Tutorial 5" 0.21 2007-09-01 | - added WindowEventListener functionality, though not "tested" yet (working on another example) 0.20 2007-08-30 | ninja.pl, listeningninja.pl - added ninja.pl example, along with necessary wrappers to get it to work (you also need to install OIS, which I just uploaded to CPAN) - also added listeningninja.pl example, along with FrameListener functionality - wrapped several other classes, but not fully yet; will have another example next release 0.1 2007-08-26 | robot.pl (Note: I accidentally put version 0.1 instead of 0.01) - first release, minimal wrapping - includes robot.pl example Ogre-0.60/PerlOGREControllerValue.cpp0000644000175000017500000000114412146460465017673 0ustar slanningslanning#include "PerlOGREControllerValue.h" PerlOGREControllerValue::PerlOGREControllerValue(SV *pobj) : PerlOGRECallback(pobj) { mCanMap["getValue"] = perlCallbackCan("getValue"); mCanMap["setValue"] = perlCallbackCan("setValue"); } Ogre::Real PerlOGREControllerValue::getValue() const { return callPerlCallbackReal("getValue"); } void PerlOGREControllerValue::setValue(Ogre::Real value) { // arg 1 for perl stack SV *perlval = newSV(0); sv_setnv(perlval, (Ogre::Real)value); mCallbackArgs.push_back(perlval); // call the callback return callPerlCallbackVoid("setValue"); }