예제 #1
0
void ViewLightGL::setPosition(const Vector3& pos)
{
    Vector3::Spherical spos(pos);
    __distance = spos.radius;
    __azimuth = spos.theta * GEOM_DEG;
    __elevation = spos.phi * GEOM_DEG;

}
예제 #2
0
파일: jslidepiece.cpp 프로젝트: skopp/rush
void JSlidePiece::DrawBounds()
{
    Frame ext = GetExt();

    g_pDrawServer->DrawFrame( ext,  0xFFFFFF00 );

    char str[256];
    sprintf( str, "%s: {%d, %d}", GetName(), (int)ext.x, (int)ext.y );
    Vec2 spos( ext.x + 10, ext.cy() );
    g_pDrawServer->DrawString( spos.x, spos.y, -1, str, 0xFFFF4444 );

    ext.w = g_pDrawServer->GetFrameW( GetSkinPackID(), GetSkinFrame() );
    ext.h = g_pDrawServer->GetFrameH( GetSkinPackID(), GetSkinFrame() );
} // JSlidePiece::DrawBounds
예제 #3
0
파일: waveevent.cpp 프로젝트: Adamiko/los
EventBase* WaveEventBase::mid(unsigned b, unsigned e)
{
    WaveEventBase* ev = new WaveEventBase(*this);
    unsigned fr = frame();
    unsigned start = fr - b;
    if (b > fr)
    {
        start = 0;
        ev->setSpos(spos() + b - fr);
    }
    unsigned end = endFrame();

    if (e < end)
        end = e;

    ev->setFrame(start);
    ev->setLenFrame(end - b - start);
    return ev;
}
예제 #4
0
파일: jblotpiece.cpp 프로젝트: skopp/rush
void JBlotPiece::DrawBounds()
{
    Frame ext = GetExt();
    float scale;
    if (m_bSelected) scale = m_Scale; else scale = 1.0f;

    g_pDrawServer->DrawFrame( ext,  0xFFFFFF00 );

    char str[256];
    sprintf( str, "%s: {%d, %d}", GetName(), (int)ext.x, (int)ext.y );
    Vec2 spos( ext.x + 10, ext.cy() );
    g_pDrawServer->DrawString( spos.x, spos.y, -1, str, 0xFFFF4444 );

    ext.w = scale*g_pDrawServer->GetFrameW( GetSkinPackID(), GetSkinFrame() );
    ext.h = scale*g_pDrawServer->GetFrameH( GetSkinPackID(), GetSkinFrame() );

    ext.x = m_HomePos.x;
    ext.y = m_HomePos.y;
    g_pDrawServer->DrawSprite( ext, GetSkinPackID(), GetSkinFrame(), 0x4400FF00 );

} // JBlotPiece::DrawBounds
예제 #5
0
bool ChModelBullet::AddEllipsoid(double rx,  double ry,  double rz, ChVector<>* pos, ChMatrix33<>* rot)
{
	btScalar rad=1.0;
	btVector3 spos(0,0,0);
	double arx = rx + this->GetEnvelope();
	double ary = ry + this->GetEnvelope();
	double arz = rz + this->GetEnvelope();
	double mmargin = GetSuggestedFullMargin();
	btMultiSphereShape* mshape = new btMultiSphereShape(
						//btVector3(1,1,1),
						&spos,&rad,1);
	mshape->setLocalScaling(btVector3(  (btScalar)arx,
										(btScalar)ary,
										(btScalar)arz ));

	mshape->setMargin((btScalar)ChMin(mmargin, 0.9*ChMin(ChMin(arx,ary),arz)));

	_injectShape (	pos, rot, mshape);

	model_type=ELLIPSOID;
	return true;
}
예제 #6
0
파일: player.hpp 프로젝트: masaedw/zugagaga
 virtual SendPos GetShadowPos()
 {
   SendPos spos(short(pos.x), short(pos.y));
   return spos;
 }