Exemplo n.º 1
0
GameObjectModel* GameObjectModel::construct(const GameObject* const pGo)
{
    const GameObjectDisplayInfoEntry* info = sGameObjectDisplayInfoStore.LookupEntry(pGo->GetDisplayId());
    if (!info)
        return NULL;

    GameObjectModel* mdl = new GameObjectModel();
    if (!mdl->initialize(pGo, info))
    {
        delete mdl;
        return NULL;
    }

    return mdl;
}
Exemplo n.º 2
0
GameObjectModel* GameObjectModel::Create(const GameObject& go)
{
    const GameObjectDisplayInfoEntry* info = sGameObjectDisplayInfoStore.LookupEntry(go.GetDisplayId());
    if (!info)
        return NULL;

    GameObjectModel* mdl = new GameObjectModel();
    if (!mdl->initialize(go, *info))
    {
        delete mdl;
        return NULL;
    }

    return mdl;
}
Exemplo n.º 3
0
 bool operator()(const G3D::Ray& r, const GameObjectModel& obj, float& distance)
 {
     TC_LOG_DEBUG("maps", "testing intersection with %s", obj.name.c_str());
     bool hit = obj.intersectRay(r, distance, true, phase_mask);
     if (hit)
     {
         did_hit = true;
         TC_LOG_DEBUG("maps", "result: intersects");
     }
     return hit;
 }
Exemplo n.º 4
0
 bool operator()(const G3D::Ray& r, const GameObjectModel& obj, float& distance)
 {
     LogDebug("DynamicTreeIntersectionCallback_WithLogger : testing intersection with %s", obj.name.c_str());
     bool hit = obj.intersectRay(r, distance, true, phase_mask);
     if (hit)
     {
         did_hit = true;
         LogDebug("DynamicTreeIntersectionCallback_WithLogger : result: intersects");
     }
     return hit;
 }
Exemplo n.º 5
0
 bool operator()(const Ray& r, const GameObjectModel& obj, float& distance)
 {
     DEBUG_LOG("testing intersection with %s", obj.name.c_str());
     bool hit = obj.intersectRay(r, distance, true);
     if (hit)
     {
         did_hit = true;
         DEBUG_LOG("result: intersects");
     }
     return hit;
 }
Exemplo n.º 6
0
 bool operator()(const Ray& r, const GameObjectModel& obj, float& distance)
 {
     sLog->outDebug(LOG_FILTER_MAPS, "testing intersection with %s", obj.name.c_str());
     bool hit = obj.intersectRay(r, distance, true, phase_mask);
     if (hit)
     {
         did_hit = true;
         sLog->outDebug(LOG_FILTER_MAPS, "result: intersects");
     }
     return hit;
 }
Exemplo n.º 7
0
 static void getBounds(const GameObjectModel& g, G3D::AABox& out) { out = g.getBounds();}
Exemplo n.º 8
0
 static void getPosition(const GameObjectModel& g, G3D::Vector3& p) { p = g.getPosition(); }
Exemplo n.º 9
0
 bool operator()(const G3D::Ray& r, const GameObjectModel& obj, float& distance)
 {
     did_hit = obj.intersectRay(r, distance, true, phase_mask);
     return did_hit;
 }
Exemplo n.º 10
0
 void operator()(G3D::Vector3 const& p, GameObjectModel const& obj)
 {
     obj.intersectPoint(p, _areaInfo, _phaseShift);
 }
Exemplo n.º 11
0
 bool operator()(G3D::Ray const& r, GameObjectModel const& obj, float& distance)
 {
     _didHit = obj.intersectRay(r, distance, true, _phaseShift);
     return _didHit;
 }