Ejemplo n.º 1
0
	void ObjectClue::draw() {

		if (!_caught) {

			if (isDebug()) {

				float* color = getBoundingSphere(0)->getColor();
				glPushMatrix();

					glDisable(GL_LIGHTING);

					glColor3f(color[0], color[1], color[2]);
					glTranslated(getBoundingSphere(0)->getPosition()[0], getBoundingSphere(0)->getPosition()[1], getBoundingSphere(0)->getPosition()[2]);
					glutWireSphere(getBoundingSphere(0)->getRadius(), 20, 20);

					glEnable(GL_LIGHTING);

				glPopMatrix();
			}

			TextureManager* tm = dynamic_cast<TextureManager*>( cg::Registry::instance()->get("TextureManager"));
			MaterialManager* mm = dynamic_cast<MaterialManager*>( cg::Registry::instance()->get("MaterialManager"));
			GLuint txClue = tm->get("clue")->getTextureDL();
			
			glPushMatrix();
				
				glEnable(GL_TEXTURE_2D);
				//mm->get("emerald")->apply();
				glTranslated(_position[0], _position[1], _position[2] + CLUE_SIZE / 2);
				glScalef(CLUE_SIZE, CLUE_SIZE, CLUE_SIZE);
				unitCube(txClue);
				glDisable(GL_TEXTURE_2D);
			glPopMatrix();
		}
	}
Ejemplo n.º 2
0
bool MeshComponent::isInFov()
{
    if (m_frustumCullingDisabled)
        return true;

    return svc().sceneMgr.getCamera()->getFrustum().sphereInFrustum(getBoundingSphere());
}
btScalar	btCollisionShape::getAngularMotionDisc() const
{
	btVector3	center;
	btScalar disc;
	getBoundingSphere(center,disc);
	disc += (center).length();
	return disc;
}
Ejemplo n.º 4
0
btScalar	btCollisionShape::getAngularMotionDisc() const
{
	///@todo cache this value, to improve performance
	btVector3	center;
	btScalar disc;
	getBoundingSphere(center,disc);
	disc += (center).length();
	return disc;
}
Ejemplo n.º 5
0
bool OctreeEntity::insideVisitingOctant() const
{
	if (!visitingOctant)
	{
		return false;
	}

	return getBoundingSphere().inside(*visitingOctant);
}
Ejemplo n.º 6
0
float BaseExtent::getRadius ( void ) const
{
	return getBoundingSphere().getRadius();
}
Ejemplo n.º 7
0
Vector BaseExtent::getCenter ( void ) const
{
	return getBoundingSphere().getCenter();
}