87 delete mRenderOp.vertexData;
88 delete mRenderOp.indexData;
89 mRenderOp.operationType = Ogre::RenderOperation::OT_TRIANGLE_LIST;
90 mRenderOp.indexData =
new Ogre::IndexData();
91 mRenderOp.vertexData =
new Ogre::VertexData();
92 mRenderOp.useIndexes =
true;
99 setBoundingBox(Ogre::AxisAlignedBox(Ogre::Vector3(-radius, -radius, -radius), Ogre::Vector3(radius, radius, radius)));
111 Ogre::Vector3 dist = cam->getDerivedPosition() - getParentSceneNode()->_getDerivedPosition();
112 return dist.squaredLength();
117 xform->makeTransform(
ogreParentLight->getDerivedPosition(), Ogre::Vector3::UNIT_SCALE, Ogre::Quaternion::IDENTITY);
122 pass->setDepthCheckEnabled(
true);
125 Ogre::Real distanceFromLight = camera->getDerivedPosition().distance(
ogreParentLight->getDerivedPosition());
126 if ((distanceFromLight) <= (radius + camera->getNearClipDistance() + 0.01))
128 pass->setCullingMode(Ogre::CULL_ANTICLOCKWISE);
132 pass->setCullingMode(Ogre::CULL_CLOCKWISE);
134 pass->setDepthFunction(Ogre::CMPF_ALWAYS_PASS);
Ogre::Light * ogreParentLight
The light that this SDeferredLight renders.
virtual void RebuildGeometry()
virtual void CheckCullingMode(Ogre::Camera *camera, Ogre::Pass *pass)
virtual void getWorldTransforms(Ogre::Matrix4 *xform) const
virtual void SetAttenuation()
virtual Ogre::Real getSquaredViewDepth(const Ogre::Camera *) const
SDeferredLightPoint(Ogre::Light *originalLight, SDeferredLightMaterialGenerator *typeLightMaterialGenerator)
virtual Ogre::Real getBoundingRadius() const